Mexico
Check the requirements and validations made over the cashouts on Mexico

Required fields

Field
Format
Description
login
String
Cashouts login
pass
String
Cashouts pass
external_id
String (max length: 100)
Transaction's ID on your end
document_id
Beneficiary's document ID
country
MX
currency
MXN / USD
amount
Number with up to 2 decimals
Cashout amount
bank_code
See bank codes
Code specifying the beneficiary's bank. Only mandatory if the bank_account is a debit card
bank_account
Beneficiary's bank account
beneficiary_name
String (max length: 100)
Beneficiary's name
beneficiary_lastname
String (max length: 100)
Beneficiary's last name

Bank Account Validations

Bank name
Bank code
Format
Example
All
-
CLABE: 18 digits long, applies verifier algorithm
021790064060296642
All
-
DEBIT CARD: 15-16 digits long, applies verifier algorithm. Can only be sent through the Cashout to Debit Cards Endpoint
5344867217683750

CLABE validation algorithm

Click here for more information about CLABE format.
Since the first three digits of the CLABE are the bank code, it is not mandatory to send the bank_code field.
Java
Mexico CLABE validation algorithm in Java
1
public final class Validations {
2
static int CLABE_LENGTH = 18;
3
4
private static boolean validateClabeLength(String bankAcount) {
5
return bankAcount.length() == CLABE_LENGTH;
6
}
7
8
private static boolean validateClabe(String clabe) {
9
if (!validateClabeLength(clabe)) {
10
return false;
11
} else {
12
int sum = 0;
13
String clabeWithoutCd = clabe.substring(0, 17);
14
Integer[] array = new Integer[]{3, 7, 1};
15
16
int checkDigitToVerify;
17
for(checkDigitToVerify = 0; checkDigitToVerify < clabeWithoutCd.length(); ++checkDigitToVerify) {
18
int digit = clabeWithoutCd.charAt(checkDigitToVerify);
19
sum += digit * array[checkDigitToVerify % 3] % 10;
20
}
21
22
checkDigitToVerify = (10 - sum % 10) % 10;
23
int checkDigit = Integer.parseInt(clabe.substring(17));
24
return checkDigitToVerify == checkDigit;
25
}
26
}
27
}
28
29
Copied!

Document Validations

Click here to check document types and validations.

Example Request

1
{
2
"login": "xxxxxxxx",
3
"pass": "xxxxxxxx",
4
"external_id": "30000000001",
5
"country": "MX",
6
"currency": "MXN",
7
"amount": 100,
8
"document_id": "848392783",
9
"bank_account": "021790064060296642",
10
"beneficiary_name": "User",
11
"beneficiary_lastname": "Test",
12
"notification_url": "https://webhook.site/url",
13
"type": "json"
14
}
Copied!

Bank codes

Notice that the bank_code for Mexico is only mandatory if the bank_account length is between 15 and 16 (Debit Card). In that case, use the Credit Cards endpoint: https://cc-api-stg.directa24.com/v3/cashout
Bank
Code
BANAMEX
002
BANCOMEXT
006
BANOBRAS
009
BBVA BANCOMER
012
SANTANDER
014
BANJERCITO
019
HSBC
021
BAJIO
030
IXE
032
INBURSA
036
INTERACCIONES
037
MIFEL
042
SCOTIABANK
044
BANREGIO
058
INVEX
059
BANSI
060
AFIRME
062
BANORTE
072
THE ROYAL BANK
102
For the full and most up-to-date list of banks and its codes, please check the Cashout Bank Code endpoint.
Last modified 2mo ago