APITaraPay
Merchant Console

Create payment intent

Create a collection order — PIX-style APM pattern

POST/v1/payments/intentsScope: payments:write

Create an intent from your server, send the customer to checkoutUrl (or show pay instructions), then credit only after a verified webhook. Same request shape for PIX, BD wallets, QRPH, and other APM methods — only currency and paymentMethod change.

Request body

FieldTypeReqDescription
amountMinorStringMPositive integer string in minor units
currencyStringMCurrency code, e.g. BRL, BDT, USDT, PHP
railStringMredirect_apm | trc20_usdt | hosted_fiat
paymentMethodStringCRequired for redirect_apm — catalog code e.g. pix, bkash, nagad, qrph_qr
merchantOrderRefStringOYour platform order id (max 128)
merchantCustomerRefStringOYour customer id (max 128)
returnUrlStringOHTTPS URL after payer returns from checkout (not a trust signal for credit)
metadataObjectOUp to 20 keys; string|number|boolean values
expiresInSecondsNumberO60–86400; default 3600
Example — PIX (Brazil)
curl -sS -X POST '$BASE/v1/payments/intents' \
  -H 'Authorization: Bearer $TP_TEST_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: brand-pix-1001' \
  -d '{
    "amountMinor": "10000",
    "currency": "BRL",
    "rail": "redirect_apm",
    "paymentMethod": "pix",
    "merchantOrderRef": "brand-pix-1001",
    "merchantCustomerRef": "customer-42",
    "returnUrl": "https://brand.example/checkout/return"
  }'
Example — BD wallet (hosted / APM)
curl -sS -X POST '$BASE/v1/payments/intents' \
  -H 'Authorization: Bearer $TP_TEST_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: brand-bkash-1001' \
  -d '{
    "amountMinor": "10000",
    "currency": "BDT",
    "rail": "redirect_apm",
    "paymentMethod": "bkash",
    "merchantOrderRef": "brand-bkash-1001",
    "returnUrl": "https://brand.example/checkout/return"
  }'
Example — USDT TRC-20
curl -sS -X POST '$BASE/v1/payments/intents' \
  -H 'Authorization: Bearer $TP_TEST_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: demo-usdt-1' \
  -d '{
    "amountMinor": "1000000",
    "currency": "USDT",
    "rail": "trc20_usdt",
    "paymentMethod": "trc20_usdt",
    "merchantOrderRef": "demo-order-1"
  }'

Response highlights

FieldTypeReqDescription
idUUIDMPayment intent id
statusStringMUsually requires_payment after create
checkoutUrlStringCRedirect the payer here — primary handoff for APM and hosted pages
cryptoDepositObjectCAddress + expiry when rail is trc20_usdt
railSessionObjectOOpaque provider session metadata (do not depend on internal codes)
redirectUrlStringOImmediate wallet redirect when applicable
Idempotency-Key is required. Same key + same body replays 201; same key + different body → 409. Amount and currency are immutable after create. Source of truth for credit = verified webhook (or GET status), not returnUrl.