Quickstart

Signup only requires an email address and your business or individual name — no documents, no waiting. You get a Test mode API key immediately, so you can integrate against Provider sandboxes within minutes. Live mode unlocks once you submit Verification (a TIN and TIN card photo on both tiers, plus business registration for a Business account or personal ID for an Individual account), reviewed asynchronously in the background.

1. Create a Checkout Session

curl https://api.transxact.io/v1/checkout-sessions \
-X POST \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: a1b2c3d4-order-9912" \
-H "Content-Type: application/json" \
-d '{ "amount": 5000, "currency": "FJD" }'

The Idempotency-Key header is required. If your server times out and retries the create call, the same key replays the original response instead of creating a second Checkout Session with a second redirect URL for the same customer. Replayed responses are stored for ~24h.

2. Redirect your customer

The response includes a redirect URL for the hosted Checkout Session. Send your customer there to complete payment against the Provider sandbox.

To bring your customer back afterwards, add successUrl and cancelUrl to the create call (both optional, HTTPS only):

{
"amount": 5000,
"currency": "FJD",
"successUrl": "https://shop.example/orders/9912/thanks",
"cancelUrl": "https://shop.example/cart"
}

Once the payment succeeds, the hosted page returns them to successUrl. If they cancel, or the payment doesn’t go through, it offers a way back to cancelUrl. Both arrive with ?session_id=cs_... appended. Anyone can open a URL, so use session_id to look the Checkout Session up (GET /v1/checkout-sessions/{id}) or wait for the webhook before fulfilling the order.

To match a session to your own order without keeping a mapping, add "metadata": { "orderId": "9912" }. You can send up to 20 string pairs. They come back on retrieve and in every webhook, and are never shown to your customer.

A Checkout Session expires 24 hours after you create it. To change that, set expiresAt to a Unix-milliseconds time between 30 minutes and 24 hours ahead. Once a session expires it can’t be paid, and it moves to cancelled with a checkout_session.cancelled webhook. To withdraw a session before then, call POST /v1/checkout-sessions/{id}/cancel. That returns payment_in_progress if your customer has already started paying.

3. Listen for the webhook

Transxact notifies your backend of the outcome via an outbound webhook rather than requiring you to poll. See Verifying webhooks for how to check the signature before trusting the payload.

4. Go live

Submit Verification from the dashboard whenever you’re ready — it’s reviewed in the background, with no blocking modal or sales call. Once approved, switch your integration from sk_test_... to sk_live_... keys. See Test vs Live mode for what else changes.