Skip to main content
This guide explains how to create a withdrawal request using the Tonder Withdrawals API endpoint POST /withdrawals/.
Authentication RequiredEvery request to this endpoint requires authentication. You must include the Authorization header with your API token. This applies to all API requests, Postman requests, and testing. See Authentication requirements for details.

Endpoint

Required Parameters

The following table lists all mandatory parameters for creating a new withdrawal request:
Critical: Latitude and Longitude Required for MexicoThe metadata.latitude and metadata.longitude fields are mandatory for processing withdrawals in Mexico. Omitting these fields or providing erroneous coordinates will result in a failed transaction. Ensure you collect and validate accurate geolocation data from your customers.

Optional Parameters

Testing Institution CodeWhen testing in the Stage environment, you must use institution code 97846 for the beneficiary_institution field. This is a special test code that simulates bank responses.

Request Examples

SPEI Transfer

Debit Card Transfer with RFC

Debit Card Transfer with CURP

Debit Card Transfer without Document (ND)

DEBIT_CARD Identification OptionsFor DEBIT_CARD transfers, you can use:
  • beneficiary_rfc with a valid RFC
  • beneficiary_curp with a valid CURP
  • beneficiary_rfc with value "ND" (No Disponible) if no document is available
For SPEI transfers, beneficiary_rfc is required (can be "ND").

cURL Example

Postman ConfigurationWhen testing in Postman, ensure you include the Authorization header:
  1. Method: POST
  2. URL: https://stage.tonder.io/api/v1/withdrawals/
  3. Headers Tab:
    • Authorization: Token YOUR_API_KEY (replace with your actual token)
    • Content-Type: application/json
  4. Body Tab: Select raw and JSON, then paste your request JSON
Important: Replace YOUR_API_KEY with the token provided in the Developers section of the Tonder platform. Every request requires this authentication header.

Response

Upon successful creation, the API returns a withdrawal object with a PENDING status and a unique withdrawal ID:

SPEI Response Example

DEBIT_CARD Response Example

Save the Withdrawal IDAlways save the id field from the response. You’ll need it to track the withdrawal status and receive webhook notifications.

Parameter Details

Transfer Methods

  • SPEI: Bank transfers processed same business day during banking hours. Requires 18-digit CLABE.
  • DEBIT_CARD: Instant deposits available within 5-15 minutes, 24/7. Requires 16-digit card number.

Fee Models

  • 00: User pays fees - fees are deducted from the withdrawal amount
  • 01: Merchant pays fees - fees are charged separately to the merchant

Metadata Requirements

The metadata object must include:
  • latitude: Geographic latitude (string or decimal)
  • longitude: Geographic longitude (string or decimal)
Optional metadata fields you can include:
  • operation_date: Date of the operation (format: “YYYY-MM-DD”)
  • customer_email: Customer email address
  • business_user: Business user identifier
  • customer_id: Your internal customer ID
  • order_id: Your internal order ID
These fields are useful for tracking and reporting purposes.

Institution Codes

For production withdrawals, you need to use valid institution codes. See the Institution Codes Reference for the complete list of Mexican financial institutions.
Testing vs Production
  • Testing: Always use institution code 97846 in the Stage environment
  • Production: Use real institution codes from the Institution Codes Reference

Next Steps