Quick start
Take your first payment in Test mode in about five minutes. Every call goes to https://api.paygenthq.ai/v1; your key decides Test or Live.
1. Copy your test key
Sign up, then open Settings › Developers › API keys and make a secret test key. It starts sk_test_ and is shown once: keep it on your server.
2. Start a payment
curl https://api.paygenthq.ai/v1/checkouts \
-H "Authorization: Bearer sk_test_…" \
-H "Idempotency-Key: order-7Q4M" \
-d amount=1850000 -d reference=KH-7Q4M \
-d [email protected]amount is in kobo: 1850000 is ₦18,500. Send your customer to the checkout_url in the reply. They pay by bank transfer, card or Paygent wallet.
3. Hear about it on your server
Add a webhook address under Settings › Developers › Webhooks. When the customer pays, we send charge.success, signed with your endpoint's secret (see Webhooks). In Test mode the payment page has buttons that pay it for you.
4. Go live
Send your business details from Go live. Once we have checked them you can make live keys (sk_live_): the same code, a different key.
paygent