spout

Test Transactions

Run the full charge lifecycle with your test_secret_key (SPT_TEST_SK…). Spout does not call UPSL, EPG, PayAttitude, or other live processors. Outcomes are controlled by amount and test cards.

Enable test mode

  1. Create API keys via POST /api/v1/settings/apikey and copy test_secret_key
  2. Set Authorization: SPT_TEST_SK… on POST /api/v1/transactions/initialize (no Bearer prefix)
  3. Configure testwebhook_url and verify with test_webhook_secret (whsec_test_*)
  4. On checkout, enter a test card for the scenario you want

Lifecycle

StageWhat happens
InitializePayment saved with mode: "test" · webhook charge.initialize
Checkout chargeSimulator runs (no live APIs) · charge.processing
Approvedgateway_response: "00" · charge.completed
Declinedgateway_response: "99" · charge.failed (amount 99/999/99.99 or PAN ending 0002)

Initialize with test key

Same payload as Accept Payment— only the secret key changes to test.

1curl -X POST https://api.spoutpay.com/api/v1/transactions/initialize \
2  -H "Content-Type: application/json" \
3  -H "Authorization: SPT_LIVE_SK..." \
4  -H "Idempotency-Key: 9f3c2a1b-...." \
5  -H "X-Request-Id: 7e1d...." \
6  -d '{
7    "customer_name": "Jane Doe",
8    "email_address": "jane@example.com",
9    "phone_number": "08012345678",
10    "currency": "NGN",
11    "amount": 1000,
12    "merchant_tx_ref": "order_1001",
13    "redirect_url": "https://merchant.example.com/payment/return",
14    "request_type": "CARD",
15    "description": "Order 1001"
16  }'

Test-mode success response

1{
2  "status": 200,
3  "data": {
4    "status": "success",
5    "transactionRef": "SP-a1b2c3d4",
6    "redirectUrl": "https://checkout.spoutpay.com/checkout?txn_ref=SP-a1b2c3d4",
7    "mode": "test",
8    "message": "Test mode: charge will be simulated; live processors will not be called."
9  },
10  "requestId": "..."
11}

Next

  • Test Cards — PANs, expiry, CVV, and amount rules per scenario
  • Webhooks — verify whsec_test_* deliveries