curl --request POST \
--url https://api.simplepay.mx/v1/payment-links \
--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/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/payment-links"
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": "payment_link",
"public_id": "<string>",
"url": "<string>",
"status": "active",
"amount_source": "manual_amount",
"manual_amount": 123,
"currency": "<string>",
"catalog_line_item_snapshot": {},
"payment_method_types": [
"card"
],
"installment_options": [
{
"months": 3
}
],
"installment_plan": {
"months": 3
},
"checkout_session_ref": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_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 payment link
curl --request POST \
--url https://api.simplepay.mx/v1/payment-links \
--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/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/payment-links"
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": "payment_link",
"public_id": "<string>",
"url": "<string>",
"status": "active",
"amount_source": "manual_amount",
"manual_amount": 123,
"currency": "<string>",
"catalog_line_item_snapshot": {},
"payment_method_types": [
"card"
],
"installment_options": [
{
"months": 3
}
],
"installment_plan": {
"months": 3
},
"checkout_session_ref": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_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 Payment Link. 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}$Optional buyer email. SimplePay delivers the link and makes it visible in that verified buyer's pending-link inbox; plaintext email is not persisted in the inbox projection.
3 - 254Optional future RFC 3339 expiry with an explicit timezone. The origin normalizes it to UTC.
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 Payment Link, including its canonical public URL.
^splink_[a-z0-9]{32}$^https://link\.simplepay\.mx/splink_[a-z0-9]{32}$active, inactive, archived, paid manual_amount, catalog_line_item ^[a-z]{3}$1card, oxxo, spei ^spcs_[a-z0-9]{32}$UTC expiry timestamp, or null when the link does not expire automatically.
UTC merchant-revocation timestamp, or null while the link has not been revoked.
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.