docs
  1. Checkout
  2. Implementation
  3. Order Success Page

Order Success Page

Order Success Page (OSP) is the last step in the process of the purchase. When an order is completed, the customer is redirected to the Order Success Page with a callback data (cbd) token.

By default the OSP is valid for 3 minutes after completing the checkout process. After expiration of time the OSP will display an error which will also prevent any further purchase events.

OSP structure

The shop frontend needs to have an Order Success Page (OSP) in place.
Defaults to /order/success but can be changed.

Check Routes configuration for details how to update default routes.

When the user enters the Checkout (e.g. /checkout ) to make a payment and successfully places the order, they will be redirected to the order success page with a cbd token attached as query parameter to the URL (https://<shopName.domain>/order/success?cbd=<base64EncodedToken>).

Example/default
Checkout/checkout
Order Success Page (OSP)/order/success
Example URLhttps://<shopName.domain>/order/success?cbd=<base64EncodedToken>

Callback data (cbd) token

The callback data (cbd) token is generated after completing the checkout process.

Before the shop renders the OSP page, it should decode the cbd token on its backend and validate that the given signature is correct.

  • If the cbd token is invalid, then the shop shouldn't display user data, but instead redirect to a 404 error page or show a relevant message on the OSP for this case.
  • If the cbd token is valid, the shop can proceed, parse the payload and use the included information to render the page.

The Frontend Backend needs to know the secret which is used to sign the cbd token.

The cbd token is provided by Checkout and consists of two parts separated by .

The cbd token is encoded in base64 and needs to be split into two parts according to its format:
${payload}.${signature}.

Example cbd token in encoded format

Example decoded payload:

To verify the signature you need to generate a hash (sha256) of the $payload with the shopSecret.