Understanding Payment Orders
Every payment you process creates a payment order. Track the status, retrieve transaction details, and prevent duplicate charges automatically.Create a Payment Order
Create a payment order to process card payments, SPEI transfers, or batch payments. Each payment type uses the same endpoint with different payment method configurations.Card Payment Example
Response
Required Fields
| 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) |
customer.firstName | string | Yes | Customer’s first name |
customer.lastName | string | Yes | Customer’s last name |
customer.email | string | Yes | Customer’s email address |
paymentMethod.type | string | Yes | Payment type (card, spei, etc.) |
Card Payments
Accept credit and debit cards
SPEI Transfers
Bank transfers in Mexico
Batch Payments
Process multiple payments
Order Status
Payment orders move through different states as they process:| Status | Description | Action |
|---|---|---|
PENDING | Payment is being processed | Wait for completion |
PROCESSING | Payment in progress | Wait for completion |
AUTHORIZED | Payment authorized but not captured | Capture or void authorization |
PARTIALLY_AUTHORIZED | Partial amount authorized | Review and process partial amount |
ACTION_REQUIRED | Additional action needed | Check order details for next steps |
COMPLETED | Payment successful ✓ | Fulfill the order |
PARTIALLY_PAID | Partial payment received | Track remaining balance |
FAILED | Payment declined | Show error to customer |
PAYER_AUTHENTICATION_DEVICE_DATA_REQUIRED | 3DS device data collection needed | Show invisible data collection iframe |
PAYER_AUTHENTICATION_CHALLENGE_REQUIRED | 3DS challenge verification needed | Show authentication challenge iframe |
CANCELLATION_REQUESTED | Cancellation in progress | Wait for cancellation to complete |
CANCELLED | Payment cancelled | Order cancelled |
REFUND_PROCESSING | Refund is being processed | Wait for refund completion |
PARTIALLY_REFUNDED | Partial refund issued | Update order total |
REFUNDED | Fully refunded | Order fully refunded |
Common Statuses: Most payment orders will only see
PENDING → PROCESSING → COMPLETED. The other statuses handle specific scenarios like 3DS authentication, authorizations, cancellations, and refunds.Status Flow
3D Secure Flow (Summary)
When 3DS is required, the flow adds three steps:- Collect device data (invisible iframe) when status is
PAYER_AUTHENTICATION_DEVICE_DATA_REQUIRED. - Check enrollment:
POST /v2/payment-orders/:id/payer-authentication→ result may beCOMPLETED,FAILED, orPAYER_AUTHENTICATION_CHALLENGE_REQUIRED. - If a challenge is required, display the challenge iframe using
stepUpUrlandjwt, then validate withPOST /v2/payment-orders/:id/payer-authentication/validate.
The authentication method (SMS, biometrics, app, etc.) is decided by the issuing bank, not by Cheqpay or the merchant, and can vary per transaction.
Full 3D Secure Guide
See detailed implementation steps and examples
Track Your Orders
Every payment order has two IDs:- Cheqpay ID - Our internal reference (e.g.,
ord_abc123) - External ID - Your order or transaction ID (e.g.,
order-12345)
Retrieve an Order
Use either ID to retrieve order details:Example Request
Example Response
What’s Included
Payment Status
Payment Status
Current status and timestamps for all state changes
Customer Information
Customer Information
Complete customer details including contact information
Payment Method Details
Payment Method Details
Masked card information or payment method used
Transaction Amounts
Transaction Amounts
Original amount, refunded amounts, and net total
Complete Timeline
Complete Timeline
Created, processed, completed, and updated timestamps
Prevent Duplicate Charges
Cheqpay automatically prevents duplicate payments using theexternalId field. If you send the same request twice, we’ll handle it intelligently:
Smart Duplicate Detection
Payment Successful
Returns existing payment (no duplicate charge)
Payment Pending
Returns pending payment (no new request)
Payment Failed
Creates new payment (allows retry)
How It Works
1
First Request
You create a payment with
externalId: "order-12345" and it succeeds.2
Duplicate Request
Network issue causes the request to be sent again with the same
externalId.3
Protected
Cheqpay recognizes the duplicate and returns the existing successful payment. No duplicate charge.
Best Practice
List Payment Orders
Retrieve a list of payment orders for reporting and reconciliation:Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (default: 20, max: 100) |
offset | integer | Pagination offset (default: 0) |
status | string | Filter by status |
customerId | string | Filter by customer ID |
startDate | date | Filter from date (ISO 8601) |
endDate | date | Filter to date (ISO 8601) |