Skip to content

Callbacks

Each time the state changes on a transaction the API will send a callback to the URL provided in your application settings.

The callback provides several details:

  • The states for the transaction, allocation and drawdowns (If used)
  • The last updated date
  • The ID of the transaction, allocations and drawdowns (If used)

Example

This is a typical example of a callback you would get after the buyer has made a deposit.

{
"url": "https://example.net/your/callback/url",
"data": {
"id": "4apICtLE2JPu1NfoWURmL",
"reference": "TKYB6PZ3",
"state": "FUNDS_RECEIVED",
"balance": "0.0000",
"updated_at": "2021-06-14 09:25:03",
"allocations": [
{
"id": "4RwHQ1bQsmA5v4tjf5o0m6",
"state": "CREATED",
"updated_at": "2021-06-14 09:24:08"
}
]
}
}

Security

Whitelisting

To help prevent unknown third parties from sending callbacks to your endpoint you can whitelist the following IP addresses.

Sandbox / Development
13.244.48.16
13.244.147.116
Live / Production
13.244.170.245
13.244.43.204

Webhook Secret

Alternatively you can use a unique key or identifier when setting up the callback url for your application. This can be included inline or as a query parameter.

Inline Secret

https://example.net/tradesafe/callback/<webhook-secret-key>

Query parameter

https://example.net/tradesafe/callback?secret=<webhook-secret-key>