Checkout Service Tutorials

As the checkout functionality is the core of your commerce operations, make sure it works properly in your online store.

The checkout service validates data that comes from different points in the system: cart, order, payment, delivery zone, shipping method, tax, and customer. Therefore, you need proper configuration of these services to make checkout work as expected. This tutorial guides you through the basic setup of the checkout service.

How to configure the Checkout Service

Gather information about a customer's session on the storefront

You need details about the customer's access and session tokens as these details influence the checkout process.

  1. When a user enters your storefront, before they choose to log in, an anonymous user session is created.
Get an anonymous access token by sending a request to the Requesting an anonymous token endpoint.
Loading...
  1. Log the customer in and send an authorization request to the Requesting a customer token endpoint.
attention

You can skip this step and continue with the checkout process as a guest customer without the need to log in.

Loading...

This operation returns the customer's access token and Saas token, which convey information about the customer and their activities on the storefront. You might need these details in subsequent steps to get a proper authorization when a customer is logged in.

Add tax configuration

Each country that you operate in may have different tax rules for different products and services. Add relevant configuration to calculate taxes accordingly.

Add tax configuration by sending a request to the Creating a new tax configuration endpoint.
Loading...

Define the delivery zone, method, and time

Delivery zone is the area where you ship your goods to. You can define a country, or a zip code that you operate within. Delivery method is dependant on a specific site and delivery zone.

  1. Define the delivery zone by sending a request to the Creating a shipping zone endpoint.
Loading...
  1. Specify how the goods can be shipped to a customer by sending a request to the Creating a shipping method endpoint.
Loading...
  1. Define delivery time that will be matched with the delivery method and zone by sending the request to the Creating a delivery time endpoint.
Loading...

Add products to your store

To create and add multiple products to your store, send the request to the Creating multiple products endpoint.
Loading...

Create a price model and connect it to products

Price model defines your pricing strategy. You can specify how you want to go about price tiers and selling volumes.

  1. To define a price model send a request to the Creating a new price model endpoint.
Loading...
  1. Create a price for a specific product by sending a request to the Creating a new price endpoint.
Loading...
  1. Match the price by session context to allow your customers find the best price based on information retrieved from the session context.
warning

The following request requires using the customer's access token for authorization, either anonymous or logged in, as the response contains the bearer's information.

Send the request to the Matching prices for session context endpoint.
Loading...

Create a cart

warning

The following requests require using the customer's access token for authorization, either anonymous or logged in, as the response contains the bearer's information.

  1. You have to enable an option to create a cart on your site while a customer is browsing through your products. Creating a cart takes care of things like gathering customer's session details, even anonymous, or setting up a proper cart's currency for final calculations at checkout. There are two options to create carts using API:
Loading...
Loading...
  1. Add items to the cart by sending the request to the Creating a new cart endpoint.
Loading...

Define payment methods

You can configure payment methods in the Payment Gateway Service. Check the available options in the Payment Systems documentation.

Trigger the checkout

attention

To complete the checkout, there are two options:

Once a customer places the product in a cart, they can proceed with the checkout process.

The checkout service validates the data that come from customer's session token, the cart, and tiered prices, and then proceeds with the delivery and payment details. Then, it handles the payment and creates an order in the system, closing the cart.

You can trigger a checkout process through API as well by sending a request to the Triggering a checkout endpoint.
Loading...