Overview
Tonder’s withdrawal functionality enables businesses to send payouts to beneficiaries through the same unified/process/
endpoint. Withdrawals support SPEI bank transfers and direct debit card deposits, providing flexible payout options across Mexico.
These are the withdrawal methods supported by Tonder:
Method | ID | Description | Processing Time |
---|---|---|---|
SPEI | SPEI | Bank account transfers | Same day |
Debit Card | DEBIT_CARD | Direct card deposits | Instant |
Withdrawal Request Structure
All withdrawal requests useoperation_type: "withdrawal"
and must include beneficiary information.
The following fields are required for withdrawal requests:
Field | Type | Required | Description |
---|---|---|---|
operation_type | string | Yes | Must be "withdrawal" |
amount | decimal | Yes | Withdrawal amount |
currency | string | No | Currency code (default: "MXN" ) |
transfer_method | string | Yes | Transfer method ("SPEI" or "DEBIT_CARD" ) |
beneficiary | object | Yes | Beneficiary information |
reference | string | No | Your withdrawal reference |
description | string | No | Withdrawal description |
beneficiary
object includes the following fields:
Field | Type | Required | Description |
---|---|---|---|
beneficiary.account | string | Yes | Account number or CLABE |
beneficiary.name | string | Yes | Beneficiary full name |
beneficiary.rfc | string | Yes | Mexican tax ID (RFC) |
beneficiary.institution | string | Yes | Bank institution code |
beneficiary.email | string | Yes | Beneficiary email |
SPEI Withdrawals
SPEI withdrawals transfer funds directly to Mexican bank accounts using the SPEI interbank system. Processing typically completes on the same business day.SPEI withdrawal request example
SPEI withdrawal request example
SPEI response example
SPEI response example
SPEI Account Validation
SPEI validates accounts using the CLABE format, which is a 18-digit bank account number format used in Mexico. It consists of the following components:- Total length: 18 digits
- Bank code: 3 digits (positions 1-3)
- Branch code: 3 digits (positions 4-6)
- Account number: 11 digits (positions 7-17)
- Check digit: 1 digit (position 18)
Institution Codes
Major Mexican financial institutions and their corresponding codes for SPEI transactions:Code | Bank Name | CLABE Prefix |
---|---|---|
40012 | BBVA México | 012 |
40014 | Santander | 014 |
40021 | HSBC | 021 |
40072 | Banorte | 072 |
40646 | STP | 646 |
40137 | Banregio | 137 |
40058 | Banco Azteca | 058 |
Debit Card Withdrawals
Debit card withdrawals enable instant deposits directly to debit cards, providing immediate fund availability to beneficiaries.Debit card withdrawal request example
Debit card withdrawal request example
Debit card response example
Debit card response example
Withdrawal Status Flow
Withdrawals have their own status flow, which is different from payments.Status | Description | Next Steps |
---|---|---|
pending | Withdrawal request received | Monitor for processing |
processing | Transfer being processed | Wait for completion |
success | Transfer completed successfully | Transaction complete |
failed | Transfer failed | Check error details |
declined | Transfer declined by bank | Try different account |
Status Check
Use the transaction status endpoint to monitor withdrawal progress:Status check response
Status check response
Implementation Examples
Below you’ll find examples of how to implement withdrawals in different programming languages.Validation Requirements
Withdrawals can go through a validation process to ensure the data is correct.RFC Validation
RFC is used to validate the beneficiary’s tax identification number. This is a 12-13 alphanumeric characters format and can be either an individual or business RFC.Type | Structure | Example |
---|---|---|
Individual | 4 letters from the name 6 digits for date of birth (YYMMDD) 3 alphanumeric characters | MAGR850920XY1 |
Business | 3 letters from the business name 6 digits for registration date (YYMMDD) 3 alphanumeric characters | ABC9901011A2 |
Account Number Validation
Account number is used to validate the beneficiary’s bank account number. This is a 18 digits number and can be either a SPEI/CLABE or a debit card number.Type | Validation Criteria |
---|---|
SPEI/CLABE | - Exactly 18 digits - Valid checksum digit - Recognised bank code |
Debit Card | - 13–19 digits - Valid card number format - Must be a debit card (not a credit card) |
Error Handling
Here you’ll find the common errors that can happen when processing withdrawals.Error Code | Description | Solution |
---|---|---|
invalid_clabe | CLABE number invalid | Verify CLABE format |
institution_not_found | Bank code not found | Use valid institution code |
insufficient_balance | Not enough balance | Check account balance |
beneficiary_blocked | Beneficiary account blocked | Contact bank |
invalid_rfc | RFC format invalid | Use valid RFC format |
amount_too_high | Exceeds withdrawal limits | Reduce amount |
Error response example
Error response example
SPEI Operating Schedule
Here are some information about the operating hours for SPEI transactions.Day/Period | Processing Hours | Notes |
---|---|---|
Monday to Friday | 6:00 AM – 6:00 PM (CDMX time) | Same-day processing if before 5:00 PM |
Saturday | 9:00 AM – 2:00 PM | Limited processing |
Sunday | No processing | |
Bank holidays | No processing |
Processing Times for WithdrawalsWithdrawals are processed according to the method and the time you submit your request:
- Same business day: Requests before 5:00 PM (CDMX) on business days are processed the same day.
- Next business day: Requests after 5:00 PM or on weekends are processed the next business day.
- Instant: Debit card withdrawals are instant, 24/7.
Best Practices
Here you’ll find some best practices to follow when processing withdrawals.Beneficiary Data
Beneficiary Data
- Validate RFC format – Make sure the RFC is in the correct format before you send it off.
- Verify CLABE numbers – Double-check the CLABE, including the checksum digit, to avoid rejections.
- Use correct institution codes – Always match the bank with the right institution code.
- Test with sandbox data – Run your integration in the sandbox first to catch any issues before going live.
Transaction Management
Transaction Management
- Implement status checking – Keep an eye on your withdrawals by checking their status regularly.
- Handle async processing – Set up webhooks so you get notified when the status changes.
- Store references – Save your own internal references for easy tracking and reconciliation.
- Retry failed transactions – Add retry logic for temporary hiccups, so you don’t miss a payout.
Security
Security
- Validate beneficiary data – Only pay out to legitimate recipients; double-check their details.
- Implement approval workflows – For big withdrawals, add a manual approval step to stay safe.
- Monitor for fraud – Keep an eye out for anything dodgy or out of the ordinary.
- Secure beneficiary storage – Make sure any stored beneficiary info is properly protected.
Error Recovery
Error Recovery
- Graceful failure handling – Give clear, helpful error messages if something goes wrong.
- Alternative methods – If one transfer method fails, offer another way to get the money out.
- Manual intervention – Be ready to step in and handle tricky cases by hand if needed.
- Customer communication – Keep your beneficiaries in the loop about what’s happening with their withdrawal.
Testing
Here you’ll find some information about the test bank accounts and cards that you can use to test your withdrawals.Test Bank Accounts
CLABE | Scenario | Expected Result |
---|---|---|
646180157000000004 | Successful transfer | processing status |
012345678901234567 | Invalid checksum | Validation error |
999999999999999999 | Non-existent bank | institution_not_found error |
Test Cards
Card Number | Scenario | Expected Result |
---|---|---|
4111111111111111 | Successful withdrawal | processing status |
4000000000000002 | Declined card | declined status |
5555555555554444 | Processing error | failed status |
Next Steps
- Review Response Format for handling withdrawal responses
- Set up Webhooks for real-time withdrawal notifications
- Check Error Handling for withdrawal error management
- Explore Mexican Banking Reference for additional bank information