operation_type to "withdrawal".
Availability NoticeWithdrawals are currently only available for beneficiaries in Mexico. Support for additional countries will be added in future releases.
Available Transfer MethodsThere are two transfer methods available:
- SPEI: Bank transfers processed same business day during banking hours.
- Debit Card: Instant deposits available within 5-15 minutes, 24/7.
Step 1: Choose Your Transfer Method
Select the transfer method that fits your payout needs. Here you can find a quick comparison between the two methods:SPEI Bank Transfer
SPEI (Sistema de Pagos Electrónicos Interbancarios) is Mexico’s standard electronic payment system for bank-to-bank transfers. You should use SPEI when:- Making regular business payments, such as commissions or vendor payments.
- Processing payroll and salary transfers.
- Sending larger amounts where cost-effectiveness is important.
- Same-day processing during business hours is acceptable.
Key requirementsPay attention to the following specifics for SPEI withdrawals:
- The
transfer_methodvalue must be"SPEI". - The
beneficiary.accountmust be a valid 18-digit CLABE (Clave Bancaria Estandarizada). - Processing occurs during banking hours (typically 9 AM - 5 PM MXT, Monday-Friday).
Debit Card Instant Transfer
Debit card withdrawals provide near-instant fund delivery directly to the beneficiary’s debit card. You should use Debit Card withdrawals when:- Making urgent or emergency payments that can’t wait for business hours.
- Paying gig economy workers who need immediate access to funds.
- Providing instant cashouts or on-demand withdrawals.
- Processing customer refunds that require immediate availability.
Key requirementsPay attention to the following specifics for debit card withdrawals:
- The
transfer_methodvalue must be"DEBIT_CARD". - The
beneficiary.accountmust be a valid 16-digit debit card number. - Processing occurs 24/7, including weekends and holidays.
- Funds are typically available within 5-15 minutes.
Step 2: Make the Withdrawal Request
Create and send your withdrawal request using the Process Transaction endpoint withoperation_type set to "withdrawal".
The request must have the following fields:
The
beneficiary object contains the recipient’s information for the withdrawal. This object specifies who will receive the funds and how they should be delivered. You can see the properties of the beneficiary object in the table below:
RFC and CURP requirementsEither
rfc or curp must be provided for every withdrawal request. If neither is available, send "ND" (No Disponible) as the value for one of the two fields.SPEI Transfer
Metadata Requirements
Themetadata object is required for all withdrawal requests and must include geolocation information:
You can also include optional fields in the metadata object for tracking purposes:
operation_date, customer_email, business_user, customer_id, or order_id (sent as orderId in the confirmed example above).
Make a POST request to the Process Transaction endpoint with your withdrawal data:
Step 3: Handle the Response
Upon successful request, the API will return an immediate acknowledgment. Here you find a description of the fields in the response:
The response structure is as follows:
id field to monitor progress.
Step 4: Withdrawal Lifecycle and Statuses
Withdrawals are asynchronous operations. As your withdrawal progresses, it moves through the following statuses:Internal Status vs Webhook Status
Only two webhook notifications are sent per withdrawal: an initial Pending notification, and one terminal notification.Monitoring Options
You can monitor withdrawal status using one of these methods:- Webhooks (Recommended): configure webhooks to receive real-time status updates automatically.
- Status Polling: check transaction status periodically using the Get Transaction Status endpoint.
Refunds
A withdrawal refund (REFUNDED) is distinct from a payment refund. It means the disbursed funds were returned to the merchant’s sub account, not to the end customer’s bank.
A refund occurs when the SPEI system reverses a previously completed or declined disbursement. Tonder detects this automatically and transitions the withdrawal to REFUNDED — no action is required from your integration to trigger it. This can happen after a PAID_FULL (Success) withdrawal, and also after a Declined one.
How It Works
- The withdrawal reaches
PAID_FULLstatus. A webhook notification is dispatched to your endpoint after a brief delay. - If SPEI notifies Tonder that the disbursement has been reversed before that delay elapses, Tonder suppresses the pending
PAID_FULLwebhook and moves the withdrawal directly toREFUNDED. - If the reversal happens after the
PAID_FULLwebhook has already been sent, you will receive a separateREFUNDEDwebhook afterward. REFUNDEDis a terminal state — no further transitions occur.- The refunded amount is credited back to the merchant’s sub account. Notify the withdrawal recipient and initiate a new withdrawal request if appropriate.
Notification Ordering
Common Refund Reasons
This list is not exhaustive. Always surface the reason to your operations team for investigation.
Handling a Refund Notification
- Acknowledge the notification immediately (HTTP 200) — do not delay the response while processing business logic.
- Use the withdrawal
idto check for idempotency. If you already processed aREFUNDEDevent for this withdrawal, skip further processing. - Credit the refunded amount to the withdrawal recipient in your own system.
- Notify the recipient that the transfer was reversed, including the reason if available.
- If the reversal was due to a correctable error (for example, an incorrect CLABE), allow the recipient to submit a new withdrawal request after verifying their account details.
Webhooks
Withdrawal webhooks for API Direct follow the same format as API Direct payment webhooks, with a few differences:operation_typeis"withdrawal"transfer_method_typeis used instead ofpayment_method_typeevent_typeuses thewithdrawal_prefix (for example,withdrawal_Pending,withdrawal_Success)provideris"STP"metadatacontains the withdrawal fields defined by the merchant (latitude,longitude,beneficiary_rfc, and so on)
Successful SPEI Withdrawal
Declined SPEI Withdrawal
A Declined withdrawal means the transfer was rejected by Tonder before being handed off to the provider.Failed SPEI Withdrawal
A Failed withdrawal is sent to the provider but STP is unable to process the transfer, which is different from Declined.The examples below are illustrative and follow the standard API Direct webhook pattern.
Best Practices
- Idempotency: handle duplicate notifications gracefully using the withdrawal
id. - Acknowledgment: return HTTP 200 quickly, then process asynchronously.
- Two notifications per withdrawal: always expect a Pending notification followed by exactly one terminal notification (Success, Declined, or Failed).
- Logging: log all notification receipts for debugging and audit purposes.
Testing
Use the following institution codes in the Stage environment:
For production, use real institution codes from the Mexican Banking Reference.
Next Steps
- Set up webhooks to receive real-time notifications when withdrawal statuses change.
- Check out HTTP response codes to understand how to handle different API responses and error scenarios.
- Explore rate limits to ensure your withdrawal processing doesn’t exceed API usage limits.

