Create a charge
POST /charges
Use
amountNgn for almost every integration. LuminPay converts it at the current rate and quotes every supported network in one charge.
The charge object
Addresses are created a few seconds after the charge, so the create response usually has
addresses: []. Fetch the charge with GET /charges/{chargeId} to get them.scale. For example, {"amount": "18050000", "scale": 6} is 18.05.
Show the customer where to pay
You have two options:- Hosted checkout. Redirect the customer to
https://app.luminpay.co/pay/{chargeId}(Sandbox:https://sandbox.luminpay.co/pay/{chargeId}). It shows every network, a QR code and a live status. - Your own page. Show the
addressandamountfromaddressesfor the network the customer picks. Tell them to send the exact amount on that network only.
Statuses
Confirm the payment
Use webhooks: listen forcharge.paid. If you also poll, GET /charges/{chargeId} is the source of truth. Don’t trust a status your frontend reports.
Idempotency
reference makes charge creation safe to retry. If you send a reference you’ve already used, LuminPay returns the existing charge instead of creating a second one, with the same addresses.
- References are unique across LuminPay. If another account already uses a reference, you get
409. Prefix references with something specific to you, for exampleacme_order_1001. - For safe retries of any create request, also see Idempotency.
- Use one reference per payment attempt. To charge the same order again after it expired, use a new reference such as
order_1001_2.
List charges
GET /charges?limit=50&cursor=... returns { "transactions": [...], "nextCursor": "..." }, newest first. limit is at most 100. Pass nextCursor back as cursor for the next page; it is null on the last page.
Limits
Each account has a daily limit on the naira value of charges:
A charge that would go over the limit is refused with
403.
Refunds
Refunds send the coins back to the customer and need an account owner or admin to approve them with their PIN, so they are made from the dashboard, not with an API key. You receiverefund.completed when one is sent.