Build on the AfghanBasket grocery-voucher network.
A closed-loop API for resellers, wallets, remittance providers and marketplaces to sell AfghanBasket grocery vouchers to their own customers — issued, redeemed and reconciled in real time.
https://afghanbasket.shop/api/partner/v1Real-time voucher issuance
Issue and activate a closed-loop grocery voucher the moment your buyer pays — one API call, unique code returned instantly.
Idempotent & reliable
Every issue and redeem is idempotent on your own reference, so retries never double-charge or double-issue.
Signed webhooks
Receive HMAC-SHA256 signed events on every status change, with GET /transactions as a reconciliation fallback.
Full lifecycle control
Issue, look up, redeem and cancel vouchers — with a clear state machine and predictable error codes.
Issue your first voucher in two calls
Authenticate with your x-api-key, confirm connectivity, then issue an activated voucher once your buyer has paid.
1. Check connectivity
curl -s https://afghanbasket.shop/api/partner/v1/ping \
-H "x-api-key: $AFGHANBASKET_KEY"2. Issue & activate a voucher
curl -s -X POST https://afghanbasket.shop/api/partner/v1/vouchers \
-H "x-api-key: $AFGHANBASKET_KEY" \
-H "Content-Type: application/json" \
-d '{
"partner_reference": "partner-txn-abc123",
"amount": 50,
"recipient": { "name": "Bibi Haji", "city": "Kabul" }
}'Seven endpoints, one base URL
/pingConnectivity & API-key check./catalogDenominations, commission and net amounts./vouchersIssue & activate a voucher (idempotent)./vouchers/{code}Look up a voucher by code./vouchers/{code}/redeemRedeem against fulfilment./vouchers/{code}/cancelVoid a voucher before redemption./transactionsFiltered, paginated reconciliation feed.