টাকা এলো

Search the docs

Pages, sections and error codes

Get started

API keys and requests

Secret keys, test and live mode, idempotency keys and rate limits — the rules every request follows.

Secret keys

Send your secret key as a Bearer token on every request. Create keys in Developers › API keys; each one is shown once and stored only as a hash, so copy it straight into your server's environment.

HTTP
GET /v1/payments HTTP/1.1
Host: api.takaelo.com
Authorization: Bearer sk_live_51Hq…
PrefixModeSees
sk_test_TestOnly test payments. Checkouts can be paid with Simulate payment; success_url may be http://localhost.
sk_live_LiveOnly real payments, paid with real money into your wallet number.

A missing header, a key that is made up, revoked, or from another account: every one gets 401 API_KEY_INVALID — the same reply whatever the reason, so nobody can probe which keys exist.

Base URL and format

  • Base URL: https://api.takaelo.com/v1. HTTPS only.
  • Send JSON with Content-Type: application/json. Replies are always JSON.
  • Amounts are whole taka as numbers: 1250 means ৳1,250. Currency is always BDT.
  • Times are unix seconds (1791641454).
  • Every reply has success and message. Successes carry data; errors carry a stable code and a request_id — quote it when you write to support.

Idempotency keys

Every POST needs an Idempotency-Key header (1–255 characters). Use something that identifies the action in your system — order-4821-1 for the first checkout attempt of order 4821 (-2 for a new attempt after it failed or expired), refund-pay_… for a refund. Then a retry after a timeout can never create a second checkout or refund twice, and a new attempt isn't answered with the old checkout (a key is remembered for 24 hours).

You sendTakaElo replies
A new keyDoes the work and remembers the reply for 24 hours.
The same key and the same body againThe first reply, unchanged, with the header Idempotent-Replayed: true.
The same key with a different body422 IDEMPOTENCY_KEY_REUSED — a bug in your code; nothing happens.
The same key while the first request is still running409 IDEMPOTENCY_IN_PROGRESS — wait a second and retry with the same key.
No key400 IDEMPOTENCY_KEY_REQUIRED.

Rate limits

Each key may make 300 requests a minute. Above that you get 429 RATE_LIMITED with a Retry-After header in seconds. Normal shops never come close; if you sync payments in bulk, page through GET /v1/payments with limit=100 instead of fetching payments one by one.