Credit and Debit Cards
This page describes Mexico-specific requirements for the Create a Purchase operation. Refer to the Create a Purchase guide for the full parameter list and base definitions.
Request parameters for Mexico
The following table lists all relevant fields for processing a purchase in Mexico.
The antifraud system is mandatory in this country. Please consult your Technical Account Manager.
| Property | Type | Description |
|---|---|---|
Customer → FirstName | string | Customer’s first name. Required for anti-fraud validation. |
Customer → LastName | string | Customer’s last name. Required for anti-fraud validation. |
Customer → DocumentNumber | string | Recommended. Identification number. |
Customer → DocumentType | string | Recommended. Type of identification document used by the payer. |
Customer → PhoneNumber | string | Recommended. Customer’s phone number, including area code. |
Customer → Address → Country | string | Must be "MX".Recommended |
Customer → Address → State | string | State of residence. Recommended |
Customer → Address → City | string | City of residence. Recommended |
Customer → Address → AddressDetail | string | Street and address details. Recommended |
Customer → Address → PostalCode | string | Postal code (ZIP). Recommended |
Installments | integer | Number of installments. Accepted values: 1, 3, 6, 9, 12. Default is 1. |
AntifraudData → AntifraudFingerprintId | string | Mandatory for Antifraud evaluation |
AntifraudData → ClientIP | string | Required for Antifraud. IP address of the payer. Required when antifraud device data is sent. |
Fields not marked as required are strongly recommended as part of antifraud best practices.
For full details on how to implement device fingerprinting, IP tracking, and session validation, refer to the Antifraud section.
This payment methods use an API flow. The response to the purchase request will include the final status (
COMPLETED,REJECTED, etc.), without redirection.
Request example using Token
To test this endpoint, use the API Reference or the Postman Collection.
{
"TrxToken": "OT__mx_YXo26D1Ma1oQzUoLb5aR2f8_BpWdnkXe7TgG9V6r3qH",
"UniqueID": "mx-order-10001",
"Capture": true,
"TargetCountryISO": "MX",
"Currency": "MXN",
"Amount": 185000,
"Installments": 3,
"Order": "MX-INV-10001",
"Description": "Compra en línea - Pedido 10001",
"Customer": {
"FirstName": "Carlos",
"LastName": "Ramírez",
"ReferenceCode": "CLI-MX-001",
"PhoneNumber": "5512345678",
"DocumentNumber": "RAMC850101HDFLRS09",
"DocumentType": "RFC",
"Email": "[email protected]",
"Address": {
"Country": "MX",
"City": "Ciudad de México",
"State": "CDMX",
"PostalCode": "01090",
"AddressDetail": "Avenida Insurgentes Sur 1234, Piso 5"
}
},
"CustomerIP": "187.210.35.98",
"AntifraudData": {
"AntifraudFingerprintId": "b3f48ae2-1174-4d62-a8e3-b49bc4e17a55"
}
}Request example using Card Data
To test this endpoint, use the API Reference or the Postman Collection
{
"CardData": {
"CardHolderName": "Carlos Ramírez",
"Pan": "4507990000004905",
"CVV": "123",
"Expiration": "08/30",
"Email": "[email protected]",
"Document": "RAMC850101HDFLRS09"
},
"UniqueID": "mx-order-10002",
"Capture": true,
"TargetCountryISO": "MX",
"Currency": "MXN",
"Amount": 185000,
"Installments": 3,
"Order": "MX-INV-10002",
"Description": "Compra en línea - Prueba tarjeta",
"Customer": {
"FirstName": "Carlos",
"LastName": "Ramírez",
"ReferenceCode": "CLI-MX-002",
"PhoneNumber": "5512345678",
"DocumentNumber": "RAMC850101HDFLRS09",
"DocumentType": "RFC",
"Email": "[email protected]",
"Address": {
"Country": "MX",
"City": "Ciudad de México",
"State": "CDMX",
"PostalCode": "01090",
"AddressDetail": "Avenida Insurgentes Sur 1234, Piso 5"
}
},
"CustomerIP": "187.210.35.98",
"AntifraudData": {
"AntifraudFingerprintId": "b3f48ae2-1174-4d62-a8e3-b49bc4e17a55"
}
}Response parameters
For more information on the response parameters, please refer to the Response parameters section of the Purchase creation.
Testing cards
Use the following cards to simulate the different statuses of a purchase.
| Brand | PAN | CVV | Expiration Date |
|---|---|---|---|
| Visa | 4111111111111111 | 123 | 10/29 |
| Visa | 4242424242424242 | 123 | 10/29 |
| MasterCard | 5555555555554444 | 123 | 10/29 |
| MasterCard | 5105105105105100 | 123 | 10/29 |
| Amex | 345678000000007 | 1234 | 10/29 |
| Amex | 341111111111111 | 1234 | 10/29 |
| Amex | 343434343434343 | 1234 | 10/29 |
| Carnet | 5062541600005232 | 123 | 10/29 |
| Carnet | 5064050100000063 | 123 | 10/29 |
| Carnet | 5064510000300020 | 123 | 10/29 |
Discover the API
Once you’re familiar with how to create a purchase, you can test your integration using our API Reference:
Updated 4 months ago
