Convert a booking hold into a SimplePay Checkout Session
curl --request POST \
--url https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"success_url": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({success_url: '<string>'})
};
fetch('https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment"
payload = { "success_url": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"booking": {
"ends_at": "2023-11-07T05:31:56Z",
"event_type_id": "<string>",
"hold_expires_at": "2023-11-07T05:31:56Z",
"hold_id": "<string>",
"id": "<string>",
"line_items": [
{
"amount_minor": 1,
"currency": "<string>",
"metadata": {},
"price_id": "<string>",
"product_id": "<string>",
"quantity": 2,
"title": "<string>"
}
],
"product_id": "<string>",
"quantity": 2,
"resource_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "pending"
},
"checkout_session": {
"id": "<string>",
"url": "<string>"
}
}Convert a booking hold into a SimplePay Checkout Session
Referencia detallada para POST /v1/bookable-payments/holds//payment.
POST
https://api.simplepay.mx
/
v1
/
bookable-payments
/
holds
/
{id}
/
payment
Convert a booking hold into a SimplePay Checkout Session
curl --request POST \
--url https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"success_url": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({success_url: '<string>'})
};
fetch('https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/bookable-payments/holds/{id}/payment"
payload = { "success_url": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"booking": {
"ends_at": "2023-11-07T05:31:56Z",
"event_type_id": "<string>",
"hold_expires_at": "2023-11-07T05:31:56Z",
"hold_id": "<string>",
"id": "<string>",
"line_items": [
{
"amount_minor": 1,
"currency": "<string>",
"metadata": {},
"price_id": "<string>",
"product_id": "<string>",
"quantity": 2,
"title": "<string>"
}
],
"product_id": "<string>",
"quantity": 2,
"resource_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "pending"
},
"checkout_session": {
"id": "<string>",
"url": "<string>"
}
}Uso
Usalo dentro de Bookable Payments para modelar inventario reservado, calcular disponibilidad, crear holds, convertirlos en checkout y confirmar bookings.Antes de llamar
| Tema | Detalle |
|---|---|
| Metodo | POST |
| Ruta | /v1/bookable-payments/holds/{id}/payment |
| Auth | Bearer API key del ambiente correcto. |
| Scope | bookings:write |
| Idempotencia | Recomendada para cualquier retry. Usa una key deterministica por operacion de negocio. |
| Guia relacionada | Bookable Payments |
Patron recomendado
- Ejecuta este endpoint desde backend o job seguro, nunca desde frontend con API keys.
- Manda
Idempotency-Keycuando el endpoint cree, convierta, reprograme, cancele, capture o reembolse estado. - Persiste IDs SimplePay (
spcs_...,sppi_...,splink_..., refund IDs o booking IDs) para reconciliacion. - Confirma inventario final con
booking.confirmedo una lectura de booking, no solo con una URL de retorno. - Consulta el bloque OpenAPI de esta pagina para el shape exacto de parametros, body y respuestas.
Ejemplo minimo
terminal
curl -sS -X POST "https://api.simplepay.mx/v1/bookable-payments/holds/id_123/payment" \
-H "Authorization: Bearer $SIMPLEPAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: create-checkout-for-booking-hold_v1" \
-d '{ ... }'
Errores a manejar
400indica payload, parametros o estado invalido.401o403indican API key, ambiente o scopes incorrectos.409suele indicar conflicto de estado, duplicado o idempotencia incompatible.404significa que el recurso no existe para ese tenant o ambiente.429y5xxse pueden reintentar con backoff; en writes conserva la misma idempotency key.
Contrato OpenAPI
El playground, parametros, body y respuestas de abajo salen de/openapi.json. Si el contrato cambia, actualiza la spec y regenera esta pagina.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Required string length:
8 - 255Path Parameters
Response
201 - application/json
Booking hold converted to checkout
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Required range:
x >= 0Pattern:
^[a-z]{3}$Available options:
add_on, deposit, fee, price, tax Required range:
x >= 1Required range:
x >= 1Available options:
pending Last modified on June 21, 2026
⌘I