curl --request POST \
--url https://api.simplepay.mx/v1/hosted-checkout/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"manual_amount": 2,
"catalog_line_item": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({manual_amount: 2, catalog_line_item: {}})
};
fetch('https://api.simplepay.mx/v1/hosted-checkout/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/hosted-checkout/sessions"
payload = {
"manual_amount": 2,
"catalog_line_item": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "checkout_session",
"public_reference": "<string>",
"url": "<string>",
"status": "open",
"amount_source": "manual_amount",
"manual_amount": 4503599627370496,
"currency": "<string>",
"catalog_line_item_snapshot": {},
"payment_method_types": [
"card"
],
"installment_options": [
{
"months": 3
}
],
"installment_plan": {
"months": 3
},
"source_product": "payment_links",
"source_id": "<string>",
"source_public_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"installment_pricing": {
"fee_allocation": "absorb",
"merchant_markup_bps": 5000
}
}Create a Hosted Checkout session
curl --request POST \
--url https://api.simplepay.mx/v1/hosted-checkout/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"manual_amount": 2,
"catalog_line_item": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({manual_amount: 2, catalog_line_item: {}})
};
fetch('https://api.simplepay.mx/v1/hosted-checkout/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/hosted-checkout/sessions"
payload = {
"manual_amount": 2,
"catalog_line_item": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "checkout_session",
"public_reference": "<string>",
"url": "<string>",
"status": "open",
"amount_source": "manual_amount",
"manual_amount": 4503599627370496,
"currency": "<string>",
"catalog_line_item_snapshot": {},
"payment_method_types": [
"card"
],
"installment_options": [
{
"months": 3
}
],
"installment_plan": {
"months": 3
},
"source_product": "payment_links",
"source_id": "<string>",
"source_public_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"installment_pricing": {
"fee_allocation": "absorb",
"merchant_markup_bps": 5000
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
8 - 255Body
- Option 1
- Option 2
Create a SimplePay-hosted Checkout session. Charges exactly one manual amount or catalog line item. A merchant offering installments must explicitly choose whether it absorbs financing cost or passes it to the buyer. The buyer only selects a term at quote/pay. No Stripe params are accepted.
Charge a manual amount in minor units. Mutually exclusive with catalog_line_item.
x >= 1Charge a Digital Catalog line item by snapshot. Mutually exclusive with manual_amount.
^[a-zA-Z]{3}$1card, oxxo, spei Canonical merchant-selected card installment terms to offer. Requires card in payment_method_types and one installment_pricing choice.
1 - 6 elementsHide child attributes
Hide child attributes
3, 6, 9, 12, 18, 24 Merchant-owned financing choice applied consistently to every offered term. absorb forbids buyer markup; pass_to_buyer may include a governed markup in basis points.
Response
The created SimplePay-hosted Checkout session, including its canonical public URL.
^spcs_[a-z0-9]{32}$^https://checkout\.simplepay\.mx/checkout/spcs_[a-z0-9]{32}$open, canceling, completed, expired, canceled manual_amount, catalog_line_item 1 <= x <= 9007199254740991^[a-z]{3}$1card, oxxo, spei payment_links, null ^splink_[a-z0-9]{32}$Merchant-owned financing choice applied consistently to every offered term. absorb forbids buyer markup; pass_to_buyer may include a governed markup in basis points.