Skip to main content

Dynamic TANQR

The Dynamic TANQR API enables merchants to generate a unique QR code for every payment transaction. Customers can scan the QR code using any participating banking or mobile banking application that supports the Tanzania National QR (TANQR) standard. Unlike Static QR codes, Dynamic QR codes are generated per transaction and include the payment amount and transaction reference.

Dynamic QR Payments

Generate a unique QR code for every payment and receive real-time payment notifications through webhooks.

Endpoint


Base URL


Request Body


Example Request


Successful Response


QR Code

The qr field contains the generated QR code as a Base64-encoded PNG image. To display the QR code in a web browser, prepend the following prefix:
Example

Payment Status


Webhook Payload


Error Responses

Invalid Request

Authentication Failed

Duplicate Request


Best Practices

1

Generate a unique reference

Every QR payment should use a unique merchant reference.
2

Display the QR immediately

Render the Base64 image returned in the qr field to allow the customer to scan and pay.
3

Use Webhooks

Update transaction status using webhook notifications instead of polling.
4

Verify Payment Status

If a webhook is delayed, retrieve the latest transaction status using the Payment Status endpoint.
5

Use Idempotency Keys

Always include a unique Idempotency-Key when generating a Dynamic TANQR.