Skip to main content

Overview

The Cheqpay API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
PCI Compliance for Card PaymentsWhen using the Payments API to process card payments with raw card data (card number, CVV, expiry), your business must maintain PCI DSS compliance.If your business is not PCI compliant, use our hosted payment page or JavaScript SDK instead. These options handle card data securely without requiring PCI compliance from your business.Contact support@cheqpay.mx to learn more about hosted payment options.

Base URLs

Sandbox

Use sandbox for testing and development. No real money is processed.

Production

Use production for processing live payments.

Authentication

Authenticate your API requests with your API key in the x-api-key header. The x-merchant-id header is optional:
Keep your API keys secure. Never share them publicly or commit them to version control.

Request Format

All POST requests should include:
Request body should be valid JSON:

Response Format

All responses are returned as JSON:

HTTP Status Codes

Key Endpoints

Payment Orders

Create and manage payment orders for card payments, SPEI transfers, PayCash cash payments, CIE Cash Net deposits, and batch processing.

Payment Orders Guide

Learn about payment orders

Card Payments Guide

Process card payments

Refunds

Issue full or partial refunds.

Refunds Guide

Learn how to process refunds

Customers

Retrieve customer information and saved payment methods.

Customers Guide

Learn about customer management

3D Secure Validation

Validate 3D Secure authentication after customer completes challenge.

3D Secure Guide

Learn about 3DS authentication

Common Fields

Amounts

Amounts are always specified in cents (minor currency units):

Currency

ISO 4217 currency codes:
Supported currencies:
  • MXN - Mexican Peso
  • USD - US Dollar

Dates

ISO 8601 format with timezone:

IDs

Two types of IDs for most resources:
Use externalId to link Cheqpay resources with your system and enable idempotency.

Payment Order Statuses

Idempotency

Use externalId to safely retry requests without creating duplicates:
If you send the same request twice:
  • Successful payment → Returns existing payment (no duplicate)
  • Failed payment → Creates new payment (allows retry)
Always use your order ID or transaction ID as the externalId.

Rate Limits

API requests are rate limited to ensure system stability:
  • Default limit: 100 requests per minute per API key
  • Burst limit: 10 requests per second
If you exceed limits, you’ll receive:
Contact support@cheqpay.mx if you need higher rate limits.

Pagination

List endpoints support pagination:
Response includes pagination metadata:

Versioning

The API version is part of the URL path, and it varies by resource:
  • Payment orders use v2 (e.g. /v2/payment-orders).
  • Subscriptions and plans use v1 (e.g. /v1/subscriptions, /v1/plans).
  • Some endpoints, such as customers and payment methods, have no version prefix.
Always use the path shown for each endpoint in its reference. We maintain backward compatibility and give advance notice of breaking changes.

Testing

Use the sandbox environment for testing:

Complete Testing Guide

Learn about test cards and scenarios

SDKs and Libraries

Official SDKs coming soon. Currently use the REST API directly with your preferred HTTP client.

OpenAPI Specification

Full OpenAPI specification coming soon. This will enable automatic API client generation for your preferred language.

API Endpoints Reference

View detailed endpoint documentation

Support

Need help with the API?

Email Support

Get help from our integration team

Testing Guide

Test your integration

Error Reference

View all error codes