Quickstart
Create your first charge and walk through the full payment flow in sandbox mode. This takes one API call and a browser tab.
1. Get a test API key
Every merchant account has a sandbox secret key in the dashboard, prefixed sk_test_. Use it for everything in this guide — test keys never move real money.
2. Create a charge
Send a POST request with an amount and whatever customer details you already have. Only amount is required.
curl -X POST https://sandbox.lotifinance.com/v1/charges/ \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "XAF",
"description": "Order #1234",
"customer_email": "jane@example.com"
}'You'll get back a charge object:
{
"id": "a1b2c3d4-...",
"status": "pending",
"amount": 5000,
"currency": "XAF",
"description": "Order #1234",
"customer_email": "jane@example.com",
"checkout_url": "https://pay.lotifinance.com/c/a1b2c3d4-...",
"created_at": "2026-10-02T10:15:00Z",
"expires_at": "2026-10-02T10:45:00Z",
"completed_at": null
}3. Redirect to checkout
Send your customer to checkout_url. This is a hosted page — you don't need to build or style anything:
window.location.href = charge.checkout_url;Checkout links expire
checkout_url is valid for 30 minutes from creation. After that the charge moves to expired and a new charge must be created.4. Know when it's done
There are two ways to find out the final result — use whichever fits your stack:
- Webhook (recommended): we
POSTa signedcharge.completedevent to your server the moment payment succeeds. See/docs/webhooks. - Polling:
GET /v1/charges/{id}/and checkstatus.
curl https://sandbox.lotifinance.com/v1/charges/a1b2c3d4-.../ \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxx"Possible values for status (the request itself always returns 200 OK — only the field inside the body changes):
That's the whole flow. Next: read /docs/authentication for how keys and environments work, or jump straight to the full /docs/charges reference.