Axis exposes a webhook endpoint that your banking provider (Korapay) calls when a virtual account receives a payment. This is how wallet balances get topped up automatically — your frontend does not need to do anything to trigger it. When the event arrives, Axis looks up the destination wallet, credits the balance, and creates a LedgerEntry of type topup.
Webhook endpoint
This endpoint is called by Korapay, not by your application. You do not need to authenticate or call it yourself.
Expected event type
Axis processes events where event === "charge.success". Any other event type is acknowledged but ignored.
Payload shape
How Axis resolves the destination wallet
The key field is data.virtual_bank_account.account_reference. This value is the walletId that Axis stored when the virtual account was provisioned. When a charge.success event arrives, Axis:
- Reads
data.virtual_bank_account.account_reference to find the target wallet.
- Converts
data.amount (in NGN float) to kobo and credits the wallet’s balance.
- Creates a
LedgerEntry of type topup linked to that wallet.
- Returns
200 OK to acknowledge the event.
If the account_reference does not match any wallet, the event is logged and a 400 is returned to the provider so it can alert you.
POST /api/webhooks is called by the payment provider, not by your frontend. You do not need to call this endpoint directly or include it in your client-side code.
After initiating a bank transfer to a virtual account, poll GET /api/wallets/:walletId every 1–2 seconds to detect the balance increase and reflect it in your UI. See Virtual Accounts for a ready-made React polling hook.