Create a Checkout Session
Starts a payment: call this from your server, then redirect the Customer to the returned hostedUrl, which takes the payment with any Provider. Don’t fulfil on the redirect; wait for the checkout_session.succeeded webhook or retrieve the session. The Idempotency-Key header is required: a retry with the same key replays the original session instead of creating a second one, so derive it from your order. An sk_test_ key creates a Test mode session that simulates payment; an sk_live_ key creates a Live mode session that moves real money.
Authentication
Your secret key: sk_test_… in Test mode, sk_live_… in Live mode.
Headers
Client-generated key; a repeated key returns the original session.
Request
Amount to charge, in FJD cents (minor units). Must be under FJD 5,000.00 (at most 499999), in Test mode and Live mode alike. Send this with currency, or send quote instead, never both.
Always FJD in v1. Required with amount.
Price the session in USD or AUD instead of sending amount. amount is in cents of that currency. We convert it to FJD once, now, and lock the rate; the Customer sees and pays FJD only. The converted FJD amount must still be under FJD 5,000.00. Test mode only for now: a Live mode key gets quote_unavailable_in_live_mode. Only on Business accounts.
Where the hosted checkout sends the Customer after the payment succeeds. HTTPS only. Transxact appends session_id=<Checkout Session id>; confirm the outcome with GET /v1/checkout-sessions/{id} rather than trusting the redirect.
Where the hosted checkout sends the Customer if they cancel or the payment doesn’t go through. HTTPS only. Transxact appends session_id=<Checkout Session id>; confirm the outcome with GET /v1/checkout-sessions/{id} rather than trusting the redirect.
Up to 20 string key/value pairs (keys ≤40 chars, values ≤500) for matching the session to your own records. Returned on retrieve and in webhooks; never shown to the Customer. Don’t put secrets or personal data here.
The Customer’s email. In Live mode, once the payment succeeds, Transxact emails them a receipt from you (branded with your Display name) unless you’ve turned receipts off in Settings. We keep the address 30 days after the session ends and never return it. In Test mode it is checked and dropped; nothing is sent.
Response
Checkout Session created (or replayed from the Idempotency-Key).
pending until the Customer pays or the session ends. succeeded: paid, safe to fulfil. failed: the payment was declined or didn’t go through. cancelled: you cancelled it or it expired unpaid. Only pending ever changes, and each change sends the matching checkout_session.* webhook.
test for a session made with an sk_test_ key, live for an sk_live_ key. Webhook endpoints each hear one mode, and the payload says which it came from.
Amount to charge, in FJD cents (minor units).
Transxact-hosted URL to redirect the Customer to.
Your own key/value data from creation; empty object if none was set.
Unix ms timestamp after which no payment can start; a still-pending session is then cancelled.
The Invoice number, such as INV-0007, when the session pays one of your Invoices; absent otherwise. Also in the webhook payload.
Present when you created the session with a quote: the USD or AUD price you sent, the FJD rate it was converted at (a decimal string), and the Unix ms time the rate was taken. amount is the FJD that is charged. Never shown to the Customer.