Skip to contentSkip to Content
API ReferenceCollectionsPOSTCreate collection

Create collection

POST/business/collections

Creates 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

Authorizationrequired

Bearer YOUR_ACCESS_TOKEN from POST /business/auth.

Content-Typerequired

application/json

Body

amountnumberrequired

Amount in major units: 5000 is TZS 5,000. Minimum in Uganda: 500 UGX.

currencystringrequired

KES, TZS or UGX. Must match the country of mobile.

mobilestringrequired

Customer’s number in E.164 format: +254…, +255… or +256….

referencestringoptional

Your reference, unique per business. Reusing one returns 409 duplicate reference.

narrationstringoptional

Shown to the customer in Kenya and Uganda; not shown in Tanzania.

callbackUrlstringoptional

Webhook URL for this collection only. Overrides your business default.

cURL
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" }'
201Created
{ "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.

409Conflict
{ "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

StatusMeaning
201Created. Status collection_pending. Prompt sent to customer.
400invalid payload, currency does not match mobile country, or unsupported country (KE/TZ/UG only).
401Missing or expired access token.
403collections not enabled for this business. Contact Waka.
409duplicate reference. Reference already used.
422SERVICE_DISRUPTED. Collections are temporarily unavailable; check Service status.
500Provider not configured. Provider outage; contact support.