Before you start
- A Kwugwo account with a sandbox workspace.
- At least one PSP connected in sandbox (in its test mode), with a checkout that offers Bank transfer. See Testing in sandbox.
- Your sandbox secret key from Dashboard → API Keys.
1
Set your key and make a first call
Put your key and the sandbox base URL in environment variables:Then add a small helper that sends authenticated JSON requests, and
use it to list your checkouts:You should see your checkouts. A
401 means the key is wrong, or is
a live key used against sandbox.2
Create a payment
Charge ₦5,000.00. Amounts are in the smallest currency unit
(kobo), so that’s Save the
500000. ref is your order ID; it’s unique per
workspace, so a retry can’t create a duplicate payment.Response (trimmed)
uid with your order. If checkout is null, add
"checkout": "chk.…" (from step 1) to the request.3
Charge it by bank transfer
Start a payment attempt (an activity). Bank transfer needs no
extra parameters; other mediums take theirs in In production you’d show the customer these account details. In
sandbox, complete the transfer with your PSP’s test tools; see
Testing in sandbox.
data.medium_params.Response (trimmed)
4
Confirm the payment
Kwugwo sends When
ugwo.successful to your webhook
endpoint once the PSP confirms. Either way,
confirm from your server by fetching the ugwo:status is ugwo_successful, total_amount_paid covers
amount, and ref is your order, the order is paid. Validate and
fulfil turns this into a webhook
handler.What you built
Next steps
Embed the checkout
Let Kwugwo render every medium, bank picker and instruction.
Build your own UI
Handle every
next_action type yourself.Validate and fulfil
The checks to run before you ship an order.
Webhooks
Receive and verify events.