Initiate 3DS payer authentication
curl --request POST \
--url https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-merchant-id: <api-key>' \
--data '
{
"deviceInformation": {
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0",
"userAgentBrowserValue": "Chrome/120.0",
"httpAcceptBrowserValue": "text/html,application/xhtml+xml",
"httpBrowserLanguage": "en-US",
"httpBrowserJavaScriptEnabled": true,
"httpBrowserScreenWidth": "1920",
"httpBrowserScreenHeight": "1080"
},
"collectionReferenceId": "col_123456789",
"returnUrl": "https://example.com/return"
}
'import requests
url = "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication"
payload = {
"deviceInformation": {
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0",
"userAgentBrowserValue": "Chrome/120.0",
"httpAcceptBrowserValue": "text/html,application/xhtml+xml",
"httpBrowserLanguage": "en-US",
"httpBrowserJavaScriptEnabled": True,
"httpBrowserScreenWidth": "1920",
"httpBrowserScreenHeight": "1080"
},
"collectionReferenceId": "col_123456789",
"returnUrl": "https://example.com/return"
}
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({
deviceInformation: {
ipAddress: '192.168.1.1',
userAgent: 'Mozilla/5.0',
userAgentBrowserValue: 'Chrome/120.0',
httpAcceptBrowserValue: 'text/html,application/xhtml+xml',
httpBrowserLanguage: 'en-US',
httpBrowserJavaScriptEnabled: true,
httpBrowserScreenWidth: '1920',
httpBrowserScreenHeight: '1080'
},
collectionReferenceId: 'col_123456789',
returnUrl: 'https://example.com/return'
})
};
fetch('https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication', 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}/payer-authentication",
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([
'deviceInformation' => [
'ipAddress' => '192.168.1.1',
'userAgent' => 'Mozilla/5.0',
'userAgentBrowserValue' => 'Chrome/120.0',
'httpAcceptBrowserValue' => 'text/html,application/xhtml+xml',
'httpBrowserLanguage' => 'en-US',
'httpBrowserJavaScriptEnabled' => true,
'httpBrowserScreenWidth' => '1920',
'httpBrowserScreenHeight' => '1080'
],
'collectionReferenceId' => 'col_123456789',
'returnUrl' => 'https://example.com/return'
]),
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}/payer-authentication"
payload := strings.NewReader("{\n \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\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}/payer-authentication")
.header("x-api-key", "<api-key>")
.header("x-merchant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication")
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 \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "ORDER-123",
"status": "PAYER_AUTHENTICATION_CHALLENGE_REQUIRED",
"amount": 250,
"currency": "MXN",
"payerAuthentication": {
"id": "payer-auth-123",
"url": "https://bank.example.com/authenticate",
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}{
"message": "Validation failed",
"errors": [
{
"field": "name",
"message": "Required"
}
]
}{
"message": "Invalid api key"
}{
"message": "Merchant not found"
}{
"message": "Error message"
}Payment Order
Initiate 3DS payer authentication
Initiates 3D Secure (3DS) payer authentication for a payment order. This endpoint must be called when a payment order is in PAYER_AUTHENTICATION_DEVICE_DATA_REQUIRED status. It processes device information and returns authentication details for completing the 3DS challenge.
POST
/
v2
/
payment-orders
/
{id}
/
payer-authentication
Initiate 3DS payer authentication
curl --request POST \
--url https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-merchant-id: <api-key>' \
--data '
{
"deviceInformation": {
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0",
"userAgentBrowserValue": "Chrome/120.0",
"httpAcceptBrowserValue": "text/html,application/xhtml+xml",
"httpBrowserLanguage": "en-US",
"httpBrowserJavaScriptEnabled": true,
"httpBrowserScreenWidth": "1920",
"httpBrowserScreenHeight": "1080"
},
"collectionReferenceId": "col_123456789",
"returnUrl": "https://example.com/return"
}
'import requests
url = "https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication"
payload = {
"deviceInformation": {
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0",
"userAgentBrowserValue": "Chrome/120.0",
"httpAcceptBrowserValue": "text/html,application/xhtml+xml",
"httpBrowserLanguage": "en-US",
"httpBrowserJavaScriptEnabled": True,
"httpBrowserScreenWidth": "1920",
"httpBrowserScreenHeight": "1080"
},
"collectionReferenceId": "col_123456789",
"returnUrl": "https://example.com/return"
}
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({
deviceInformation: {
ipAddress: '192.168.1.1',
userAgent: 'Mozilla/5.0',
userAgentBrowserValue: 'Chrome/120.0',
httpAcceptBrowserValue: 'text/html,application/xhtml+xml',
httpBrowserLanguage: 'en-US',
httpBrowserJavaScriptEnabled: true,
httpBrowserScreenWidth: '1920',
httpBrowserScreenHeight: '1080'
},
collectionReferenceId: 'col_123456789',
returnUrl: 'https://example.com/return'
})
};
fetch('https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication', 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}/payer-authentication",
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([
'deviceInformation' => [
'ipAddress' => '192.168.1.1',
'userAgent' => 'Mozilla/5.0',
'userAgentBrowserValue' => 'Chrome/120.0',
'httpAcceptBrowserValue' => 'text/html,application/xhtml+xml',
'httpBrowserLanguage' => 'en-US',
'httpBrowserJavaScriptEnabled' => true,
'httpBrowserScreenWidth' => '1920',
'httpBrowserScreenHeight' => '1080'
],
'collectionReferenceId' => 'col_123456789',
'returnUrl' => 'https://example.com/return'
]),
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}/payer-authentication"
payload := strings.NewReader("{\n \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\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}/payer-authentication")
.header("x-api-key", "<api-key>")
.header("x-merchant-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/pos/v2/payment-orders/{id}/payer-authentication")
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 \"deviceInformation\": {\n \"ipAddress\": \"192.168.1.1\",\n \"userAgent\": \"Mozilla/5.0\",\n \"userAgentBrowserValue\": \"Chrome/120.0\",\n \"httpAcceptBrowserValue\": \"text/html,application/xhtml+xml\",\n \"httpBrowserLanguage\": \"en-US\",\n \"httpBrowserJavaScriptEnabled\": true,\n \"httpBrowserScreenWidth\": \"1920\",\n \"httpBrowserScreenHeight\": \"1080\"\n },\n \"collectionReferenceId\": \"col_123456789\",\n \"returnUrl\": \"https://example.com/return\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"externalId": "ORDER-123",
"status": "PAYER_AUTHENTICATION_CHALLENGE_REQUIRED",
"amount": 250,
"currency": "MXN",
"payerAuthentication": {
"id": "payer-auth-123",
"url": "https://bank.example.com/authenticate",
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}{
"message": "Validation failed",
"errors": [
{
"field": "name",
"message": "Required"
}
]
}{
"message": "Invalid api key"
}{
"message": "Merchant not found"
}{
"message": "Error message"
}Authorizations
API key for authentication (required)
Merchant ID for identifying the merchant (required)
Path Parameters
Payment order ID
Body
application/json
Response
Payer authentication initiated successfully
Payment order ID
Example:
"123e4567-e89b-12d3-a456-426614174000"
Payment order status (typically PAYER_AUTHENTICATION_CHALLENGE_REQUIRED after this call)
Available options:
PENDING, PROCESSING, REFERENCE_GENERATED, AUTHORIZED, PARTIALLY_AUTHORIZED, ACTION_REQUIRED, PAYER_AUTHENTICATION_CHALLENGE_REQUIRED, COMPLETED, PARTIALLY_PAID, CANCELLATION_REQUESTED, CANCELLED, FAILED, REFUND_PROCESSING, PARTIALLY_REFUNDED, REFUNDED Example:
"PAYER_AUTHENTICATION_CHALLENGE_REQUIRED"
External payment order ID
Example:
"ORDER-123"
Payment amount
Example:
250
Currency code
Example:
"MXN"
Customer details
3DS authentication details
Show child attributes
Show child attributes