Hosted checkout

1. Create a payment

POST /v1/payments
Authorization: Bearer qp_sk_live_...
QwikiPay-Business: qp_biz_test_...
Idempotency-Key: order-1001
{
  "reference": "order-1001",
  "amount": "50000",
  "currency": "UGX",
  "customer": { "email": "[email protected]", "name": "Amina Nakato" },
  "description": "Leather bag",
  "redirect_url": "https://shop.example.com/orders/1001",
  "metadata": { "cart": "8812" }
}
Field
referenceYour order number. Letters, digits, . _ : -, up to 64. Unique per business.
amountA decimal string, at most 2 decimal places, within your country's limits.
currencyYour business's currency.
redirect_urlRequired. https:// on your business's domain.
metadataUp to 20 keys with simple values. Sent back to you on the payment and webhooks.

Idempotency-Key is required: send the same key again and you get the same answer, never a second payment. The same key with a different body is refused with idempotency_conflict.

The answer:

{
  "id": "qp_ch_8c1f...", "object": "payment", "reference": "order-1001", "mode": "live",
  "amount": "50000.00", "currency": "UGX", "status": "pending",
  "checkout_url": "https://pay.qwikipay.com/pay/s/qp_ch_8c1f...", "expires_at": "2026-12-04T18:00:00Z"
}

2. Redirect the customer to checkout_url

They pay by card or mobile money. Then we send them to your redirect_url with ?reference=...&charge=...&status=... added.

3. Confirm

Those query parameters are only a hint; anyone can type them. Confirm the payment from your server, or wait for the payment.successful webhook.