curl --request POST \
--url https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-merchant-id: <api-key>' \
--data '
{
"paymentMethod": {
"type": "card",
"cardDetails": {
"number": "4111111111111111",
"expiryMonth": "12",
"expiryYear": "25",
"cvc": "123"
}
},
"billingAddress": {
"address": "Av. Reforma 123",
"city": "Mexico City",
"state": "CDMX",
"postalCode": "01000",
"country": "MX"
}
}
'import requests
url = "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge"
payload = {
"paymentMethod": {
"type": "card",
"cardDetails": {
"number": "4111111111111111",
"expiryMonth": "12",
"expiryYear": "25",
"cvc": "123"
}
},
"billingAddress": {
"address": "Av. Reforma 123",
"city": "Mexico City",
"state": "CDMX",
"postalCode": "01000",
"country": "MX"
}
}
headers = {
"x-api-key": "<api-key>",
"x-merchant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-merchant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethod: {
type: 'card',
cardDetails: {number: '4111111111111111', expiryMonth: '12', expiryYear: '25', cvc: '123'}
},
billingAddress: {
address: 'Av. Reforma 123',
city: 'Mexico City',
state: 'CDMX',
postalCode: '01000',
country: 'MX'
}
})
};
fetch('https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethod' => [
'type' => 'card',
'cardDetails' => [
'number' => '4111111111111111',
'expiryMonth' => '12',
'expiryYear' => '25',
'cvc' => '123'
]
],
'billingAddress' => [
'address' => 'Av. Reforma 123',
'city' => 'Mexico City',
'state' => 'CDMX',
'postalCode' => '01000',
'country' => 'MX'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-merchant-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge"
payload := strings.NewReader("{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-merchant-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge")
.header("x-api-key", "<api-key>")
.header("x-merchant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-merchant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalMerchantReference": "ORDER-12345",
"amount": 250,
"orderNumber": "C25123101",
"currency": "MXN",
"status": "PENDING",
"description": "Payment for order #12345",
"metadata": {
"orderId": "ORD-123",
"source": "web"
},
"createdAt": "2025-10-20T10:00:00.000Z",
"paymentMethod": {
"type": "card",
"cardDetails": {
"last4": "1111",
"brand": "VISA",
"country": "US",
"expiryMonth": "12",
"expiryYear": "25"
}
},
"customer": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phoneNumber": "+525512345678"
}
}Charge a pending payment order
Processes payment for an existing payment order that was created with pending: true. This is the second step of the two-step payment flow. The order must be in PENDING status. Provide the payment method and optional billing/device information to process the charge. The persist flag on payment methods is not supported for this endpoint. This is an internal endpoint.
curl --request POST \
--url https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-merchant-id: <api-key>' \
--data '
{
"paymentMethod": {
"type": "card",
"cardDetails": {
"number": "4111111111111111",
"expiryMonth": "12",
"expiryYear": "25",
"cvc": "123"
}
},
"billingAddress": {
"address": "Av. Reforma 123",
"city": "Mexico City",
"state": "CDMX",
"postalCode": "01000",
"country": "MX"
}
}
'import requests
url = "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge"
payload = {
"paymentMethod": {
"type": "card",
"cardDetails": {
"number": "4111111111111111",
"expiryMonth": "12",
"expiryYear": "25",
"cvc": "123"
}
},
"billingAddress": {
"address": "Av. Reforma 123",
"city": "Mexico City",
"state": "CDMX",
"postalCode": "01000",
"country": "MX"
}
}
headers = {
"x-api-key": "<api-key>",
"x-merchant-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-merchant-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethod: {
type: 'card',
cardDetails: {number: '4111111111111111', expiryMonth: '12', expiryYear: '25', cvc: '123'}
},
billingAddress: {
address: 'Av. Reforma 123',
city: 'Mexico City',
state: 'CDMX',
postalCode: '01000',
country: 'MX'
}
})
};
fetch('https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethod' => [
'type' => 'card',
'cardDetails' => [
'number' => '4111111111111111',
'expiryMonth' => '12',
'expiryYear' => '25',
'cvc' => '123'
]
],
'billingAddress' => [
'address' => 'Av. Reforma 123',
'city' => 'Mexico City',
'state' => 'CDMX',
'postalCode' => '01000',
'country' => 'MX'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-merchant-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge"
payload := strings.NewReader("{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-merchant-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge")
.header("x-api-key", "<api-key>")
.header("x-merchant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-merchant-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethod\": {\n \"type\": \"card\",\n \"cardDetails\": {\n \"number\": \"4111111111111111\",\n \"expiryMonth\": \"12\",\n \"expiryYear\": \"25\",\n \"cvc\": \"123\"\n }\n },\n \"billingAddress\": {\n \"address\": \"Av. Reforma 123\",\n \"city\": \"Mexico City\",\n \"state\": \"CDMX\",\n \"postalCode\": \"01000\",\n \"country\": \"MX\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalMerchantReference": "ORDER-12345",
"amount": 250,
"orderNumber": "C25123101",
"currency": "MXN",
"status": "PENDING",
"description": "Payment for order #12345",
"metadata": {
"orderId": "ORD-123",
"source": "web"
},
"createdAt": "2025-10-20T10:00:00.000Z",
"paymentMethod": {
"type": "card",
"cardDetails": {
"last4": "1111",
"brand": "VISA",
"country": "US",
"expiryMonth": "12",
"expiryYear": "25"
}
},
"customer": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phoneNumber": "+525512345678"
}
}Authorizations
API key for authentication (required)
Merchant ID for identifying the merchant (required)
Path Parameters
Payment order ID
Body
Request body for charging a pending payment order. The persist flag is not supported when charging a pending order.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Billing address (required when paymentMethod.type is 'card')
Show child attributes
Show child attributes
Device and browser information for fraud detection
Show child attributes
Show child attributes
Whether the payment originates from a Virtual Terminal. When true, the 3DS flow is skipped in the Decision Manager.
Response
Payment order charged successfully
Payment order unique identifier
"123e4567-e89b-12d3-a456-426614174000"
Total amount charged to the customer (subtotalAmount + surchargeAmount).
257.5
Currency code
"MXN"
Payment order status
PENDING, PROCESSING, REFERENCE_GENERATED, AUTHORIZED, PARTIALLY_AUTHORIZED, ACTION_REQUIRED, COMPLETED, PARTIALLY_PAID, CANCELLATION_REQUESTED, CANCELLED, FAILED, REFUND_PROCESSING, PARTIALLY_REFUNDED, REFUNDED "PENDING"
External merchant reference ID
"ORDER-12345"
Merchandise subtotal — the amount agreed before any surcharge. Immutable after order creation.
250
Surcharge applied on top of subtotalAmount. Null when no surcharge applies.
7.5
Snapshot of the merchant's surcharge rate (percent) at charge time. Null when no surcharge applies.
3
System-generated order number
"C25123101"
Payment order description
"Payment for order #12345"
Arbitrary JSON metadata stored with the payment order
{ "orderId": "ORD-123", "source": "web" }
Due date for the payment order
"2026-04-15T00:00:00.000Z"
Creation timestamp
"2025-10-20T10:00:00.000Z"
Show child attributes
Show child attributes
Echoes the allowPartials flag from creation. When true, the order accepts additional Payments via the addPayment endpoint until it is fully covered.
true
Cumulative sum of captured amounts on this order. On split-tender orders that get partially refunded and re-paid, this can grow beyond amount because it is a historical ledger; use amountPending (or compute amountPaid - amountRefunded) to know the live balance.
200
Outstanding amount left to cover, derived as max(0, amount - (amountPaid - amountRefunded)). Reaches 0 when the order is fully paid net of refunds.
50
Cumulative sum of refunded amounts across the order's Payments. Like amountPaid, this is a historical ledger and is bounded per Payment by module-payment.
50
The Payment that triggered this response (the one just created for the addPayment / charge call, or the original Payment for a regular create).
Show child attributes
Show child attributes
All Payments associated with this order, ordered by creation time (oldest first), including the one in the payment field. Useful for split-tender clients that need to enumerate every Payment.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
3DS authentication details (when required)
Show child attributes
Show child attributes