Skip to main content
Version: 1.0.0

Checkout Queries

This section documents the GraphQL queries available for retrieving information about the checkout process in the YSCP platform. Checkout queries allow you to fetch details about available shipping methods, payment methods, and other checkout-related information.

Available Queries

The following checkout queries are available:

Common Parameters

Most checkout queries require the following parameters:

  • cartId: The unique identifier of the cart to retrieve information about
  • siteId: (Optional) The site ID where the checkout is being performed

Checkout Flow

The typical checkout flow involves the following steps:

  1. Create a cart and add products (using cart mutations)
  2. Set the billing address (using SetBillingAddressOnCheckoutMutation)
  3. Set the shipping address (if different from billing)
  4. Get available shipping methods (using AvailableShippingMethodsQuery)
  5. Select a shipping method (using SetShippingMethodOnCheckoutMutation)
  6. Get available payment methods (using AvailablePaymentMethodsQuery)
  7. Select a payment method and complete the checkout

Authentication

Checkout queries can be performed by both authenticated users and guest users. For guest users, a cart ID must be provided to retrieve the checkout information.

Examples

Each query documentation includes examples showing how to use the query and what response to expect.