API Commands
Interact with the Wajub API from your terminal — raw HTTP requests and CRUD operations on all resources.
Raw HTTP requests
The get, post, and delete commands let you call any API endpoint directly from the terminal.
wajub get /payments?per_page=5Use per_page, not limit, with wajub get
wajub get sends the query string through unmodified. The Payments/Customers/Transfers/etc.
list endpoints paginate on per_page (see Pagination) — ?limit=5 on a raw
wajub get call is silently ignored by the API and you'll get the default page size back.
wajub post /customers -d email=client@example.com -d name="Jean Dupont" -d phone=+237691234567The -d / --data flags accept key=value (repeatable) and nested keys: -d metadata.order_id=42. For a raw JSON body, use --data-raw='{"key":"value"}'.
Idempotency and connected account
Add --idempotency-key=<key> to secure POST requests, and --sync=<account_id> to operate on a sub-account.
CRUD resources
The CLI exposes CRUD-style commands for all Wajub resources. The syntax is uniform:
wajub <resource> <action> [id] [flags]Available commands
wajub balancecommandoptionalwajub currenciescommandoptionalwajub countriescommandoptionalwajub channelscommandoptionalPayments
# Create
wajub payments create -d amount=5000 -d currency=XAF \
-d customer.email=client@example.com -d channel=cm.mtn
# List (with filters)
wajub payments list --status=succeeded --limit=20 --all
# Retrieve
wajub payments retrieve trx.XXXXXXXXXXX
# Actions
wajub payments process trx.XXXXXXXXXXX -d source=mobile_money
wajub payments cancel trx.XXXXXXXXXXX
wajub payments refunds trx.XXXXXXXXXXXCustomers
wajub customers create -d email=client@example.com -d name="Jean"
wajub customers list --search=jean
wajub customers retrieve cus.XXXXXXXXXXX
wajub customers update cus.XXXXXXXXXXX -d name="Jean Dupont"
wajub customers delete cus.XXXXXXXXXXX
wajub customers block cus.XXXXXXXXXXX
wajub customers unblock cus.XXXXXXXXXXXTransfers
wajub transfers create -d amount=10000 -d currency=XAF \
-d beneficiary="6XXXXXXXX" -d channel=cm.mtn -d reason="Salary"
wajub transfers list --status=succeeded
wajub transfers retrieve trf.XXXXXXXXXXXRefunds
wajub refunds create -d payment=trx.XXXXXXXXXXX -d amount=5000
wajub refunds list
wajub refunds retrieve ref.XXXXXXXXXXXBeneficiaries
wajub beneficiaries create -d phone=+237691234567 -d name="Alice"
wajub beneficiaries list
wajub beneficiaries retrieve ben.XXXXXXXXXXX
wajub beneficiaries update ben.XXXXXXXXXXX -d name="Alice Updated"
wajub beneficiaries delete ben.XXXXXXXXXXXConnected accounts (Sync)
wajub accounts create -d name="My Store" -d email=store@example.com
wajub accounts list
wajub accounts retrieve acc.XXXXXXXXXXX
wajub accounts update acc.XXXXXXXXXXX -d name="New Name"
wajub accounts delete acc.XXXXXXXXXXX
wajub accounts token acc.XXXXXXXXXXXDisputes
wajub disputes list --status=open
wajub disputes retrieve dsp.XXXXXXXXXXX
wajub disputes accept dsp.XXXXXXXXXXX
wajub disputes close dsp.XXXXXXXXXXX
wajub disputes message dsp.XXXXXXXXXXX -d message="Message text"
wajub disputes submit-evidence dsp.XXXXXXXXXXX \
-d evidence_type=proof_of_delivery -d description="..."Events
wajub events list --type=payment.succeeded
wajub events retrieve evt.XXXXXXXXXXX
wajub events resend evt.XXXXXXXXXXXWebhooks
wajub webhooks create -d url=https://example.com/webhooks \
-d events=payment.succeeded,payment.failed
wajub webhooks list
wajub webhooks retrieve wh.XXXXXXXXXXX
wajub webhooks update wh.XXXXXXXXXXX -d url=https://new.example.com/hooks
wajub webhooks delete wh.XXXXXXXXXXX
wajub webhooks rotate-secret wh.XXXXXXXXXXXInvoices (production only)
wajub invoices create -d customer=cus.XXX -d amount=5000 -d currency=XAF
wajub invoices list
wajub invoices retrieve inv.XXXXXXXXXXX
wajub invoices send inv.XXXXXXXXXXX
wajub invoices cancel inv.XXXXXXXXXXX
wajub invoices mark-paid inv.XXXXXXXXXXX -d paid_at=2024-01-15Production only
The wajub invoices and wajub links commands require a production key. Sandbox keys will be rejected.
Payment links (production only)
wajub links create -d amount=5000 -d currency=XAF
wajub links list
wajub links retrieve lnk.XXXXXXXXXXX
wajub links update lnk.XXXXXXXXXXX -d amount=10000
wajub links delete lnk.XXXXXXXXXXXShield (anti-fraud)
wajub shield settings
wajub shield update-settings -d max_amount=500000
wajub shield stats
wajub shield block -d value="+237670000002"
wajub shield unblock blk.XXXXXXXXXXX
wajub shield blocklistIdentity
wajub identity validate -d account_number=691234567 -d channel=cm.mtn
wajub identity resolve -d account_number=691234567 -d channel=cm.mtnFilters and pagination
list commands share the same flags:
| Flag | Description |
|---|---|
--all | Follow pagination and fetch every page, capped by --limit if given |
-f, --filter=key=value | Filter (repeatable) |
--limit=<int> | With --all, caps the total number of items fetched across pages |
--page=<int> | Page to retrieve |
-q, --search=<string> | Text search |
--since=<YYYY-MM-DD> | Items created from this date |
--until=<YYYY-MM-DD> | Items created until this date |
--status=<string> | Filter by status |
--expand=<string> | Expand linked resources (repeatable) |
--limit without --all
Without --all, --limit is sent to the API as a raw limit query parameter, which the
Wajub API does not recognize (the real per-page parameter is per_page) — a plain
wajub payments list --limit=20 currently returns the default page size (25 items), not 20.
--all --limit=<n> works as documented because the cap is enforced client-side after
fetching. Use --filter per_page=<n> if you need to control the page size directly.
JSON output
Add --json to any command to get structured JSON output, ideal for scripts and CI automation.