Testing Direct Collection APIs
Test mobile money, bank-transfer, card, and OPay collection endpoints without using the hosted Universal Payment SDK.
Use this guide when your application calls a collection endpoint directly and owns the payment-method UI. These sandbox values never contact a live payment provider.
If Honeycoin hosts your checkout, use Testing the Universal Payment SDK instead because hosted challenge and redirect responses differ.
Mobile Money
| Scenario | Phone number | Expected result |
|---|---|---|
| Success | 254712345678 | Transaction becomes successful |
| Failure | 254787654321 | Transaction becomes failed |
{
"externalReference": "direct-momo-success-001",
"amount": 300,
"currency": "KES",
"phoneNumber": "254712345678"
}For request fields, operator requirements, and post-charge OTP or redirect handling, see Mobile Money Collections.
Bank Transfer
| Scenario | Expected result | |
|---|---|---|
| Success | [email protected] | Returns a sandbox virtual account and becomes successful |
| Failure | [email protected] | Transaction becomes failed |
{
"externalReference": "direct-bank-success-001",
"amount": 300,
"currency": "NGN",
"email": "[email protected]"
}For the complete request contract, see Bank Transfer.
Card Charge
The card number selects the scenario. CVV and expiry can be any valid values.
| Scenario | Card number | Expected direct API behavior |
|---|---|---|
| Success | 4242424242424242 | Transaction becomes successful |
| Failure | 4000056655665556 | Transaction becomes failed |
| 3DS | 5555555555554444 | Returns stepRequired: redirect and a redirectUrl |
| OTP | 4562543755474674 | Returns stepRequired: otp |
| PIN | 2223003122003222 | Returns stepRequired: pin |
| Address verification | 5200828282828210 | Returns stepRequired: address_verification |
{
"externalReference": "direct-card-success-001",
"amount": 300,
"currency": "NGN",
"email": "[email protected]",
"firstName": "Test",
"lastName": "User",
"ipAddress": "127.0.0.1",
"cardDetails": {
"number": "4242424242424242",
"cvv": "123",
"expMonth": "12",
"expYear": "30"
}
}Complete any returned challenge using the direct card authorisation flow. For request and authorisation payloads, see Card Charges.
OPay
Direct sandbox OPay is redirect-first. Every initiation response includes stepRequired: redirect and a redirectUrl; opening that URL completes the simulated transaction with the outcome selected by the amount.
| Amount | Scenario | Expected result |
|---|---|---|
111 | Success | Returns the redirect response, then becomes successful |
999 | Failure | Returns the redirect response, then becomes failed |
Any amount other than 111 follows the failed redirect outcome. Use 999 as the documented failure fixture.
For the complete request contract and redirect guidance, see OPay Charge.
Verify Final Status
Direct collection initiation responses can be pending or require customer action. Always confirm the final state through a transaction webhook or the get transaction endpoint. Fulfill the order only when chargeStatus is successful.
Updated 3 days ago

