PHP 7.3 reaches end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in April 2022. You may want to consider planning your upgrade now to Adobe Commerce 2.4.x and PHP 7.4.x to help maintain PCI compliance.

Step 8. Set email on the cart (guest customers only)

GraphQL checkout tutorial

Skip this step if you placed the order as a registered customer.

If you place an order as a guest user, you must set a quote email address. Use the setGuestEmailOnCart mutation query for that.

{ CART_ID } is the unique shopping cart ID from Step 2. Create empty cart.

Request:

1
2
3
4
5
6
7
8
9
10
mutation {
  setGuestEmailOnCart(input: {
    cart_id: "{ CART_ID }"
    email: "guest@example.com"
  }) {
    cart {
      email
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
{
  "data": {
    "setGuestEmailOnCart": {
      "cart": {
        "email": "guest@example.com"
      }
    }
  }
}

Verify this step

There are no additional verification steps. quote.customer_email is displayed for administrator on back-end side.