Wallet Order Webhooks
Get order status updates without polling
About the Webhooks
Wallet order webhooks track card payment authorizations and crypto settlement. A successful wallet order will generate two events, one when order status is PROCESSING and again when order status reaches COMPLETE.
Parameter | Description | Required |
---|---|---|
referenceId | Your own internal reference id. | String, optional |
accountId | Your Wyre account id. | String, required for the webhook to work. |
The webhook will be called for any state change in orders which were submitted with an accountId
that has a webhook URL configured.
Wallet Order Webhook Set Up
To configure a webhook Url for wallet orders (card payments) use the v2/digitalwallet/webhook endpoint. The owner of the webhook is your Wyre (business) account Id as shown here. A successful request will replay the information back to you in response.
{
"owner":"account:AC_GT299G7DFUE",
"webhook":"https://requestinspector.com/inspect/testprod"
}
A successful webhook configuration replays your request info back to you.
{
"owner": "account:AC_FF299GFMVUE",
"webhook": "https://requestinspector.com/inspect/testprod"
}
Wallet Order Webhook Payload
The referenceId
is passed within the Wallet Order Reservation request. You decide the referenceId and use it to track your orders.
{
"referenceId": "your_reference_id", // your own id passed in the order creation
"accountId": "AAAAAAAAAAA", // your Wyre account id
"orderId": "WO_0000000001", // the wallet order id
"orderStatus": "PROCESSING", // the order status {PROCESSING, COMPLETE, FAILED}]
"transferId": "TF_000000001", // OPTIONAL, available when order was completed, the transfer id
"failedReason": " OPTIONAL, some string with failed reason", // if failed, there should be a reason string when possible
"error": {
"errorCategory": "GENERAL", //only applicable when failures occur
"errorCode": "UNABLE_TO_PROCESS", // only applicable when failures occur
"errorMessage": "We are unable to process your order at this time." // only applicable when failures occur
},
"reservation": "BB8M2LUGENAM8NUDTFBW", //reservation id of the order
"email": "[email protected]" //email of user sending payment
}
Updated almost 3 years ago