Skip to content
Wire Ghdocs

Test Payments

Build and test your whole integration with your test keys. No real money moves, and you can trigger every outcome on purpose.

Test mode

Every request made with a wg_sk_test_ or wg_pk_test_ key runs in test mode. Test mode works exactly like live mode: the same endpoints, responses, checkout and webhooks. The only difference is that no Mobile Money prompt reaches a real phone, and no real money moves.

Your test keys are on the API & Sandbox page of your dashboard as soon as you open Wire Pay. You do not need to activate your business to use them.

Test Mobile Money numbers

Use these numbers on the checkout, the popup or the Charge API to get each result:

NumberNetworkCharge statusWhat happens
0551234987MTNsuccessApproved at once.
0551234988MTNfailedDeclined by customer.
0551234989MTNpay_offlineStays waiting for approval, then fails when the transaction times out. Use it to test your timeout handling.
0201234987TelecelsuccessApproved at once.
0201234988TelecelfailedInsufficient funds.
0261234987AirtelTigosuccessApproved at once.
0261234989AirtelTigopay_offlineApproves about 20 seconds later. Use it to test webhooks and status checks.

Any other valid Ghana Mobile Money number succeeds in test mode.

Try the delayed approval
curl https://api.wiregh.com/charge \
-H "Authorization: Bearer YOUR_TEST_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
  "email": "test@email.com",
  "amount": 1000,
  "mobile_money": {
    "phone": "0261234989",
    "provider": "airteltigo"
  }
}' \
-X POST

Test Wire Gh wallets

On the checkout or popup, open the Wire Gh Wallet tab and use these numbers. No SMS is sent in test mode: the code is always 123456 and the wallet PIN is always 1234. Test mode never touches real wallets.

NumberWhat happens
0244000001Has enough balance. The payment succeeds.
0244000002Balance too low. The attempt is declined and the customer can try another method.
0244000003Wallet is frozen. The payment is refused.

Any other number behaves like a number with no Wire Gh account: the code never works.

Test webhooks

Add a test webhook URL on your dashboard and make a payment with any test number. Test events are signed with your test secret key. To try your webhook handler on your own computer, expose it with a tunnelling tool that gives you a public HTTPS address, since we cannot reach local addresses.

Test refunds

Refunds on test transactions complete at once with status processed and send a refund.processed webhook. They come out of your test balance.

Before you go live

Make sure your integration handles each of these:

  • a successful payment, verified on your server before you give value;
  • a declined payment and a payment with insufficient funds;
  • a customer who never approves the prompt;
  • a payment that succeeds after your customer has left the page, delivered by webhook;
  • the same webhook arriving twice;
  • a full and a partial refund.

Then read Going live.