docs

General flow (hidden)

In the following sections, we’ll guide you through the process of implementing a headless checkout using the Checkout API.

⚠️ Prerequisite:
Ensure that all steps from the initial checkout setup are completed before starting this integration.

Headless Checkout Flow

To implement SCAYLE Checkout via the Headless Checkout API, follow these steps:

  1. Initialize Checkout
    Begin by creating a checkout session.
  2. Set Billing and Shipping Addresses
    Provide the customer’s billing and shipping information.
  3. Select a Shipping Option
    Choose from the available shipping methods returned in the state response.
  4. Select a Payment Method
    Choose from the available payment methods returned in the state response.
  5. Confirm the Order
    Finalize the order to trigger processing and payment.

Each of these steps will return an updated state object, allowing your frontend to reflect the most current data and handle changes in dependencies (e.g., disabling shipping methods when a specific payment option is selected).