Webhook Examples

Account Updates

Webhooks for account updates are made using the subscription endpoint

{
  "subscriptionId": "DA_GD894ANFUGC",
  "trigger": "account:AC_J8T8C7LFJ3V"
}

Wallet Balance Updates

Webhooks for Wallets are sent as part of our wallets API via the callbackUrl body parameter in the request to create the wallet

{
  "createdAt": 1633128935294,
  "id": "TF_P3A72QM3EJ3-D",
  "source": "transfer:TF_P3A72QM3EJ3",
  "dest": "wallet:WA_9H8PB4XP92M",
  "currency": "USD",
  "amount": 10000,
  "status": "CONFIRMED",
  "confirmedAt": 1633128935294,
  "cancelledAt": null,
  "reversedAt": null,
  "message": "Deposit for transfer TF_P3A72QM3EJ3",
  "allowOverdraft": true,
  "authorizer": "account:AC_YC3NT6GEZ8U",
  "senderProvidedId": null,
  "reversedBy": null,
  "fees": 0,
  "feesDest": null,
  "metadata": {
    "transferId": "TF_P3A72QM3EJ3"
  },
  "tags": [],
  "sourceFees": null,
  "destFees": null
}

Sending bitcoin to a Wyre wallet from an external source:

{
   "createdAt":1635182780554,
   "id":"TR_E6H8H2AWEYP",
   "source":"bitcoin:EXTERNAL",
   "dest":"wallet:WA_9ABGC8LW7G4",
   "currency":"BTC",
   "amount":0.001,
   "status":"CONFIRMED",
   "confirmedAt":1635182780554,
   "cancelledAt":null,
   "reversedAt":null,
   "message":null,
   "allowOverdraft":true,
   "authorizer":null,
   "senderProvidedId":null,
   "reversedBy":null,
   "fees":0,
   "feesDest":null,
   "metadata":{
      "BTCNetworkTxId":"cb109405ab870bc0f916aad79a605d2d6fa23e53eec4523a3be8c0d22d15e256"
   },
   "tags":[
      
   ],
   "sourceFees":null,
   "destFees":null,
   "clientIp":"127.0.0.1"
}

Transfer Updates

Executing transfers will send multiple payloads to the webhook. The webhook is specified in the notify

{
  "subscriptionId": "DA_6LJNVYMVX7T",
  "trigger": "transfer:TF_QA9GMG3GAWV"
}
{
  "createdAt": 1633130340295,
  "id": "TF_QA9GMG3GAWV-D",
  "source": "transfer:TF_QA9GMG3GAWV",
  "dest": "wallet:WA_9H8PB4XP92M",
  "currency": "USD",
  "amount": 10,
  "status": "CONFIRMED",
  "confirmedAt": 1633130340295,
  "cancelledAt": null,
  "reversedAt": null,
  "message": "Deposit for transfer TF_QA9GMG3GAWV",
  "allowOverdraft": true,
  "authorizer": "account:AC_YC3NT6GEZ8U",
  "senderProvidedId": null,
  "reversedBy": null,
  "fees": 0,
  "feesDest": null,
  "metadata": {
    "transferId": "TF_QA9GMG3GAWV"
  },
  "tags": [],
  "sourceFees": null,
  "destFees": null
}

Payment Method Updates

Payment Methods can be assigned a webhook via the subscription API. Updates will reference the subscription Id as well as the payment method SRN

{
  "subscriptionId": "DA_MTUL3N78TEN",
  "trigger": "paymentmethod:PA_3NYHU8GQYVJ"
}

Sending Funds to an Address Attached to Payment Method

Sending funds to an auto-liquidating blockchain address (supported currencies only!) will trigger the following payload to the notifyUrl specified in the request payload.

A transfer id is created and sent to the payload that you can query and retrieve details.

{
    "subscriptionId": "DA_CCZRGH7H9CZ",
    "trigger": "transfer:TF_DJQGBPPPAA2"
}

User Updates

User Updates are added by Wyre. Talk to sales to learn more.

{
  "userId":"US_9UG6JF2Y26T","type":
  "USER_STATUS_UPDATED"
}