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

CustomerFirstName

string

Customer’s first name. Required for anti-fraud validation.

CustomerLastName

string

Customer’s last name. Required for anti-fraud validation.

CustomerDocumentNumber

string

Recommended. Identification number.

CustomerPhoneNumber

string

Recommended. Customer’s phone number, including area code.

CustomerAddressCountry

string

Must be "MX".
Recommended

CustomerAddressState

string

State of residence. Recommended

CustomerAddressCity

string

City of residence. Recommended

CustomerAddressAddressDetail

string

Street and address details. Recommended

CustomerAddressPostalCode

string

Postal code (ZIP). Recommended

Installments

integer

Number of installments. Accepted values: 1, 3, 6, 9, 12. Default is 1.

AntifraudDataAntifraudFingerprintId

string

Mandatory for Antifraud evaluation

AntifraudDataClientIP

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",
    "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.




Testing cards

Use the following cards to simulate the different statuses of a purchase.

BrandPANCVVExpiration Date
Visa411111111111111112310/29
Visa424242424242424212310/29
MasterCard555555555555444412310/29
MasterCard510510510510510012310/29
Amex345678000000007123410/29
Amex341111111111111123410/29
Amex343434343434343123410/29
Carnet506254160000523212310/29
Carnet506405010000006312310/29
Carnet506451000030002012310/29


Discover the API

Once you’re familiar with how to create a purchase, you can test your integration using our API Reference: