This is a beta release of documentation for Magento 2.4, published for previewing soon-to-be-released functionality. Content in this version is subject to change. Links to the v2.4 code base may not properly resolve until the code is officially released.

GraphQL checkout tutorial

This tutorial describes how to place an order through GraphQl. Customers can make purchases in two ways:

  • As a logged-in user
  • As a guest user who does not create an account

The 10-step tutorial generally takes 30 minutes.

The checkout process in GraphQl consists of 10 steps. Magento GraphQL is designed to run queries and perform actions on behalf of a customer. Magento GraphQL does not perform backend tasks, such as manage invoices or shipments.

Before you begin

Complete the following prerequisites:

  • Install a Magento 2.3.2 instance with sample data.

The sample data defines a functional store, called Luma, that sells fitness clothing and accessories. The store does not provide any sandbox accounts for testing credit card payments, so transactions will be simulated using an offline payment method.

  • Install a GraphQl client. You can use any GraphQl client to send calls to Magento. GraphiQL is recommended.

  • Learn about GraphQL, how it works, and how to use it. See Introduction to GraphQL for details.

  • Know how to generate a customer token. See Authorization tokens for details.

  • Find the Magento Merchant documentation. Refer to Getting Started with Magento Open Source for information about the Luma store that is created when you install Magento with the sample data.

Other resources

  • Order processing tutorial shows a system integrator how REST APIs are used in the lifecycle of an order, including configuring a store and creating a customer; creating quotes, orders, invoices, and shipments; preparing for checkout; and more order-related tasks.

  • REST Tutorials provides additional information about completing any Magento REST tutorial.