Control Numbers
Create a Control Number
Issue bill and customer Control Numbers through the API.
POST/v1/control-numberscontrol_number:create
curl https://api.teepay.me/v1/control-numbers \
-H "Authorization: Bearer $TEEPAY_API_KEY" \
-H "Idempotency-Key: invoice-1001" \
-H "Content-Type: application/json" \
-d '{
"kind": "bill",
"customer": { "name": "Asha Juma", "phone": "0712345678" },
"description": "School fees, term 1",
"amount_minor": "5000000"
}'Prop
Type
Responses
201 Created when the number is issued:
{ "id": "22222222-2222-4222-8222-222222222222", "object": "control_number", "status": "issued", "number": "991234567890", "currency": "TZS" }202 Accepted when the provider has not returned the number yet. number is null. Retry with the
same Idempotency-Key until you get 201. Never use a new key: that would request a second number.
| Status | Code | Meaning |
|---|---|---|
403 | access_denied | Control Number access is not approved for your account. |
409 | idempotency_conflict | The key was used with a different body. |
422 | invalid_request | A field is missing or invalid. |
429 | rate_limited | Per-minute rate or your daily/monthly quota is reached. |