Test Helpers
Test-mode-only routes to simulate payments and bank transfers in. The card, delivery and clock helpers are proposed. In test mode, a saved-card charge or mandate debit for an amount ending in 99 kobo is declined, and the mandate code is 123456.
The test_helper object
Represents a test_helper entity in the rafiqPay system.
| Field | Type & Flags | Description |
|---|---|---|
| simulated | boolean | Always true in test mode. |
{
"simulated": true,
"mode": "test"
}Endpoints & Operations
Simulate a checkout bank transfer
Test mode only. Pretends the customer sent money to the one-time account the checkout opened. Leave out amount to send the right amount; pass a different amount to test a held transfer.
curl -X POST "https://api.rafiqpay.net/v1/public/checkout/sessions/:id/bank-transfer/simulate" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_sim-checkout-transfer_01" \
-H "Content-Type: application/json" \
-d '{
"amount": "30000.00"
}'{
"status": "open",
"chargeStatus": "pending",
"bankTransfer": null,
"unmatchedTransfers": [
{
"reason": "mismatch",
"amount": "30000.00",
"status": "held"
}
]
}Simulate a transfer to a customer account
Test mode only. Pretends the customer sent money to their test permanent account. It is credited as a charge.
curl -X POST "https://api.rafiqpay.net/v1/customers/:id/virtual-accounts/simulate" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_sim-customer-account-transfer_01" \
-H "Content-Type: application/json" \
-d '{
"amount": "35000.00"
}'{
"outcome": "credited"
}Simulate a card purchase
Simulates a POS or web card authorization (including blocked-category testing).
curl -X POST "https://api.rafiqpay.net/v1/test-helpers/card-authorizations" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_sim-card-auth_01" \
-H "Content-Type: application/json" \
-d '{
"cardId": "crd_01",
"amount": "12000.00",
"mcc": "5812",
"merchantName": "Bukka Hut Lekki"
}'{
"id": "cau_test_01",
"status": "approved"
}Mark a physical card delivered
Marks a physical test card as delivered by courier.
curl -X POST "https://api.rafiqpay.net/v1/test-helpers/cards/:id/deliver" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_sim-card-deliver_01"{
"id": "crd_01",
"deliveryStatus": "delivered"
}Advance billing time
Advances the test clock to trigger subscription renewals, dunning retries, or 24-hour policy holds.
curl -X POST "https://api.rafiqpay.net/v1/test-helpers/clock/advance" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_sim-clock-advance_01" \
-H "Content-Type: application/json" \
-d '{
"advanceByHours": 24
}'{
"currentTime": "2026-10-21T16:00:00Z"
}