API reference
Create a checkout
Create a hosted payment page and get its URL.
POST
/v1/checkoutsLeave out provider for a hosted checkout: the Camel payment page, where the customer picks a method from your active connections. It expires after 24 hours. Set provider and connection_id for a direct checkout on the provider’s own page.
With a production key, success_url and cancel_url must use HTTPS.
Headers
Idempotency-Keystring required- A unique key for this operation, up to 255 characters. Retrying with the same key and body returns the original response. See Idempotency.
Body parameters
itemsarray required- 1 to 100 items, each with name (up to 255 characters), quantity (1–999), and unit_amount (minor units, greater than 0). The checkout amount is their sum.
currencystring required- Three-letter ISO code.
success_urlstring required- Where the customer returns after paying.
cancel_urlstring required- Where the customer returns if they leave or the payment fails.
providerstring- mercadopago, stripe, paypal, or uala. Set it for a direct checkout.
connection_idstring- The connection for a direct checkout. Requires provider.
external_referencestring- Your own id, up to 128 characters.
metadataobject- Up to 50 keys of your own data.
Request
Response
{
"id": "chk_01JBX9C3D4E5F6G7H8J9KMNPQR",
"object": "checkout",
"mode": "hosted",
"provider": null,
"connection_id": null,
"provider_checkout_id": null,
"amount": 850000,
"currency": "ARS",
"charge": null,
"items": [
{
"name": "Desk lamp",
"quantity": 2,
"unit_amount": 425000
}
],
"status": "open",
"provider_status": null,
"checkout_url": "https://camelpayment.com/pay/chk_01JBX9C3D4E5F6G7H8J9KMNPQR",
"success_url": "https://shop.example.com/orders/1524/return",
"cancel_url": "https://shop.example.com/orders/1524",
"external_reference": "ORDER-1524",
"metadata": {
"order_id": "1524"
},
"expires_at": "2026-11-13T15:04:05Z",
"created_at": "2026-11-12T15:04:05Z",
"updated_at": "2026-11-12T15:04:05Z"
}Errors
| Status | When |
|---|---|
202 | Direct checkouts only: the provider did not give a definitive answer. |
401 | The API key is missing, malformed, or revoked. |
402 | Production only: the account has a past-due Camel invoice. |
404 | The connection does not exist in this environment. |
409 | The Idempotency-Key was used with a different body, or the first request is still running. |
422 | The body is invalid, no active connection accepts the currency, or a production return URL is not HTTPS. |
429 | Too many requests. Wait for Retry-After seconds. |
502 | Direct checkouts only: the provider returned an error. |
503 | A currency conversion was needed and exchange rates are unavailable. |