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
| Field | Type | Req | Description |
|---|---|---|---|
amountMinor | String | M | Positive integer string in minor units |
currency | String | M | Currency code, e.g. BRL, BDT, USDT, PHP |
rail | String | M | redirect_apm | trc20_usdt | hosted_fiat |
paymentMethod | String | C | Required for redirect_apm — catalog code e.g. pix, bkash, nagad, qrph_qr |
merchantOrderRef | String | O | Your platform order id (max 128) |
merchantCustomerRef | String | O | Your customer id (max 128) |
returnUrl | String | O | HTTPS URL after payer returns from checkout (not a trust signal for credit) |
metadata | Object | O | Up to 20 keys; string|number|boolean values |
expiresInSeconds | Number | O | 60–86400; default 3600 |
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"
}'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"
}'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
| Field | Type | Req | Description |
|---|---|---|---|
id | UUID | M | Payment intent id |
status | String | M | Usually requires_payment after create |
checkoutUrl | String | C | Redirect the payer here — primary handoff for APM and hosted pages |
cryptoDeposit | Object | C | Address + expiry when rail is trc20_usdt |
railSession | Object | O | Opaque provider session metadata (do not depend on internal codes) |
redirectUrl | String | O | Immediate 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.