E
Exxari Developer Docsv1.0 Stable

2. Create Hosted Checkout Session

Create hosted checkout sessions that redirect customers to a secure payment form. Customize success and cancellation URLs for post-payment handling.

POST/v1/checkout/sessions

Required Headers

Authorization:Bearer sec_key_live_••••••••••••••••
Content-Type:application/json

Request Body

JSON Payload
{
  "amount": 150,
  "currency": "USD",
  "merchant_reference": "INV-2026-004",
  "description": "Exxari Premium Tier Subscription",
  "customer": {
    "name": "Michael Amoo",
    "email": "m.amoo@exxari.com"
  },
  "redirect_url": "https://exxari.health/billing/success",
  "cancel_url": "https://exxari.health/billing/cancel"
}

Response

Response Payload
{
  "status": "success",
  "session_id": "cs_live_9921c8b3f11a",
  "checkout_url": "https://checkout.exxari.com/pay/cs_live_9921c8b3f11a",
  "expires_at": "2026-05-30T09:30:00Z"
}