Testing

Test mode is a full copy of Biftpay with test funds: no real funds move. Use a bp_test_ key and everything you create (payments, customers, payouts, webhooks) lives only in test mode. Live keys (bp_live_) never see test data, and the other way round.

Test cards#

In test mode, Biftpay answers these card numbers itself, so they always behave as listed. Use any future expiry date, any 3-digit CVC and any name.

Card numberWhat happens
4242 4242 4242 4242Succeeds. The card can be saved for later charges (subscriptions).
5555 5555 5555 4444Succeeds (Mastercard).
5060 9900 0000 0008Checkout asks for the card PIN (1234), then a one-time code (123456). A wrong one fails.
4000 0000 0000 32203-D Secure. A test bank page opens in a new tab: Approve or Fail. Checkout updates by itself.
4000 0000 0000 0002Declined (card_declined).
4000 0000 0000 9995Declined (insufficient_funds).
4000 0000 0000 0119Stays processing for about 30 seconds, then succeeds: test that you wait for the webhook.
4000 0000 0000 0341Stays processing for about 30 seconds, then fails.

Fees, refunds and webhooks work as for any card payment. Use these numbers for your tests; other numbers aren't guaranteed to behave the same way. These numbers are refused in live mode. In test mode, checkout lists them under Test cards so you can tap one to fill it in.

Bank transfers#

In test mode, Biftpay gives each payment its own test account (at Biftpay Test Bank); no real bank is involved. At checkout, choose Bank transfer and press Simulate sending ₦…. From your server, call POST /v1/payment_intents/{id}/bank_transfer for the account, then POST /v1/test_helpers/payment_intents/{id}/simulate_transfer. Either way the transfer "arrives" for exactly the amount asked, the payment becomes successful and you get the webhook, just as with a real transfer.

Payouts#

In test mode, no funds move, but account names still come from a real account lookup. A test payout is confirmed like a live one, usually within a minute.

Test helpers#

Some things take time in real life: funds moving from pending to available the next business day, or settlement waiting for 08:00. Test helpers make them happen now, so your automated tests don't wait. They only work with test keys.

HelperWhat it does
POST /v1/test_helpers/payment_intents/{id}/succeedMarks a payment successful, as if the customer paid at checkout.
POST /v1/test_helpers/payment_intents/{id}/simulate_transferPays the payment's test transfer account (see Bank transfers above).
POST /v1/test_helpers/virtual_accounts/{id}/simulate_transferPays into a virtual account, when its can_simulate is true.
POST /v1/test_helpers/balance/release_pendingMoves everything pending to available now.
POST /v1/test_helpers/settlements/runRuns automatic settlement for your account now.

Each one sends the same webhooks the real thing would, so you can test your whole flow end to end. For card and bank transfer payments, use checkout or payments by API with the test cards and test transfers above. See the helpers in the API reference.