APITaraPay
Merchant Console

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

FieldTypeReqDescription
Merchant server—MCalls TaraPay /v1 only (Bearer API key). Creates payment intents and payouts; verifies webhooks.
Customer / checkout UI—MOpens 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

FieldTypeReqDescription
Transmission—MHTTPS only; TLS 1.2+
Request mode—MPOST (and GET where documented) with JSON bodies
Data format—Mapplication/json; charset UTF-8
Authentication—MAuthorization: Bearer <API key> — not RSA body signing (unlike some PSPs)
Webhooks—MVerify HMAC signature with your webhook secret before trusting status
Business logic—MCheck HTTP outcome first, then payment/payout status fields

Environments

FieldTypeReqDescription
LocalURL—http://127.0.0.1:3002
StagingURL—http://127.0.0.1:3102 (Docker staging compose)
ProductionURL—https://api.<your-domain> (from TaraPay ops)

Common request headers

FieldTypeReqDescription
AuthorizationStringMBearer tp_test_… or tp_live_… API key
Content-TypeStringMapplication/json
Idempotency-KeyStringCRequired on create intent and create payout (1–255 chars)

Required legend

FieldTypeReqDescription
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.
Example success body (payment intent)
{
  "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.