Skip to content

Sandbox Quickstart ​

Send fiscal documents from your ERP or POS to your Bizflow account. Your records stay in your company's tenant. The API does not create receivables, ledger entries, payments or ordinary Bizflow invoices.

Preview

This API is under development. Do not send production traffic until your account is enabled and the release is confirmed.

1. Create a sandbox key ​

In your account, open Settings > Developer API, select Sandbox and create a scoped key. Copy it once into your server's secret store. Never put a secret in browser code, a mobile app, a URL or a committed environment file.

Your company's fiscal connection must also be configured for sandbox. A sandbox key cannot submit to a production connection.

sh
export BIZFLOW_BASE_URL='https://api.bizflow.africa/api/etims/v1'
# Set BIZFLOW_API_KEY from your secret manager.

2. Register a product ​

Use valid classification, unit and tax codes from your configured account. This example is a service, so no stock adjustment is needed.

sh
curl "$BIZFLOW_BASE_URL/products" \
  -H "Authorization: Bearer $BIZFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: sandbox-product-001' \
  -d '{"externalReference":"SERVICE-001","name":"Consultation","description":"Consultation service","type":"SERVICES","taxCategory":"B","classificationCode":"85121600","unitCode":"U","packagingCode":"NT","originCountry":"KE","unitPrice":"116.00"}'

Retain the returned id. Poll GET /products/{id} until status is REGISTERED. Do not submit an invoice while registration is pending.

3. Send an invoice ​

Replace PRODUCT_ID with that ID. Prices and fixed discounts in v1 are tax-inclusive KES amounts. The customer PIN is optional; omit kraPin for a customer without one.

sh
curl "$BIZFLOW_BASE_URL/invoices" \
  -H "Authorization: Bearer $BIZFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: sandbox-invoice-001' \
  -d '{"externalReference":"POS-001","issuedAt":"2026-10-26T10:00:00+03:00","currency":"KES","paymentMethod":"01","buyer":{"name":"Walk-in customer"},"items":[{"productId":"PRODUCT_ID","quantity":"3","unitPrice":"116.00","discount":{"type":"PERCENTAGE","value":"10.00"}}]}'

Use the actual transaction timestamp. For a configured 16% rate, this example gives Total Amount 313.20, Total Tax 43.20, and a 34.80 discount. See fixed amount examples.

4. Confirm the outcome ​

Poll GET /invoices/{id}. 202 Accepted means the request was stored, not that KRA accepted it. Only COMPLETED includes a verified receipt. SIMULATED is sandbox-only and is not a KRA receipt.

After completion, download GET /documents/{id}/pdf. Repeated downloads carry a COPY watermark. Import the Postman collection to run the full flow, including a partial credit.

Bizflow eTIMS Customer API v1