Concepts · Concepts

Test mode & magic fixtures

Complete test payments, bank transfers, saved-card charges, mandate debits and payouts without moving real naira.

Deterministic test numbers

Test keys reach test money only. Use these routes and magic values to drive end-to-end tests. The payout values apply when your test account uses rafiqPay's built-in simulator.

ParameterTypeRequirementDescription
POST /v1/public/checkout/sessions/:id/simulateSimulate routeOptionalCompletes a test checkout as if the customer paid, without a provider.
…9999Payout accountOptionalA test payout to an account number ending in 9999 fails, and the money goes back to your available balance.
…8888Payout accountOptionalA test payout to an account number ending in 8888 stays processing until rafiqPay checks it once, then succeeds.
Any other accountPayout accountOptionalSucceeds at once.

Bank transfers, saved cards and mandates

In test mode no bank is involved. One-time checkout accounts and permanent customer accounts get account numbers that start with 99. They are not real accounts, so use the simulate routes below to pretend the customer paid.

To test a transfer for the wrong amount, simulate a different amount from the one asked for. The money is held, or returned by the bank, the same way as in live mode, and the same webhooks are sent. If the simulate call refuses the amount (some test setups take only the right amount), ask rafiqPay to switch your test account to the built-in simulator.

ParameterTypeRequirementDescription
99xxxxxxxxTest account numberOptionalEvery test one-time account and test customer account starts with 99.
POST /v1/public/checkout/sessions/:id/bank-transfer/simulateSimulate routeOptionalSends money to the one-time account the checkout opened. Pass { amount } to send a different amount; leave it out to send the right amount.
POST /v1/customers/:id/virtual-accounts/simulateSimulate routeOptionalSends { amount } to the customer’s test permanent account. It is credited as a charge.
…99 koboDeclined amountOptionalA saved-card charge or a mandate debit for an amount ending in 99 kobo (for example "5000.99") is declined. Any other amount succeeds.
123456Mandate codeOptionalThe code the customer enters on the test mandate page to approve a mandate.