Get started
Quickstart
Connect a provider, create an API key, and take your first sandbox payment.
This guide takes you from a new account to a paid sandbox checkout. You won't handle card data: the customer pays on a hosted page, and you get the result back.
Prefer to let your AI assistant do it? Copy the prompt from Build with AI.
1. Create an account
Create an account and a project. A project holds your connections, API keys, and payments. Everything in this guide happens in sandbox, where no real money moves.
2. Connect a provider
Open Connections in the dashboard and add a sandbox connection with your provider's test credentials, for example a Mercado Pago test access token or a Stripe test secret key. Camel checks the credentials, encrypts them, and never shows them again.
3. Create an API key
Open Developers and create an API key. The full key is shown only once, so copy
it now. Sandbox keys start with pay_test_. Keep it on your server, for example in an
environment variable:
export CAMEL_API_KEY="pay_test_…"4. Create a checkout
A checkout is a payment page for a list of items. Amounts are integers in the currency's smallest
unit, so 425000 is ARS 4,250.00. The Idempotency-Key header makes the request
safe to retry; use something unique to the order.
The response includes a checkout_url:
{
"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"
}5. Send the customer to pay
Redirect the customer to checkout_url. They pick a payment method and pay into your
connected provider account. When they finish, Camel sends them back to your success_url with checkout_id and payment (approved or pending) added to the query string.
Anyone can open your success_url, so don't mark the order paid from the redirect
alone. Confirm it with a webhook or by retrieving the checkout.
6. Confirm the payment
Retrieve the checkout. Its status becomes completed once the payment is approved:
In production, let Camel tell you instead: add an endpoint under Webhooks and
listen for checkout.completed. See Webhooks.
Next steps
- Verify webhook signatures before you trust an event.
- Create payments directly if you tokenize cards on your own page.
- Go live with a production connection and a
pay_live_key.