API conventions
Base URL, request and response format, amounts, currencies, identifiers, timestamps and rate limits for the Tranzak API.
These rules apply to every endpoint of the Tranzak API.
Base URL
https://api.tranzak.co/api/gateway/v1
Every endpoint in this documentation is relative to that URL. The path is /api/gateway/v1/…, not /v1/… and not /api/v1/….
Secure connection
The API only accepts HTTPS. Use TLS 1.2 or newer (TLS 1.3 is recommended): servers and libraries that still use TLS 1.0 or 1.1 will soon be refused. If your requests fail with an SSL or handshake error and never reach our API, update your server software (for example OpenSSL, or your PHP, Node.js, Python or Java runtime) and try again. Always call https://api.tranzak.co.
Requests
| Item | Value |
|---|---|
| Authentication | X-Api-Key: <your key> on every request. See Authentication. |
| Body | JSON, with Content-Type: application/json. |
| Accept | Accept: application/json. |
Responses
Most responses use this envelope:
{ "success": true, "data": { } }
Note
POST /paymentsis the exception: it returns its fields at the root of the JSON. Every other endpoint wraps the result indata. Failed requests return{ "success": false, "error": "…", "message": "…" }.
Amounts and currencies
- Amounts are in the currency's real unit:
500means 500 gourdes, not cents. - Amounts are returned as strings (
"250.00"). Parse them as decimals and never compare them with floating-point numbers. - Supported currencies are
HTGandUSD. - MonCash and NatCash are paid in gourdes. A
USDamount is converted to HTG at the Tranzak rate before the payment is created. See Currencies and exchange rate.
Identifiers and dates
| Item | Format |
|---|---|
transaction_id |
A numeric string, for example "17843268616389". |
reference |
Your own order identifier, up to you. It is not enforced as unique. |
| Timestamps | ISO 8601 in UTC, for example 2026-10-04T14:00:00.000000Z. |
Rate limits
- 60 requests per minute per IP address. Beyond that the API answers
429withrate_limit_exceededand aretry_aftervalue in seconds. - 10,000 requests per hour per API key by default (
429 api_key_rate_limit_exceededbeyond it). Contact support if your volume needs more: the limit can be raised for your account. Responses carryX-RateLimit-Hour-LimitandX-RateLimit-Hour-Remaining. Details in Errors and rate limits. - 10 invalid-key attempts per hour per IP address answer
429 too_many_attempts.
Back off when you receive a 429. Never retry an invalid key in a loop.
No idempotency key
The API has no idempotency key, and reference is not enforced as unique. Retrying POST /payments after a timeout can create a second payment. To protect yourself:
- Send a unique
referencefor each order. - Before creating again, call
GET /payments/reference/{reference}and reuse an existing payment that is not final. - Disable your pay button after the first click.