Quick start
Collect → verified webhook → payout. Same /v1 contract for every market and rail.
End-to-end
- Create a test API key in Console → API (Developers).
- POST /v1/payments/intents with Idempotency-Key; redirect the customer to checkoutUrl.
- On verified payment_intent.succeeded webhook, credit the customer on your side (never trust returnUrl alone).
- For payouts: POST /v1/payouts when your TaraPay balance allows; mark paid only after verified payout webhook or GET status.
curl -sS -X POST '$BASE/v1/payments/intents' \
-H 'Authorization: Bearer $TP_TEST_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: brand-dep-1001' \
-d '{
"amountMinor": "10000",
"currency": "BRL",
"rail": "redirect_apm",
"paymentMethod": "pix",
"merchantOrderRef": "brand-dep-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-dep-1002' \
-d '{
"amountMinor": "10000",
"currency": "BDT",
"rail": "redirect_apm",
"paymentMethod": "bkash",
"merchantOrderRef": "brand-dep-1002",
"returnUrl": "https://brand.example/checkout/return"
}'curl -sS -X POST '$BASE/v1/payouts' \
-H 'Authorization: Bearer $TP_TEST_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: brand-wd-2001' \
-d '{
"amountMinor": "5000",
"currency": "BDT",
"paymentMethod": "bkash",
"beneficiaryRef": "01XXXXXXXXX",
"merchantOrderRef": "brand-wd-2001"
}'Change currency + paymentMethod for the market; keep the same endpoints. TaraPay picks the upstream rail. You never call Agent or FirePay APIs.