TeePayDocs
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.

StatusCodeMeaning
403access_deniedControl Number access is not approved for your account.
409idempotency_conflictThe key was used with a different body.
422invalid_requestA field is missing or invalid.
429rate_limitedPer-minute rate or your daily/monthly quota is reached.

On this page