Skip to main content
Hosted Session Checkout is an enhanced version of Hosted Checkout that gives merchants a more flexible, persistent payment experience. It’s an indirect payment channel: the customer is redirected from the merchant’s website to a CommercePay-hosted payment page to complete the transaction. Unlike a standard hosted checkout, CommercePay holds the payment session open for a single order until the customer successfully completes payment — allowing multiple retries or channel switches without starting a new checkout. This reduces development complexity while improving payment success rate and customer experience.
Recommended for: Merchants seeking a simple, low-code integration that also needs a persistent session supporting retries and resumable payments.

Purchase Flow

Below is the visual lifecycle of a Hosted Session Checkout transaction. The complete end-to-end payment flow operates as follows:
1

Checkout Initiation

The customer decides to check out an order on the merchant’s website.
2

Initiate Session Request

The merchant backend calls the Hosted Session Checkout endpoint to create a payment session for the order. Upon success, CommercePay returns a session URL for the hosted payment page.
3

Redirect to Session Page

The merchant redirects the customer’s browser to the returned session URL, landing them on the persistent hosted payment page.
4

Channel Selection & Payment

On the session page, the customer selects a payment channel and completes payment. If the customer cancels or an attempt fails, the session stays active — they can pick another channel and retry without restarting checkout.
5

Resume Interrupted Sessions (Conditional)

If the customer accidentally closes the session page before finishing, the merchant can reuse the same session URL to reopen it and continue payment, as long as the session hasn’t expired.
6

Provider Webhook/Callback

Once the customer completes payment, the upstream Payment Provider asynchronously triggers a webhook notification back to the CommercePay Gateway with the transaction outcome.
7

Merchant Webhook/Callback

Upon receiving and processing the provider’s notification, CommercePay fires a signed, asynchronous backend-to-backend HTTP POST callback to the merchant’s server with the final payment status.
8

Order Summary Page

The customer sees the final merchant payment result, receipt, or order status page based on the transaction update processed by the merchant’s backend.
9

Status Verification (Conditional)

If the session page doesn’t return a success response, the merchant should call the Query Payment API to retrieve the latest payment status from the Payment Provider.