curl --request GET \
--url https://api.sandbox.cheqpay.mx/lps/payment-links/{id}import requests
url = "https://api.sandbox.cheqpay.mx/lps/payment-links/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sandbox.cheqpay.mx/lps/payment-links/{id}', 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/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/payment-links/{id}"
req, _ := http.NewRequest("GET", url, nil)
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/payment-links/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/lps/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"merchantId": "<string>",
"type": "products_subscriptions",
"currency": "<string>",
"totals": {
"total": 1,
"taxes": 1,
"shipping": 1,
"fees": 1,
"discounts": 1
},
"paymentMethods": [
"card"
],
"isDraft": true,
"isEnabled": true,
"_id": "<string>",
"name": "<string>",
"url": "<string>",
"products": [
{
"name": "<string>",
"qty": 2,
"price": 1,
"total": 1,
"id": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"isQtyAdjustable": true,
"minQty": 123,
"maxQty": 123
}
],
"plans": [
{
"id": "<string>",
"merchantId": "<string>",
"externalId": "<string>",
"name": "<string>",
"description": "<string>",
"amount": 123,
"currency": "MXN",
"interval": "DAY",
"intervalCount": 123,
"trialDays": 123,
"active": true,
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"options": {
"collectShippingAddress": false,
"taxIdCollection": {
"enabled": true,
"required": false
}
},
"customFields": [
{
"type": "text",
"label": "<string>",
"required": false,
"options": [
"<string>"
]
}
],
"numberOfPayments": 2,
"redirectUrl": "<string>",
"cancelUrl": "<string>",
"reference": "<string>",
"invoiceNumber": "<string>",
"description": "<string>",
"externalId": "<string>",
"defaults": {
"persistPaymentMethod": false,
"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>"
}
},
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"invoiceCount": 123,
"merchant": {
"name": "<string>",
"logo": "<string>",
"refundPolicyUrl": "<string>",
"returnsAndExchangesPolicyUrl": "<string>",
"country": "<string>",
"language": "en",
"transactionFees": {
"cashDiscount": {
"available": true,
"active": true,
"rate": "50.00",
"displayStyle": "subtle",
"autoAdjustPrices": true,
"cardPriceLabel": "<string>",
"cashPriceLabel": "<string>"
},
"convenience": {
"available": true,
"active": true,
"amount": "500"
},
"service": {
"available": true,
"active": true,
"rate": "5.00"
},
"surcharge": {
"available": true,
"active": true,
"rate": "3.00",
"maxAmount": "5000",
"appliesTo": "credit_only",
"lineItemLabel": "<string>"
}
}
}
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Get payment link
Retrieve a payment link by ID
curl --request GET \
--url https://api.sandbox.cheqpay.mx/lps/payment-links/{id}import requests
url = "https://api.sandbox.cheqpay.mx/lps/payment-links/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sandbox.cheqpay.mx/lps/payment-links/{id}', 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/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/payment-links/{id}"
req, _ := http.NewRequest("GET", url, nil)
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/payment-links/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.cheqpay.mx/lps/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"merchantId": "<string>",
"type": "products_subscriptions",
"currency": "<string>",
"totals": {
"total": 1,
"taxes": 1,
"shipping": 1,
"fees": 1,
"discounts": 1
},
"paymentMethods": [
"card"
],
"isDraft": true,
"isEnabled": true,
"_id": "<string>",
"name": "<string>",
"url": "<string>",
"products": [
{
"name": "<string>",
"qty": 2,
"price": 1,
"total": 1,
"id": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"isQtyAdjustable": true,
"minQty": 123,
"maxQty": 123
}
],
"plans": [
{
"id": "<string>",
"merchantId": "<string>",
"externalId": "<string>",
"name": "<string>",
"description": "<string>",
"amount": 123,
"currency": "MXN",
"interval": "DAY",
"intervalCount": 123,
"trialDays": 123,
"active": true,
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"options": {
"collectShippingAddress": false,
"taxIdCollection": {
"enabled": true,
"required": false
}
},
"customFields": [
{
"type": "text",
"label": "<string>",
"required": false,
"options": [
"<string>"
]
}
],
"numberOfPayments": 2,
"redirectUrl": "<string>",
"cancelUrl": "<string>",
"reference": "<string>",
"invoiceNumber": "<string>",
"description": "<string>",
"externalId": "<string>",
"defaults": {
"persistPaymentMethod": false,
"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>"
}
},
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"invoiceCount": 123,
"merchant": {
"name": "<string>",
"logo": "<string>",
"refundPolicyUrl": "<string>",
"returnsAndExchangesPolicyUrl": "<string>",
"country": "<string>",
"language": "en",
"transactionFees": {
"cashDiscount": {
"available": true,
"active": true,
"rate": "50.00",
"displayStyle": "subtle",
"autoAdjustPrices": true,
"cardPriceLabel": "<string>",
"cashPriceLabel": "<string>"
},
"convenience": {
"available": true,
"active": true,
"amount": "500"
},
"service": {
"available": true,
"active": true,
"rate": "5.00"
},
"surcharge": {
"available": true,
"active": true,
"rate": "3.00",
"maxAmount": "5000",
"appliesTo": "credit_only",
"lineItemLabel": "<string>"
}
}
}
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Path Parameters
Payment link ID
Response
Payment link retrieved successfully
Payment link entity
Unique payment link identifier
Merchant identifier
Payment link type
products_subscriptions, customer_choice, products, subscription Currency code (3 letters)
^[A-Z]{3}$Payment link totals
Show child attributes
Show child attributes
Available payment methods
1card, spei, cie_cash_net, paycash Whether the payment link is a draft
Whether the payment link is enabled
MongoDB ObjectId
Payment link name
255Payment link URL
Products in the payment link
Show child attributes
Show child attributes
Subscription plans (required when type is subscription, max 1)
1Show child attributes
Show child attributes
Payment link options
Show child attributes
Show child attributes
Additional questions to ask the customer at checkout
1 - 20 elementsShow child attributes
Show child attributes
Number of payments for subscription
x >= 1URL to redirect after payment completion
URL the customer returns to when cancelling the checkout
Merchant reference for the payment link
128Merchant-provided invoice number shown to customers instead of the system order number when present. Free-form, not unique. Forwarded to the payment order on charge.
64Payment link description. Forwarded to the payment order on charge unless overridden in the charge request.
500External identifier for idempotent payment link creation
128Default values for customer choice payment links
Show child attributes
Show child attributes
Additional metadata
Expiration date
Creation timestamp
Last update timestamp
Number of invoices generated from this payment link
Show child attributes
Show child attributes