Before you start
- A Spotflow account. Sign up if you don’t have one.
- You don’t need KYB verification to use test mode. You’ll need it before you can go live. See KYB verification.
1
Get your test secret key
In the Spotflow dashboard, switch to test mode and open Settings → API Keys. Copy your secret key. It starts with
sk_test_.Store it as an environment variable, never in code:2
Start a payment
Call Initialize Payment with a unique
reference, the amount, the currency and the customer’s email. The request and response are shown alongside this page, in cURL, Node.js and Python.amountis in the major unit of the currency:5.00withGHSmeans five Ghana cedis.referenceis yours. Keep it unique per payment. It’s also your idempotency key, so a retry with the same reference won’t create a second payment.
checkoutUrl and a status of pending.3
Pay at checkout
Open the
checkoutUrl in your browser and pay with one of the test cards or test mobile money numbers on Testing payments. Test details only work with test keys.4
Verify the payment
Check the result with Verify Payment, using your reference:A payment moves from
PENDING to SUCCESSFUL, FAILED or CANCELLED. See Payment lifecycle.Troubleshooting
Next steps
Receive webhooks
Get notified when payments, subscriptions and accounts change.
Try the API in your browser
Every endpoint page has an interactive playground for test requests.
Bill a customer every month
Set up a subscription plan and recurring billing.
Go live
Complete KYB verification, then switch to your live key.

