PHP 7.3 reached end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in September 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 10. Place the order
GraphQL checkout tutorial
The placeOrder
mutation places an order.
{ CART_ID }
is the unique shopping cart ID from Step 2. Create empty cart.
Send the customer’s authorization token in the Authorization
parameter of the header. See Authorization tokens for more information.
Request:
1
2
3
4
5
6
7
mutation {
placeOrder(input: {cart_id: "{ CART_ID }"}) {
order {
order_number
}
}
}
Response:
1
2
3
4
5
6
7
8
9
{
"data": {
"placeOrder": {
"order": {
"order_number": "000000001"
}
}
}
}
Verify this step
-
Sign in as a customer to the website using the email
john.doe@example.com
and passwordb1b2b3l@w+
. -
Go to My Account > My Orders. The order you created is displayed. The order is also displayed on the Orders grid (Sales > Orders) in the Admin.