Checkout Sessions let you redirect customers to an Axra-hosted payment page instead of collecting card details yourself. You create a session with a single API call, redirect the customer to the returned URL, and Axra handles card entry, validation, 3D Secure authentication, and the post-payment redirect — all without any card data touching your servers. Because Axra absorbs the card data handling, you are not in PCI DSS scope for card storage or transmission.Documentation Index
Fetch the complete documentation index at: https://docs.useaxra.com/llms.txt
Use this file to discover all available pages before exploring further.
If you need full control over the payment UI or want to charge cards programmatically from your server, use the Payments API instead. Both approaches support 3DS and webhooks.
How checkout sessions work
Create a session
Call
POST /business/payment/session from your server with the payment amount, currency, and redirect URLs. Axra returns a checkoutUrl and a sessionId.Redirect the customer
Send the customer’s browser to the
checkoutUrl. You can do this with a server-side redirect or by opening the URL in a new window, but a full-page redirect gives the best experience.Customer completes payment
The customer enters their card on Axra’s hosted page. If the card requires 3DS, Axra handles the challenge entirely within the checkout experience — the customer never leaves the Axra-hosted page.
Customer is redirected
On success, Axra redirects the customer to your
successUrl. If the customer clicks “Cancel” or the session expires, they are sent to your cancelUrl. The successUrl supports a {SESSION_ID} placeholder that Axra replaces with the actual session ID.Create a checkout session
POST /business/payment/session
Creates a new hosted checkout session and returns a URL to redirect your customer to.
Authentication
Pass your API key in thex-api-key header, or include a valid JWT Authorization: Bearer <token> header.
Request parameters
Payment amount in major currency units (e.g.,
25.00). Minimum value is 0.50.ISO 4217 currency code in lowercase (e.g.,
"usd", "eur", "ngn").URL to redirect the customer to after a successful payment. You can include the
{SESSION_ID} placeholder — Axra will replace it with the actual session ID on redirect. Example: "https://yourapp.com/payment/success?session={SESSION_ID}".URL to redirect the customer to if they cancel the checkout or if the session expires.
Short description displayed on the Axra-hosted checkout page (e.g.,
"Subscription — Pro Plan"). Helps customers recognize what they are paying for.Customer email address. Pre-fills the email field on the checkout page so the customer does not have to type it.
How long the session remains valid, in seconds. Minimum
300 (5 minutes). After expiry, customers visiting the checkoutUrl are redirected to your cancelUrl.Arbitrary key-value pairs attached to the session and included in the
payment.completed webhook payload. Use this to store your internal order ID, user ID, or any other reference.Response fields
Unique identifier for the checkout session. Use this to look up the associated payment later.
The fully-formed URL to redirect your customer to. Valid until
expiresAt.ISO 8601 timestamp indicating when the session expires.
The session amount in major currency units, confirming what was set.
ISO 4217 currency code confirming the session currency.
Example
Handling the post-payment redirect
When Axra redirects to yoursuccessUrl, the URL will contain the session ID if you included the {SESSION_ID} placeholder. You can read this value from the query string to associate the redirect with the correct order.
Node.js (Express)
Listening for payment confirmation
Configure a webhook URL in your Axra Pay dashboard and handle thepayment.completed event. The payload includes the sessionId in the metadata object alongside any custom metadata you provided when creating the session.
Node.js (Express)
Session expiry
If a customer does not complete payment before the session expires, Axra redirects them to yourcancelUrl. The expired session cannot be reactivated — create a new session if the customer wants to try again.
The minimum session duration is 300 seconds (5 minutes). For checkout flows with multiple steps before payment, set
expiresIn to at least 900 seconds (15 minutes) to avoid premature expiry.