Listening for pay-out webhooks

📘

In the previous guide, we discussed setting up a webhook listener. If you haven't configured your listener yet, please refer to that step to prepare for receiving webhooks.

🚧

Details on the data transmitted in webhooks are available Here.

Payment Flow Diagram and Webhooks Sent

Sequence diagram of Payment out lifecycle

Diagram of Payment Out lifecycle.

Payment Complete Webhooks

When the payout is claimed by the end user, the following webhooks are sent out:

  1. statusChanged - Processing: Dispatched when the payment status updates to processing after the transaction is recognized on the platform. This occurs either after the end user claims the payout or when the payout is automatically processed using payOutDetails.
  2. statusChanged - Complete: Dispatched when the payment status updates to complete, indicating that the transaction has been successfully confirmed on the blockchain.

The statusChanged - Complete webhook provides detailed information about the payment, including the transaction hash, which can be verified using a block explorer within the transactions array.

Payment Expired Webhooks

Should the end user fail to claim the payment within the allocated timeframe, the following webhook is issued:

  1. statusChanged - Expired Sent when the payment status changes to expired, which occurs if the expiry time lapses without any address submission or confirmation by the end user.

In scenarios where the end user does not finalize the payment within the designated period, the payment is deemed expired, and a single webhook is dispatched to notify of the absence of transactions within the specified duration.

It's important to note that, for payout payments, exception scenarios (e.g., payment failures or errors) are not applicable and thus do not require consideration.

Payment Out Webhooks

