Webhooks

Pay can be configured to send webhook events to notify your application any time an event happens on your transaction. Pay sends a response, via a HTTP request, to any endpoint URLs that you have provided us in the Pay dashboard.

Events

To listen to events, create a webhook in the Pay dashboard. Webhook URLs must start with https://.

EventDescription
purchase_completeA transaction is confirmed onchain.

Purchase Complete

Triggered when a transaction is confirmed onchain. This event provides information about the new status of the order and its transactionHash, as well as other relevant information.

Example Response:

{
"data": {
"buyWithFiatStatus": {
"intentId": "f4cf8ab7-bb62-4b3b-a180-70fc7d72446c",
"status": "ON_RAMP_TRANSFER_COMPLETED",
"toAddress": "0xebfb127320fcbe8e07e5a03a4bfb782219f4735b",
"quote": {
"createdAt": "2024-06-18T23:46:46.024Z",
"fromCurrency": {
"amountUnits": "279",
"amount": "2.79",
"currencySymbol": "USD",
"decimals": 2,
"amountUSDCents": 279
},
"fromCurrencyWithFees": {
"amountUnits": "294",
"amount": "2.94",
"currencySymbol": "USD",
"decimals": 2,
"amountUSDCents": 279
},
"onRampToken": {
"chainId": 137,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Matic",
"symbol": "MATIC",
"decimals": 18,
"priceUSDCents": 54.797200000000004
},
"toToken": {
"chainId": 137,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Matic",
"symbol": "MATIC",
"decimals": 18,
"priceUSDCents": 54.797200000000004
},
"estimatedOnRampAmountWei": "5000000000000000000",
"estimatedOnRampAmount": "5",
"estimatedToTokenAmount": "5",
"estimatedToTokenAmountWei": "5000000000000000000",
"estimatedDurationSeconds": 30
},
"source": {
"completedAt": "2024-06-18T23:49:00.347Z",
"amount": "5",
"amountWei": "5000000000000000000",
"token": {
"chainId": 137,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Matic",
"symbol": "MATIC",
"decimals": 18,
"priceUSDCents": 54.797200000000004
},
"transactionHash": "0x4bb089f6a60b49235a817b52bf39bc078f1246df15731b85837526bb62cf4e70",
"explorerLink": "https://polygonscan.com/tx/0x4bb089f6a60b49235a817b52bf39bc078f1246df15731b85837526bb62cf4e70",
"amountUSDCents": 275
}
}
}
}