- aren’t PCI-DSS certified and want to keep it that way,
- want the fastest integration with the least code, or
- are happy to send customers to a lite-hosted (but brand-able) page to pay.
How it works
- Create a session. Your server calls
POST /v1/checkout/sessionsand gets back apayment_link. - Redirect the customer. You send them to the
payment_link. They pay on lite’s hosted page. - Customer returns. lite sends cardholders back to your
successorfailureURL, so you can show a result right away. - Confirm with a webhook. lite sends a
payment.capturedevent to your server. This is the source of truth you fulfill from.
Completed, Expired, or Cancelled. The return URL tells you the session resolved; the webhook tells you the money actually moved. Treat the webhook as your source of truth — see Step 4.
Before you begin
This guide assumes your one-time setup is done. You can re-check any of it from the dashboard. You’ll need:- A lite account in good standing.
- Test and live API keys. Test keys are prefixed
sk_test_; live keys are prefixedsk_with no environment segment (for example,sk_01KYFJ...). The prefix determines the environment, and a key withouttest_is a live key that moves real money. - At least one channel configured, with its
channel_id(unless you intend to use the default channel option). A channel sets your enabled payment methods, branding, and default redirect URLs. - A webhook endpoint registered, you’ll need it for fulfillment in Step 4.
Step 1: Create a session
Create the session from your backend, so a customer can’t tamper with the amount or currency.Required headers
Key request fields
Response
Pending. Hold on to the id (a UUID), you’ll use it to match the webhook, and to look the session up later if you need to. (client_secret is only for the Drop-in SDK; you can ignore it for the hosted redirect.)
By default, 3D Secure is applied automatically based on the card scheme and SAMA rules; for mada and most KSA cards it’s mandatory. Set three_ds_required: true if you want to force it on every payment.
Step 2: Redirect to the hosted page
Send the customer topayment_link with an HTTP 303:
303, not 302, so the browser switches to a GET for the checkout page even though your endpoint received a POST. From here the customer pays entirely on Lite’s domain — you never see their card details.
Step 3: Handle the return
After checkout, lite sends the customer back to one of yourredirect_urls:
success: the payment went through.failure: the payment failed, or the customer cancelled.
Step 4: Confirm with a webhook
Webhooks are how you reliably learn the outcome of every payment. For the Hosted Page flow, subscribe to these events:
Verify the signature and confirm the outcome with a server-side read of the payment before you fulfill. Persist the event before returning a successful response, and process events idempotently, because a delivery may be repeated. If your endpoint does not respond successfully, lite retries.
For the event list, the payload shape, and how to verify signatures, see the Create a webhook page.
Test and go live
Test mode accepts lite’s published test cards. At a minimum, confirm each of these outcomes:
Before you switch to your live key, confirm that:
- Your account has KYB verification complete and payment acceptance activated.
- Your webhook endpoint verifies the signature and returns
200. - A session creates successfully and returns a
payment_link. - The redirect reaches lite’s hosted page and back to your return URL.
- Fulfillment fires from
payment.captured, not from the return URL. - A declined card shows up correctly on your
failurepage.