curl --request GET \
--url https://api.sandbox.cheqpay.mx/lps/invoices \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.cheqpay.mx/lps/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.cheqpay.mx/lps/invoices', 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/lps/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.cheqpay.mx/lps/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.cheqpay.mx/lps/invoices")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/lps/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"paymentOrderId": "<string>",
"paymentLinkId": "<string>",
"reference": "<string>",
"externalId": "<string>",
"orderNumber": "<string>",
"invoiceNumber": "<string>",
"products": [
{
"name": "<string>",
"qty": 2,
"price": 1,
"total": 1,
"id": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"isQtyAdjustable": true,
"minQty": 123,
"maxQty": 123
}
],
"totals": {
"total": 123,
"subtotal": 123,
"taxes": 123,
"shipping": 123,
"fees": 123,
"discounts": 123,
"surcharge": 123,
"surchargeRate": 123
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"isSameAsShipping": true
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"paymentMethod": {
"type": "card",
"card": {
"bin": "<string>",
"brand": "<string>",
"country": "<string>",
"expiryMonth": "<string>",
"expiryYear": "<string>",
"issuerBank": "<string>",
"last4": "<string>",
"type": "<string>"
},
"spei": {
"clabe": "<string>"
},
"cieCashNet": {
"reference": "CIE0000000001",
"convenio": "0123456789",
"clabe": "012345678901234567"
}
},
"status": "pending",
"customFields": [
{
"label": "<string>",
"type": "text",
"value": "<string>"
}
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"currentPage": 1,
"totalPages": 5,
"totalCount": 47,
"limit": 10
}{
"message": "Validation failed"
}{
"message": "Unauthorized"
}{
"message": "Internal server error"
}List invoices
List invoices with pagination, filtering, and sorting. Results are automatically filtered by the authenticated merchant unless a different merchantId is provided. The metadata field is excluded from the response.
curl --request GET \
--url https://api.sandbox.cheqpay.mx/lps/invoices \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.cheqpay.mx/lps/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.cheqpay.mx/lps/invoices', 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/lps/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.cheqpay.mx/lps/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.cheqpay.mx/lps/invoices")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/lps/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"paymentOrderId": "<string>",
"paymentLinkId": "<string>",
"reference": "<string>",
"externalId": "<string>",
"orderNumber": "<string>",
"invoiceNumber": "<string>",
"products": [
{
"name": "<string>",
"qty": 2,
"price": 1,
"total": 1,
"id": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"isQtyAdjustable": true,
"minQty": 123,
"maxQty": 123
}
],
"totals": {
"total": 123,
"subtotal": 123,
"taxes": 123,
"shipping": 123,
"fees": 123,
"discounts": 123,
"surcharge": 123,
"surchargeRate": 123
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"isSameAsShipping": true
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"paymentMethod": {
"type": "card",
"card": {
"bin": "<string>",
"brand": "<string>",
"country": "<string>",
"expiryMonth": "<string>",
"expiryYear": "<string>",
"issuerBank": "<string>",
"last4": "<string>",
"type": "<string>"
},
"spei": {
"clabe": "<string>"
},
"cieCashNet": {
"reference": "CIE0000000001",
"convenio": "0123456789",
"clabe": "012345678901234567"
}
},
"status": "pending",
"customFields": [
{
"label": "<string>",
"type": "text",
"value": "<string>"
}
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"currentPage": 1,
"totalPages": 5,
"totalCount": 47,
"limit": 10
}{
"message": "Validation failed"
}{
"message": "Unauthorized"
}{
"message": "Internal server error"
}Authorizations
API key for merchant authentication
Query Parameters
Page number (1-indexed)
x >= 1Number of items per page
1 <= x <= 100Merchant ID to filter by (defaults to authenticated merchant if not provided)
^[a-f\d]{24}$Filter by invoice status
pending, paid, cancelled, refunded, failed Filter invoices created from this date (ISO 8601 datetime)
Filter invoices created until this date (ISO 8601 datetime)
Field to sort by
createdAt Sort order
asc, desc Response
Invoices retrieved successfully
Paginated response containing invoices (metadata field excluded)
Array of invoices (metadata field excluded)
Show child attributes
Show child attributes
Current page number
1
Total number of pages
5
Total number of invoices matching the filter
47
Number of items per page
10