Skip to content

Checkout Process ​

Overview ​

The checkout process is a easy straightforward process that involves 4 steps. The following chart illustrates the checkout process:

🤓 Take note

Some of the steps are optional if you use an external payment gateway some of the steps are done by Geins Backend.

💡 Authenticated checkout

Each step in this flow accepts an optional requestContext with the buyer's userToken. Pass it on every call so the price-list, address, and product-access context is carried through from cart to order line. Anonymous calls fall back to the channel's regular price even mid-flow.

Get Checkout ​

The only thing needed to get a checkout, is a cartId. This means that you need to have a cart created before you can start the checkout process.

To get started read Get Checkout

💡 Tip

You can also use get checkout to get the options available for the checkout process.

Validate The Checkout ​

This validates the checkout with stock values and checks if client is blacklisted or not.

Place Order ​

Placing the order will create an order in the system to be processed.

Get Summary ​

This will return a summary of the checkout process.

🤓 Take note

Some external payment gateways expect you to render their summary.

Complete cart and remove it from users session or client ​

As a last step you can complete the cart to mark it as read-only. This is optional but recommended to keep the system clean. Read more about Complete Cart

Example ​

typescript
// load cart if not already loaded
const cart = await geinsOMS.cart.get(cartId);
// set cart as complete
await geinsOMS.cart.complete(cartId);

Released under the MIT License.