Skip to main content

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.
PCI Compliance RequiredIf you integrate directly with the Payments API and handle raw card data (card number, CVV, expiry), your business must be PCI DSS compliant. This involves annual security audits, network scans, and strict security controls.Not PCI compliant? Use our hosted payment page or JavaScript SDK instead - these solutions keep card data off your servers and remove PCI compliance requirements from your business.Contact support@cheqpay.mx to learn about hosted payment options.

Create a Card Payment

Complete Request Example

Successful Response

What Happens During Payment

1

Customer Created or Updated

Cheqpay creates a new customer record or updates an existing one based on the externalId.
2

Card Tokenized

The card is securely tokenized. Sensitive data never touches your servers.
3

Authorization

The payment is authorized by the card network (Visa, Mastercard, Amex).
4

Funds Captured

Funds are captured immediately upon successful authorization.
5

Status Updated

Payment status updates to COMPLETED and you can fulfill the order.
6

Customer Notified

Customer receives a confirmation email (if notifications are enabled).
The entire process typically takes 2-5 seconds for successful payments.

Card Surcharge

Merchants enrolled in the surcharge program can pass the card processing fee on to the cardholder. When active, the payment order’s total is increased by the surcharge and satisfies:
How it works:
  • The surcharge is configured at the merchant level in Cheqpay Suite: a percentage rate applied over the order subtotal, with an optional per-transaction cap. The program must be enabled for your account by Cheqpay and switched on by you.
  • It applies to card payments only — SPEI and cash methods are never surcharged; if the customer pays an order with a non-card method, the order is charged at the subtotal with no surcharge.
  • By default it applies to credit cards and American Express only (debit cards are not surcharged). An “all cards” mode is available on request.
  • Because the card type is only known when the customer presents the card, the surcharge is computed per charge attempt, and the order amount is re-derived at that point.
  • The applied values are returned on the payment order object as surchargeAmount and surchargeRate (the rate is a snapshot of your configuration at charge time), and a payer-facing line-item label can be configured.
If your integration validates order totals, always compare against subtotalAmount for your merchandise total and treat amount as subtotalAmount + surchargeAmount — a card charge may legitimately exceed the subtotal you requested.

Required Fields

Payment Information

Customer Information

Card Details

Billing Address (Required)

Billing address is required for all card payments:
Billing address is required when processing card payments. Including complete billing information also helps improve approval rates by 3-5%.

Save Cards for Future Use

Enable one-click checkout by saving the card:
The response includes a 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:
Always collect the CVC for saved card payments. This improves approval rates and reduces fraud.

Handle Authentication (3D Secure)

Some payments require 3D Secure authentication. When this happens, the status will be PAYER_AUTHENTICATION_CHALLENGE_REQUIRED:
You’ll need to show an authentication challenge to the customer.

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

Billing address verification helps prevent fraud and improves approval rates by 3-5%.
Device information enables better fraud detection and smoother 3D Secure flows.
Keep customer information consistent across payments for better approval rates.
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:

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