Credit and Debit Cards
Learn how to integrate your solution to process credit or debit card payments. You can create the purchase using the API or a redirection flow.
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’s first name. Required for anti-fraud validation. |
|
| Customer’s last name. Required for anti-fraud validation. |
|
| Recommended. Identification number. |
|
| Recommended. Customer’s phone number, including area code. |
|
| Must be |
|
| State of residence. Recommended |
|
| City of residence. Recommended |
|
| Street and address details. Recommended |
|
| Postal code (ZIP). Recommended |
|
| Number of installments. Accepted values: |
|
| Mandatory for Antifraud evaluation |
|
| 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",
"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",
"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.
Review Create Purchase Guide
Check the global request and response rules before building your request.
Try it in API Reference
Test the endpoint directly and explore real request/response examples.
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:
Country Requirements
See what documents, currencies, and formats apply per country and payment method.
Create a Payment
Explore the request and response parameters in the API Reference.
Error Codes
Understand the possible error responses and how to handle them.
Updated 8 days ago
