Skip to main content
This guide explains the structure of webhook notifications sent by the Tonder Withdrawals API when withdrawal statuses change.

Webhook Overview

Webhooks are HTTP POST requests sent to your configured endpoint whenever a withdrawal status changes. They provide real-time notifications so you don’t need to poll the API for status updates.

Notification Structure

The webhook notification is an object containing the full withdrawal details, with an audit trail in the status_changes array.

Payload Structure

The webhook payload contains the complete withdrawal object with all details:

Withdrawal Object

Account Data Object

The account_data object includes complete bank and account details:

Status Changes Array

The status_changes array provides a complete audit trail of status transitions:

Metadata Object

The metadata object contains additional information:

Example Webhook Payload

The webhook payload is the complete withdrawal object. Here’s an example:

Status Change Examples

The webhook payload includes the complete withdrawal object with updated status. The status_changes array shows the transition history.

PENDING → PROCESSING

PROCESSING → SENT_TO_PROVIDER

SENT_TO_PROVIDER → PAID_FULL

PENDING → REJECTED

Webhook Headers

Webhook requests include standard HTTP headers. You may also receive custom headers for verification:

Webhook Security

Verify Webhook AuthenticityAlways verify that webhooks are coming from Tonder. Check the signature header if provided, and validate the request source IP addresses.

Handling Webhooks

Best Practices

  1. Idempotency: Handle duplicate webhooks gracefully using the withdrawal ID
  2. Acknowledgment: Return HTTP 200 status quickly, then process asynchronously
  3. Retry Logic: Implement retry logic for failed webhook processing
  4. Logging: Log all webhook receipts for debugging and audit purposes
  5. Status Updates: Update your local records based on webhook status changes

Error Handling

If your webhook endpoint returns an error (4xx or 5xx), Tonder will retry the webhook delivery according to the retry policy. Ensure your endpoint can handle:
  • Network timeouts
  • Temporary server errors
  • Duplicate deliveries
  • Out-of-order deliveries

Testing Webhooks

When testing in the Stage environment:
  • Use the test institution code (97846)
  • Verify webhook payload structure
  • Test all status transitions
  • Validate error scenarios
See Testing Requirements for more details.

Next Steps