Hosted checkout
The simplest way to collect payments: your backend creates the payment and redirects the customer to a payment page hosted by Paytami. No card forms to build, no PCI scope to worry about — the entire payment flow lives on Paytami's domain.
This is the recommended flow for merchants charging from their own backend.
The flow
1. Your backend 2. Paytami 3. Your backend
creates the ───► hosts the ───► confirms the
payment checkout result
(POST /v1/payments) (redirect) (GET /v1/payments/{id}
or webhook)1. Create the payment from your backend
curl https://app.paytami.com/api/v1/payments \
-X POST \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: 6e4b6f0a-a5f0-4b9a-9b8b-1a2b3c4d5e6f" \
-H "Content-Type: application/json" \
-d '{
"amount": "25000",
"currency": "GTQ",
"method_type": "card",
"description": "Tuition — August 2026",
"success_url": "https://your-site.com/thanks",
"cancel_url": "https://your-site.com/cart",
"customer": { "email": "customer@example.com", "name": "Ana Perez" }
}'Save the id (pay_...) from the response — it's the stable reference for this charge in your own records.
2. Redirect the customer to checkout_url
The response already includes the payment URL, always on Paytami's domain:
{
"id": "pay_8f2c1a9d4e6b7c0a1d2e3f40",
"status": "created",
"checkout_url": "https://app.paytami.com/api/v1/checkout/pay_8f2c1a9d4e6b7c0a1d2e3f40"
}Send the customer there (a full page redirect, not an iframe — for that, see embedded checkout). Paytami handles showing the payment form and, once done, returns the customer to your success_url or cancel_url as appropriate.
3. Confirm the result from your backend
The customer landing on your success_url is a UX signal, not proof that the payment completed — they may have closed the tab early, or confirmation for their method may take time (a bank transfer, for example). Before delivering the product or activating the service, confirm the real status:
curl https://app.paytami.com/api/v1/payments/pay_8f2c1a9d4e6b7c0a1d2e3f40 \
-H "Authorization: Bearer sk_live_..."TIP
If you already have webhooks configured, you can react to the payment.succeeded event instead of polling — but the source of truth is always the API, never assuming success purely from the redirect.
Recurring charges / subscriptions (coming soon)
Paytami is working on native support for plans and recurring billing. For now, each charge is created individually with POST /v1/payments — if your business needs to charge on a recurring basis, reach out to talk through your use case.