{
  "source": "payment",
  "event": "statusChanged",
  "data": {
    "uuid": "07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "merchantDisplayName": "ETH Merchant ",
    "merchantId": "a7eddadd-fd9b-45fb-82a1-dc12eaa14cba",
    "dateCreated": 1709896869000,
    "expiryDate": 1709900469000,
    "quoteExpiryDate": 1709900469000,
    "acceptanceExpiryDate": 1709896938000,
    "quoteStatus": "ACCEPTED",
    "reference": "test_reference_out_mH9LBR1",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "PROCESSING",
    "displayCurrency": {
      "currency": "EUR",
      "amount": 10,
      "actual": 0
    },
    "walletCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0.00276456
    },
    "paidCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0
    },
    "feeCurrency": {
      "currency": "ETH",
      "amount": 0.00002765,
      "actual": 0
    },
    "displayRate": {
      "base": "ETH",
      "counter": "EUR",
      "rate": 3617.212142257719
    },
    "exchangeRate": {
      "base": "ETH",
      "counter": "ETH",
      "rate": 1
    },
    "address": {
      "address": "0x84A4a239805d06c685219801B82BEA7c76702214",
      "tag": null,
      "protocol": null,
      "uri": "ethereum:0x84A4a239805d06c685219801B82BEA7c76702214?value=2.76456E+15",
      "alternatives": []
    },
    "returnUrl": "www.your-url-here.com",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "transactions": [],
    "refund": null,
    "refunds": []
  }
}
{
  "source": "payment",
  "event": "statusChanged",
  "data": {
    "uuid": "07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "merchantDisplayName": "ETH Merchant ",
    "merchantId": "a7eddadd-fd9b-45fb-82a1-dc12eaa14cba",
    "dateCreated": 1709896869000,
    "expiryDate": 1709900469000,
    "quoteExpiryDate": 1709900469000,
    "acceptanceExpiryDate": 1709896938000,
    "quoteStatus": "ACCEPTED",
    "reference": "test_reference_out_mH9LBR1",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "COMPLETE",
    "displayCurrency": {
      "currency": "EUR",
      "amount": 10,
      "actual": 10
    },
    "walletCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0.00276456
    },
    "paidCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0.00276456
    },
    "feeCurrency": {
      "currency": "ETH",
      "amount": 0.00002765,
      "actual": 0.00002765
    },
    "displayRate": {
      "base": "ETH",
      "counter": "EUR",
      "rate": 3617.212142257719
    },
    "exchangeRate": {
      "base": "ETH",
      "counter": "ETH",
      "rate": 1
    },
    "address": {
      "address": "0x84A4a239805d06c685219801B82BEA7c76702214",
      "tag": null,
      "protocol": null,
      "uri": "ethereum:0x84A4a239805d06c685219801B82BEA7c76702214?value=2.76456E+15",
      "alternatives": []
    },
    "returnUrl": "www.your-url-here.com",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "transactions": [
      {
        "dateCreated": 1709897097718,
        "dateConfirmed": 1709897097718,
        "hash": "0x30c18d5eed6c02418506d69d87c59ee52c2e10753bbccea035346b81c1e1a7e0",
        "amount": 0.00276456,
        "risk": {
          "level": "LOW",
          "resourceName": null,
          "resourceCategory": null,
          "alerts": []
        },
        "networkFeeCurrency": "ETH",
        "networkFeeAmount": 0,
        "sources": [],
        "displayRate": {
          "base": "ETH",
          "counter": "EUR",
          "rate": 3617.212142257719
        },
        "exchangeRate": {
          "base": "ETH",
          "counter": "ETH",
          "rate": 1
        },
        "protocol": null,
        "isOnHold": false
      }
    ],
    "refund": null,
    "refunds": []
  }
}
{
  "source": "payment",
  "event": "transactionOnHold",
  "data": {
    "uuid": "da19a0a7-73de-4033-b042-e3545682c06d",
    "merchantDisplayName": "ETH Merchant ",
    "merchantId": "a7eddadd-fd9b-45fb-82a1-dc12eaa14cba",
    "dateCreated": 1709548454000,
    "expiryDate": 1709721254000,
    "quoteExpiryDate": 1709721254000,
    "acceptanceExpiryDate": 1709548500000,
    "quoteStatus": "ACCEPTED",
    "reference": "REF286000",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "PROCESSING",
    "displayCurrency": {
      "currency": "ETH",
      "amount": 0.011,
      "actual": 0
    },
    "walletCurrency": {
      "currency": "ETH",
      "amount": 0.011,
      "actual": 0.011
    },
    "paidCurrency": {
      "currency": "ETH",
      "amount": 0.011,
      "actual": 0
    },
    "feeCurrency": {
      "currency": "ETH",
      "amount": 0.00011,
      "actual": 0
    },
    "displayRate": {
      "base": "ETH",
      "counter": "ETH",
      "rate": 1
    },
    "exchangeRate": {
      "base": "ETH",
      "counter": "ETH",
      "rate": 1
    },
    "address": {
      "address": "0x84A4a239805d06c685219801B82BEA7c76702214",
      "tag": null,
      "protocol": null,
      "uri": "ethereum:0x84A4a239805d06c685219801B82BEA7c76702214?value=1.1E+16",
      "alternatives": []
    },
    "returnUrl": "",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=da19a0a7-73de-4033-b042-e3545682c06d",
    "transactions": [
      {
        "dateCreated": 1709548507628,
        "dateConfirmed": null,
        "hash": null,
        "amount": 0.011,
        "risk": null,
        "networkFeeCurrency": "ETH",
        "networkFeeAmount": 0,
        "sources": [],
        "displayRate": {
          "base": "ETH",
          "counter": "ETH",
          "rate": 1
        },
        "exchangeRate": {
          "base": "ETH",
          "counter": "ETH",
          "rate": 1
        },
        "protocol": null,
        "isOnHold": true
      }
    ],
    "refund": null,
    "refunds": []
  }
}
{
  "source": "payment",
  "event": "statusChanged",
  "data": {
    "uuid": "b627afcb-664a-4755-94c2-babc9593db30",
    "merchantDisplayName": "ETH Merchant ",
    "merchantId": "a7eddadd-fd9b-45fb-82a1-dc12eaa14cba",
    "dateCreated": 1709896504000,
    "expiryDate": 1709896683371,
    "quoteExpiryDate": null,
    "acceptanceExpiryDate": null,
    "quoteStatus": "TEMPLATE",
    "reference": "test_reference_out_bf1r6O1",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "EXPIRED",
    "displayCurrency": {
      "currency": "EUR",
      "amount": 10,
      "actual": 0
    },
    "walletCurrency": {
      "currency": "ETH",
      "amount": 0.00276243,
      "actual": 0
    },
    "paidCurrency": {
      "currency": null,
      "amount": 0,
      "actual": 0
    },
    "feeCurrency": {
      "currency": "ETH",
      "amount": 0,
      "actual": 0
    },
    "displayRate": null,
    "exchangeRate": null,
    "address": null,
    "returnUrl": "www.your-url-here.com",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=b627afcb-664a-4755-94c2-babc9593db30",
    "transactions": [],
    "refund": null,
    "refunds": []
  }
}
{
  "source": "payment",
  "event": "statusChanged",
  "data": {
    "uuid": "07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "merchantDisplayName": "ETH Merchant ",
    "merchantId": "a7eddadd-fd9b-45fb-82a1-dc12eaa14cba",
    "dateCreated": 1709896869000,
    "expiryDate": 1709900469000,
    "quoteExpiryDate": 1709900469000,
    "acceptanceExpiryDate": 1709896938000,
    "quoteStatus": "ACCEPTED",
    "reference": "test_reference_out_mH9LBR1",
    "type": "OUT",
    "subType": "merchantPayOut",
    "status": "CANCELLED",
    "displayCurrency": {
      "currency": "EUR",
      "amount": 10,
      "actual": 10
    },
    "walletCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0.00276456
    },
    "paidCurrency": {
      "currency": "ETH",
      "amount": 0.00276456,
      "actual": 0.00276456
    },
    "feeCurrency": {
      "currency": "ETH",
      "amount": 0.00002765,
      "actual": 0.00002765
    },
    "displayRate": {
      "base": "ETH",
      "counter": "EUR",
      "rate": 3617.212142257719
    },
    "exchangeRate": {
      "base": "ETH",
      "counter": "ETH",
      "rate": 1
    },
    "address": {
      "address": "0x84A4a239805d06c685219801B82BEA7c76702214",
      "tag": null,
      "protocol": null,
      "uri": "ethereum:0x84A4a239805d06c685219801B82BEA7c76702214?value=2.76456E+15",
      "alternatives": []
    },
    "returnUrl": "www.your-url-here.com",
    "redirectUrl": "https://pay.sandbox.bvnk.com/payout?uuid=07905528-d72e-40dd-a1b4-fb8ec2f748c8",
    "transactions": [
      {
        "dateCreated": 1709897098000,
        "dateConfirmed": 1709897098000,
        "hash": "0x30c18d5eed6c02418506d69d87c59ee52c2e10753bbccea035346b81c1e1a7e0",
        "amount": 0.00276456,
        "risk": {
          "level": "LOW",
          "resourceName": null,
          "resourceCategory": null,
          "alerts": []
        },
        "networkFeeCurrency": "ETH",
        "networkFeeAmount": 0,
        "sources": null,
        "displayRate": {
          "base": "ETH",
          "counter": "EUR",
          "rate": 3617.212142257719
        },
        "exchangeRate": {
          "base": "ETH",
          "counter": "ETH",
          "rate": 1
        },
        "protocol": null,
        "isOnHold": false
      }
    ],
    "refund": null,
    "refunds": []
  }
}