Business Webhooks

Events

Below is the list of all available webhook events:

Event
Description

charge:paid

Charge has been paid, but hasn't been confirmed yet

charge:confirmed

Charge has been confirmed and the associated payment is completed

charge:expired

Charge has expired without a payment being made

charge:delayed

The payment was made after the specified time

charge:underpaid

The payment was made for an inferior quantity of what was requested

charge:refund_pending

A refund has been requested, but it hasn't been resolved yet

charge:refunded

They payment has been sucessfully refunded

Fields

The payload of the webhook has the following structure:

{
  "event": string, // Name of the event
  "id": string // Charge identifier,
  "description": string // description of the payment
  "fiatCurrency": string // Fiat currency in which the payment was requested,
  "payment": {
    "amount": string // amount paid
    "currencyCode": string // code of the currency used (BTC, ETH...)
  }
  "createdAt": string // ISO string with the creation timestamp of the payment
  "updateAt": string // ISO string with the last update timestamp of the payment
  "metadata": object // Object with any metadata you passed during charge creation
}

For example, if you use Typescript you can verify a payload like this:

{
    event: "charge:confirmed",
    id: "768298de-f922-4663-8c3d-110098e65446",
    fiatCurrency: "EUR",
    fiatAmount: "20",
    payment: {
        currencyCode: "BTC",
        amount: "1.0"
    },
    createdAt: "2020-10-09T11:51:46Z",
    updateAt: "2020-10-09T11:55:21Z",
    metadata: {order_id: "001-003", tags: ["blackfriday", "vip"]}
}

Last updated