Documentation Index
Fetch the complete documentation index at: https://docs.cheqpay.mx/llms.txt
Use this file to discover all available pages before exploring further.
Accept Card Payments
Accept card payments in a single API request. Process credit and debit cards from Visa, Mastercard, and American Express through a unified checkout experience.Create a Card Payment
Complete Request Example
Successful Response
What Happens During Payment
Customer Created or Updated
Cheqpay creates a new customer record or updates an existing one based on the
externalId.Required Fields
Payment Information
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Your unique order ID |
amount | integer | Yes | Amount in cents (10000 = $100.00) |
currency | string | Yes | ISO currency code (MXN, USD) |
description | string | No | Payment description |
Customer Information
| Field | Type | Required | Description |
|---|---|---|---|
customer.firstName | string | Yes | Customer’s first name |
customer.lastName | string | Yes | Customer’s last name |
customer.email | string | Yes | Customer’s email address |
customer.phoneNumber | string | No | Phone with country code |
customer.externalId | string | No | Your customer ID |
Card Details
| Field | Type | Required | Description |
|---|---|---|---|
paymentMethod.type | string | Yes | Must be “card” |
paymentMethod.cardDetails.number | string | Yes | Card number (13-19 digits) |
paymentMethod.cardDetails.expiryMonth | string | Yes | Expiry month (01-12) |
paymentMethod.cardDetails.expiryYear | string | Yes | Expiry year (2-digit YY format, e.g., “25” for 2025) |
paymentMethod.cardDetails.cvc | string | Yes | Card security code |
Billing Address (Required)
Billing address is required for all card payments:Save Cards for Future Use
Enable one-click checkout by saving the card:paymentMethodId you can use for future charges:
Learn More About Saved Cards
View complete payment methods documentation
Charge a Saved Card
Use a previously saved card with just the payment method ID:Handle Authentication (3D Secure)
Some payments require 3D Secure authentication. When this happens, the status will bePAYER_AUTHENTICATION_CHALLENGE_REQUIRED:
Complete 3D Secure Guide
Learn how to implement 3D Secure authentication
Improve Approval Rates
Include Device Information
Sending device data helps banks assess risk and approve more payments:Best Practices
Include Billing Address
Include Billing Address
Billing address verification helps prevent fraud and improves approval rates by 3-5%.
Send Device Data
Send Device Data
Device information enables better fraud detection and smoother 3D Secure flows.
Use Consistent Customer Data
Use Consistent Customer Data
Keep customer information consistent across payments for better approval rates.
Save Payment Methods
Save Payment Methods
Returning customers with saved cards have higher approval rates.
Error Handling
Handle declined payments gracefully:Error Handling Guide
Learn how to handle errors and declined payments
Testing
Use these test cards in sandbox:| Card Number | Brand | Result |
|---|---|---|
| 4000000000002503 | Visa | Successful payment |
| 5200000000002151 | Mastercard | Successful payment |
| 4000000000000002 | Visa | Card declined |
Complete Testing Guide
View all test scenarios and cards
Next Steps
Handle 3D Secure
Implement card authentication
Save Payment Methods
Store cards for returning customers
Process Refunds
Issue full or partial refunds
Set Up Webhooks
Get real-time payment notifications