Callbacks help your system track payment and transfer progress.
Every callback includes the webhook secret created with the API key:
Compare this header with the webhook secret stored on your server. Use a constant-time comparison. Despite the header name, its value is the raw bearer secret, not an encrypted value or an HMAC digest. Never log it or return it to a browser. Rotate the API key immediately if the value is exposed.
Callback URL
For collection, transfer, and swap requests, send a callback_url in the request body. The field is required. Production provider flows send pending and terminal updates. Sandbox flows and swaps settle immediately and send only the terminal update.
Your endpoint should:
- Accept
POST requests.
- Respond quickly with a success status.
- Store the event and transaction reference.
- Handle duplicate events safely.
Collection pending event
Sent after a collection is created.
Transfer pending event
Sent after a transfer is created.
Terminal event
Provider-backed collections and transfers send a terminal update after a webhook or worker status check settles the transaction.
Collection terminal events use collection.updated. Transfer terminal events use transfer.updated. The status is completed, failed, or cancelled.
Completed swaps use swap.updated and include the quote plus debit and credit transaction legs.
All terminal transfer callbacks use transfer.updated. An SSP production cashout sends it when the agent completes the request.
Sarafa may retry callbacks. Use reference, external_id, and status as your idempotency key. Do not assume callbacks arrive only once.
Use the transaction endpoints to fetch the latest status when your system needs to reconcile activity.
Callback delivery is asynchronous and requires Sarafa’s QStash delivery configuration. Settlement is never rolled back when your callback endpoint is unavailable. Last modified on July 22, 2026