Webhook body examples
Every webhook from the new webhook process (see Registering webhooks) includes a body with minimal information. For a tutorial about how to get these webhooks, see Receiving webhooks.
This section contains examples of the content returned in the body of a webhook response.
Transaction events
The webhook body is shaped the same for all transaction events in the new webhook workflow.
Transaction eventType
For the TRANSACTION
event type, each webhook contains the following parameters:
eventType
- Specifies the type of event returned. For example,TRANSACTION
.transactionStatus
- For details about the possible values, see the Transaction status reference tables.processMethod
- For details about the possible values, see the Process method reference table.transactionId
Note
For transactions, the body of the webhook contains only a small subset of the possible parameters for a transaction. To view the values for all the available parameters of the transaction indicated in the webhook, use the
transactionId
value with the View transaction by transaction ID or the View transactions endpoint (asid
ortransactionId
(within any query parameter object)).
{
"eventType": "TRANSACTION",
"transactionStatus": 10,
"processMethod": 10,
"transactionId": 211302211
}
Use the webhook response to determine how to react. For example, the processMethod
shows whether the transaction was card-based, echeck, alternative payment method (APM), or something else. If you wanted to ignore all webhooks related to APMs, you would look for any webhook with a value of 20
and then ignore it.
Decline recovery eventType
For the DECLINE_RECOVERY
event type, each webhook contains the following parameters:
eventType
- Specifies the type of event returned. For example,DECLINE_RECOVERY
.retryId
- Specifies the identifier for the declined transaction.orderNumber
- Specifies the orderNumber for the transaction.
Note
For declined transactions, the body of the webhook contains only a small subset of the possible parameters for a transaction or the declined information.
In order to see more about a declined transaction, use the
retryId
value in the path parameter of the View a decline recovery record endpoint.In order to find more information about the original transaction, use the
orderNumber
value in the View transactions endpoint by using that order number value in theplugin.orderNumber
query parameter.
{
"eventType": "DECLINE_RECOVERY",
"retryId": 43118,
"orderNumber": "45928c5ae6105e6a02ba"
}
Payout events
The webhook body is shaped the same for all payout events in the new webhook workflow.
Each webhook contains the following parameters:
eventType
payoutStatus
- For details about the possible values, see the Payout status reference table.transferStatus
- For details about the possible values, see the Transfer status reference table.payoutId
payoutRef
After registering the webhook URLs for payouts, a webhook gets sent every time a recipient accepts your payout to them through the Interchecks payout provider. For example, after the recipient accepts the payout, the data.transferStatus
changes to 20
.
For information about payout events with other payout providers, contact Integrations Support.
Note
For payouts, the body of the webhook contains only a small subset of the possible parameters for a payout. To view the values for all the available parameters of the payout indicated in the webhook, use the
payoutId
value with the View a payout endpoint or use thepayoutRef
value with the View payouts endpoint.
{
"eventType": "PAYOUT",
"payoutStatus": 20,
"transferStatus": 20,
"payoutId": 2437652,
"payoutRef": "dfbb8efc-6e85-4973-8f2e-69baf8624ae6"
}
Spendback events
The webhook body is shaped the same for all spendback events in the new webhook workflow.
Each webhook contains the following parameters:
eventType
spendbackStatus
- For details about the possible values, see the Spendback status reference table.spendbackId
spendbackRef
Note
For spendbacks, the body of the webhook contains only a small subset of the possible parameters for a spendback. To view the values for all the available parameters of the spendback indicated in the webhook, use the
spendbackId
value with the View a spendback endpoint or use thespendbackRef
value with the View spendbacks endpoint.
{
"eventType": "SPENDBACK",
"spendbackStatus": 20,
"spendbackId": 2437652,
"spendbackRef": "dfbb8efc-6e85-4973-8f2e-69baf8624ae6"
}
Updated 6 months ago