Skip to content

Wallet top-up and withdrawal ​

Who: listener (top-up, transfer); creator (earnings withdrawal); staff (approval, payouts, refunds); system (webhooks, sweeps, payouts).

Entry points ​

KindEntry
REST (wallet)GET /wallet, GET /wallet/transactions, GET /wallet/limits, GET /wallet/statement.csv, GET /receipts, GET /receipts/:id
REST (top-up)POST /wallet/top-ups (Idempotency-Key), GET/POST /wallet/funding-account, GET /payments/:id, POST /payments/:id/refresh, /cancel, /store-purchase
REST (transfer)POST /wallet/transfers (Idempotency-Key)
REST (withdraw)GET /wallet/banks, GET/POST /me/bank-accounts, POST /me/bank-accounts/:id/default, DELETE /me/bank-accounts/:id, GET /profiles/:profileId/earnings, .../earnings/transactions, .../earnings/statement.csv, GET/POST /profiles/:profileId/withdrawals, POST /me/withdrawals/:id/cancel
REST (KYC)POST /verifications/kyc/bvn, POST /verifications/kyc/id-document, GET /me/verification
WebhookPOST /webhooks/payments/hyparrow
Staff/staff/withdrawals…, /staff/payout-batches…, /staff/payments/:id/refund, /manual-refund-done, /staff/reconciliation/…, /staff/payment-webhooks/…
Deep linkwallet, walletTopUp, bankAccounts, receipt, studioEarnings, studioPayout, verifyIdentity

Flow: card top-up ​

  1. POST /wallet/top-ups { amount, method: "card" } → payment requires_action with checkoutUrl (Hyparrow invoice).
  2. The person pays on Hyparrow checkout. Webhook checkout.payment.completed is verified, deduped and stored, then wallet.webhook-process reads the invoice back and settles. wallet.payments-sweep (5 min) catches missed webhooks.
  3. Settled → ledger provider_clearing → user_wallet → receipt → wallet.payment.succeeded → notification payment.receipt (email wallet.topup).

Flow: bank transfer to a virtual account ​

  1. POST /wallet/funding-account { bvn, firstName, lastName, … } → 201 active (account number) or 202 pending (number arrives by customer.account.* webhook). BVN is passed through, never stored.
  2. Any transfer into that account arrives as customer.transaction.completed → a top-up net of the deposit fee → receipt.
  3. One-off transfer: POST /wallet/top-ups { method: "bank_transfer" } returns transferAccount.

Flow: withdrawal ​

  1. Creator verifies identity (tier bvn or id), adds POST /me/bank-accounts (name from bank inquiry; notification wallet.bank_account_added).
  2. POST /profiles/:profileId/withdrawals { bankAccountId, amount } → amount reserved in payout_clearing; status requested, or on_hold for a new bank account, a large amount or a first withdrawal. Notification wallet.withdrawal_requested / wallet.withdrawal_on_hold.
  3. Staff POST /staff/withdrawals/:id/approve (or reject, returning the earnings) → approved.
  4. wallet.payouts-run (hourly) batches approved withdrawals → Hyparrow transfer → processing; wallet.payouts-poll (10 min) and transfer.* webhooks → paid or failed (reversed). Event wallet.withdrawal.status_changed.
  5. wallet.reconcile runs ledger integrity and provider reconciliation daily.

Exit states ​

StateCodeActionsClient next
Balance credited——Refresh GET /wallet, show receipt
Provider downPAYMENT_PROVIDER_FAILEDretryRetry with the same key
Out of range / over limitWALLET_AMOUNT_OUT_OF_BOUNDS, WALLET_LIMIT_EXCEEDEDverify_identityVerify to raise limits
VelocityWALLET_VELOCITY_EXCEEDEDwait—
FrozenLEDGER_ACCOUNT_FROZENcontact_support—
VA pending / down / rejectedWALLET_FUNDING_ACCOUNT_PENDING (wait), WALLET_FUNDING_ACCOUNT_UNAVAILABLE (retry), WALLET_FUNDING_ACCOUNT_REJECTEDas listedFix names
Payment expiredPAYMENT_EXPIRED—Start again
KYC neededWITHDRAWAL_TIER_REQUIREDverify_identityOpen verifyIdentity
Too littleWITHDRAWAL_BELOW_MINIMUM, EARNINGS_INSUFFICIENT——
Bank accountBANK_ACCOUNT_INVALID, BANK_ACCOUNT_EXISTS, BANK_ACCOUNT_LIMIT, BANK_ACCOUNT_NOT_FOUND——
TransferWALLET_TRANSFER_SELF, WALLET_RECIPIENT_NOT_FOUND, WALLET_INSUFFICIENT_FUNDS (top_up)as listed—

Notifications ​

payment.receipt, payment.refunded, payment.manual_refund_completed, wallet.transfer_sent, wallet.transfer_received, wallet.bank_account_added, wallet.withdrawal_requested, _on_hold, _approved, _rejected, _sent, _failed.

Known gaps ​

  • A failed top-up sends nothing; payment.failed and wallet.topup_succeeded are seeded but never used (M1).
  • Reconciliation skips the bank side; refunds through Hyparrow are a manual staff task (M11).
  • KYC approval or rejection is not notified (I4).
  • Wallet history is missing from the data export; bank accounts and the funding account survive erasure (I7, B3).

Plemuz API v2