The Paystack gateway appears only when your store currency is one of NGN, GHS, ZAR, KES, USD, EUR or
GBP. Which payout types your Paystack account can actually use depends on its country and what
Paystack has enabled for it.
How it works
- A customer saves their account details. TeraWallet registers them with Paystack as a transfer recipient and keeps the recipient code.
- They request a withdrawal; the wallet is debited the requested amount.
- On approval (automatic, or by you), TeraWallet creates a Paystack transfer from your Paystack
balance for
amount − fee. - If Paystack accepts the transfer, the request is marked Approved straight away.
- Webhooks report the final result. A failed transfer cancels the request and restores the customer’s balance.
Step 1 — Get your Paystack secret key
- Sign in to the Paystack Dashboard.
- Go to Settings → API Keys & Webhooks.
- Copy the Secret Key. Test keys start with
sk_test_and live keys withsk_live_.
Step 2 — Allow transfers over the API
Paystack settings control whether transfers sent by API are paid automatically.- Make sure Transfers are enabled on your Paystack account.
- In the dashboard’s transfer settings, turn off the requirement to confirm transfers with an OTP, which would otherwise hold every API transfer for manual confirmation.
- Keep enough balance in your Paystack account. Transfers are paid from it.
Menu names in the Paystack dashboard change from time to time. If you can’t find an item, check
Paystack’s Transfers documentation.
Step 3 — Configure TeraWallet
Go to TeraWallet → Settings → Withdrawal. Turn on Enable Withdrawal, choose the Approval Mode (use Manual while testing) and turn on Enable logging during setup. Then, under Paystack:Step 4 — Register the webhook
- In Paystack, go to Settings → API Keys & Webhooks.
-
Set the Webhook URL to:
Paystack has one webhook URL per mode (test and live), so set it in each mode you use.
-
Save. There is no separate secret to copy: TeraWallet verifies each request’s
x-paystack-signatureusing your Secret Key.Other events are ignored. Paystack sends all transfer events to the one URL, so there is nothing to subscribe to.
Step 5 — What customers need to do
Customers go to My Account → Wallet → Withdrawal → Payment Settings, choose Paystack and enter:
The kind of account TeraWallet registers depends on your store currency:
Step 6 — Test
- Use a test secret key (
sk_test_…) and set the webhook in Paystack’s test mode. - As a test customer, save account details, add balance and submit a withdrawal.
- Approve it in wp-admin.
- The request should show Approved with a note like “Paystack transfer queued (transfer_code: TRF_…, reference: ww_paystack_123)”.
- Confirm the webhook adds the “Paystack confirmed transfer.success.” note, or cancels the request on a failure.
Go live checklist
- Paystack account activated for live transfers, with sufficient balance
- OTP confirmation for transfers turned off
- Live Secret Key (
sk_live_…) pasted - Live webhook URL saved in Paystack
- Enable logging turned off
- One small real withdrawal tested end to end
Duplicate-payment protection
Each transfer uses a fixed reference (ww_paystack_<withdrawal id>). Paystack rejects a second transfer with
the same reference, so a retry can’t pay twice.
Troubleshooting
Enable Enable logging and open the request to see its log. Failure reasons are also saved as notes.
See Pro Hooks & REST API for the full reference.