Overview
Read this first — hosts, protocol, auth, and money rules for TaraPay merchant APIs.
This guide is for merchant IT teams integrating TaraPay collection (pay-in) and payout. Keep Console → API for keys, IP allowlist, and webhook URL; use these pages for request/response contracts.
Production base URL is issued by TaraPay ops after merchant approval. Local and staging hosts below are for development only.
Who integrates what
| Field | Type | Req | Description |
|---|---|---|---|
Merchant server | — | M | Calls TaraPay /v1 only (Bearer API key). Creates payment intents and payouts; verifies webhooks. |
Customer / checkout UI | — | M | Opens checkoutUrl (or shows pay instructions). Never holds API keys. |
TaraPay rails | — | — | Provider behind each paymentMethod is chosen by TaraPay. Merchants do not integrate Agent or upstream PSP portals. |
Typical flow: create a payment intent → credit your customer on the verified payment webhook → create a payout to send funds out. See Quick start.
Communication agreement
| Field | Type | Req | Description |
|---|---|---|---|
Transmission | — | M | HTTPS only; TLS 1.2+ |
Request mode | — | M | POST (and GET where documented) with JSON bodies |
Data format | — | M | application/json; charset UTF-8 |
Authentication | — | M | Authorization: Bearer <API key> — not RSA body signing (unlike some PSPs) |
Webhooks | — | M | Verify HMAC signature with your webhook secret before trusting status |
Business logic | — | M | Check HTTP outcome first, then payment/payout status fields |
Environments
| Field | Type | Req | Description |
|---|---|---|---|
Local | URL | — | http://127.0.0.1:3002 |
Staging | URL | — | http://127.0.0.1:3102 (Docker staging compose) |
Production | URL | — | https://api.<your-domain> (from TaraPay ops) |
Common request headers
| Field | Type | Req | Description |
|---|---|---|---|
Authorization | String | M | Bearer tp_test_… or tp_live_… API key |
Content-Type | String | M | application/json |
Idempotency-Key | String | C | Required on create intent and create payout (1–255 chars) |
Required legend
| Field | Type | Req | Description |
|---|---|---|---|
M | — | — | Mandatory |
O | — | — | Optional |
C | — | — | Conditional — required in some flows |
Amounts are always integer minor-unit strings (never floats). Example: BDT 100.00 → "10000" (2 decimals); USDT 1.000000 → "1000000" (6 decimals). Live keys need at least one IP/CIDR on the Console allowlist.
{
"id": "0193a0…",
"status": "requires_payment",
"amountMinor": "10000",
"currency": "BRL",
"rail": "redirect_apm",
"paymentMethod": "pix",
"checkoutUrl": "https://pay.example/checkout/0193a0…",
"livemode": false
}HTTP status codes follow REST conventions (201 create, 200 read, 4xx client, 5xx server). Error bodies use Nest-style message / statusCode — see Error codes under Reference.