Create collection
/business/collectionsCreates a collection and immediately sends a payment prompt (push, STK or USSD) to the customer’s phone. Supported in Kenya, Tanzania and Uganda. The final result arrives by webhook, or poll GET /business/collections/{collectionId}.
Headers
AuthorizationrequiredBearer YOUR_ACCESS_TOKEN from POST /business/auth.
Content-Typerequiredapplication/json
Body
amountnumberrequiredAmount in major units: 5000 is TZS 5,000. Minimum in Uganda: 500 UGX.
currencystringrequiredKES, TZS or UGX. Must match the country of mobile.
mobilestringrequiredCustomer’s number in E.164 format: +254…, +255… or +256….
referencestringoptionalYour reference, unique per business. Reusing one returns 409 duplicate reference.
narrationstringoptionalShown to the customer in Kenya and Uganda; not shown in Tanzania.
callbackUrlstringoptionalWebhook URL for this collection only. Overrides your business default.
Tanzania
curl -X POST https://api.test.wakapay.io/business/collections \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "TZS",
"mobile": "+255700000001",
"reference": "INV-1001",
"narration": "Invoice 1001"
}'{
"id": "019abc...",
"status": "collection_pending",
"amount": 5000,
"currency": "TZS",
"mobile": "+255700000001",
"reference": "INV-1001",
"narration": "Invoice 1001",
"provider": "airtel",
"mnoPaymentReference": null,
"businessId": "biz_abc123",
"createdAt": "2024-08-08T07:53:06Z",
"updatedAt": "2024-08-08T07:53:06Z"
}Tanzania: USSD or wallet prompt. Narration is not shown to the customer.
{
"code": 0,
"error": "duplicate reference"
}For production, use https://api.wakapay.io and a real number. provider may be empty at first; mnoPaymentReference stays null until the customer pays.
Responses
| Status | Meaning |
|---|---|
| 201 | Created. Status collection_pending. Prompt sent to customer. |
| 400 | invalid payload, currency does not match mobile country, or unsupported country (KE/TZ/UG only). |
| 401 | Missing or expired access token. |
| 403 | collections not enabled for this business. Contact Waka. |
| 409 | duplicate reference. Reference already used. |
| 422 | SERVICE_DISRUPTED. Collections are temporarily unavailable; check Service status. |
| 500 | Provider not configured. Provider outage; contact support. |