Magento 2 API: Create an Order
In today’s post, I will guide you on how to create an order. Here is an example to help you easier when following the steps which I will provide below.
There are three items added to the shopping cart. The price of these items is $108 in total. The shipping fee is $10. The grand total will be $118. So this is how you convert the quote to an order.
Now let’s get started to create an order in Magento 2.
Create an Order using Magento 2 API in 3 steps:
Step 1: Send payment information
When payment information is submitted, an order will be created by Magento and the order confirmation will be sent to customers. Because in this tutorial, we are using an offline payment method, we don’t have to provide detailed payment information. Therefore, the endpoint which is used in the following example only requires the payment method and billing address information.
Endpoint
POST <host>/rest/<store_code>/V1/carts/mine/payment-information
Headers
Content-Type application/json
Authorization Bearer <customer token>
Payload
Code sample
{
"paymentMethod": {
"method": "banktransfer"
},
"billing_address": {
"email": "[email protected]",
"region": "New York",
"region_id": 43,
"region_code": "NY",
"country_id": "US",
"street": ["123 Oak Ave"],
"postcode": "10577",
"city": "Purchase",
"telephone": "512-555-1111",
"firstname": "Jane",
"lastname": "Doe"
}
}
Response
An orderID
, for example, 3
Step 2: Review the order as an admin
When an order object is requested, a response will contain order details which including customer information, payment details, totals, and subtotals for the order and each individual item.
Endpoint
GET <host>/rest/<store_code>/V1/orders/3
The orderid
is 3
Headers
Content-Type application/json
Authorization Bearer <administrator token>
Payload
Not applicable
Response
Code sample
{
"applied_rule_ids": "1",
"base_currency_code": "USD",
"base_discount_amount": 0,
"base_grand_total": 165,
"base_discount_tax_compensation_amount": 0,
"base_shipping_amount": 5,
"base_shipping_discount_amount": 0,
"base_shipping_incl_tax": 5,
"base_shipping_tax_amount": 0,
"base_subtotal": 160,
"base_subtotal_incl_tax": 160,
"base_tax_amount": 0,
"base_total_due": 165,
"base_to_global_rate": 1,
"base_to_order_rate": 1,
"billing_address_id": 6,
"created_at": "2017-08-21 22:22:19",
"customer_email": "[email protected]",
"customer_firstname": "Jane",
"customer_group_id": 1,
"customer_id": 3,
"customer_is_guest": 0,
"customer_lastname": "Doe",
"customer_note_notify": 1,
"discount_amount": 0,
"email_sent": 1,
"entity_id": 3,
"global_currency_code": "USD",
"grand_total": 165,
"discount_tax_compensation_amount": 0,
"increment_id": "000000003",
"is_virtual": 0,
"order_currency_code": "USD",
"protect_code": "61f76d",
"quote_id": 4,
"shipping_amount": 5,
"shipping_description": "Best Way - Table Rate",
"shipping_discount_amount": 0,
"shipping_discount_tax_compensation_amount": 0,
"shipping_incl_tax": 5,
"shipping_tax_amount": 0,
"state": "new",
"status": "pending",
"store_currency_code": "USD",
"store_id": 1,
"store_name": "Main Website\nMain Website Store\n",
"store_to_base_rate": 0,
"store_to_order_rate": 0,
"subtotal": 160,
"subtotal_incl_tax": 160,
"tax_amount": 0,
"total_due": 165,
"total_item_count": 7,
"total_qty_ordered": 4,
"updated_at": "2017-08-21 22:22:20",
"weight": 2,
"items": [
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 22,
"base_price": 22,
"base_price_incl_tax": 22,
"base_row_invoiced": 0,
"base_row_total": 22,
"base_row_total_incl_tax": 22,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 3,
"name": "Radiant Tee-M-Orange",
"no_discount": 0,
"order_id": 3,
"original_price": 22,
"price": 22,
"price_incl_tax": 22,
"product_id": 1553,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 6,
"row_invoiced": 0,
"row_total": 22,
"row_total_incl_tax": 22,
"row_weight": 1,
"sku": "WS12-M-Orange",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 18,
"base_price": 18,
"base_price_incl_tax": 18,
"base_row_invoiced": 0,
"base_row_total": 18,
"base_row_total_incl_tax": 18,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 1,
"item_id": 4,
"name": "Advanced Pilates & Yoga (Strength)",
"no_discount": 0,
"order_id": 3,
"original_price": 18,
"price": 18,
"price_incl_tax": 18,
"product_id": 49,
"product_type": "downloadable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 7,
"row_invoiced": 0,
"row_total": 18,
"row_total_incl_tax": 18,
"row_weight": 0,
"sku": "240-LV08",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19"
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 27,
"base_price": 27,
"base_price_incl_tax": 27,
"base_row_invoiced": 0,
"base_row_total": 27,
"base_row_total_incl_tax": 27,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 6,
"name": "Sprite Stasis Ball 65 cm",
"no_discount": 0,
"order_id": 3,
"original_price": 27,
"parent_item_id": 5,
"price": 27,
"price_incl_tax": 27,
"product_id": 29,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 9,
"row_invoiced": 0,
"row_total": 27,
"row_total_incl_tax": 27,
"row_weight": 0,
"sku": "24-WG082-blue",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 5,
"base_price": 5,
"base_price_incl_tax": 5,
"base_row_invoiced": 0,
"base_row_total": 5,
"base_row_total_incl_tax": 5,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 7,
"name": "Sprite Foam Yoga Brick",
"no_discount": 0,
"order_id": 3,
"original_price": 5,
"parent_item_id": 5,
"price": 5,
"price_incl_tax": 5,
"product_id": 21,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 10,
"row_invoiced": 0,
"row_total": 5,
"row_total_incl_tax": 5,
"row_weight": 0,
"sku": "24-WG084",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 17,
"base_price": 17,
"base_price_incl_tax": 17,
"base_row_invoiced": 0,
"base_row_total": 17,
"base_row_total_incl_tax": 17,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 8,
"name": "Sprite Yoga Strap 8 foot",
"no_discount": 0,
"order_id": 3,
"original_price": 17,
"parent_item_id": 5,
"price": 17,
"price_incl_tax": 17,
"product_id": 34,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 11,
"row_invoiced": 0,
"row_total": 17,
"row_total_incl_tax": 17,
"row_weight": 0,
"sku": "24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 19,
"base_price": 19,
"base_price_incl_tax": 19,
"base_row_invoiced": 0,
"base_row_total": 19,
"base_row_total_incl_tax": 19,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 9,
"name": "Sprite Foam Roller",
"no_discount": 0,
"order_id": 3,
"original_price": 19,
"parent_item_id": 5,
"price": 19,
"price_incl_tax": 19,
"product_id": 22,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 12,
"row_invoiced": 0,
"row_total": 19,
"row_total_incl_tax": 19,
"row_weight": 0,
"sku": "24-WG088",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 52,
"base_price": 52,
"base_price_incl_tax": 52,
"base_row_invoiced": 0,
"base_row_total": 52,
"base_row_total_incl_tax": 52,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 10,
"name": "Chaz Kangeroo Hoodie",
"no_discount": 0,
"order_id": 3,
"original_price": 52,
"price": 52,
"price_incl_tax": 52,
"product_id": 67,
"product_type": "configurable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 13,
"row_invoiced": 0,
"row_total": 52,
"row_total_incl_tax": 52,
"row_weight": 1,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_price": 0,
"base_row_invoiced": 0,
"base_row_total": 0,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 11,
"name": "Chaz Kangeroo Hoodie-S-Gray",
"no_discount": 0,
"order_id": 3,
"original_price": 0,
"parent_item_id": 10,
"price": 0,
"product_id": 56,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 14,
"row_invoiced": 0,
"row_total": 0,
"row_weight": 0,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1,
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 52,
"base_price": 52,
"base_price_incl_tax": 52,
"base_row_invoiced": 0,
"base_row_total": 52,
"base_row_total_incl_tax": 52,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 10,
"name": "Chaz Kangeroo Hoodie",
"no_discount": 0,
"order_id": 3,
"original_price": 52,
"price": 52,
"price_incl_tax": 52,
"product_id": 67,
"product_type": "configurable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 13,
"row_invoiced": 0,
"row_total": 52,
"row_total_incl_tax": 52,
"row_weight": 1,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
}
}
],
"billing_address": {
"address_type": "billing",
"city": "Purchase",
"country_id": "US",
"email": "[email protected]",
"entity_id": 6,
"firstname": "Jane",
"lastname": "Doe",
"parent_id": 3,
"postcode": "10577",
"region": "New York",
"region_code": "NY",
"region_id": 43,
"street": [
"123 Oak Ave"
],
"telephone": "512-555-1111"
},
"payment": {
"account_status": null,
"additional_information": [
"Bank Transfer Payment",
""
],
"amount_ordered": 165,
"base_amount_ordered": 165,
"base_shipping_amount": 5,
"cc_last4": null,
"entity_id": 3,
"method": "banktransfer",
"parent_id": 3,
"shipping_amount": 5
},
"status_histories": [],
"extension_attributes": {
"shipping_assignments": [
{
"shipping": {
"address": {
"address_type": "shipping",
"city": "Purchase",
"country_id": "US",
"email": "[email protected]",
"entity_id": 5,
"firstname": "Jane",
"lastname": "Doe",
"parent_id": 3,
"postcode": "10577",
"region": "New York",
"region_code": "NY",
"region_id": 43,
"street": [
"123 Oak Ave"
],
"telephone": "512-555-1111"
},
"method": "tablerate_bestway",
"total": {
"base_shipping_amount": 5,
"base_shipping_discount_amount": 0,
"base_shipping_incl_tax": 5,
"base_shipping_tax_amount": 0,
"shipping_amount": 5,
"shipping_discount_amount": 0,
"shipping_discount_tax_compensation_amount": 0,
"shipping_incl_tax": 5,
"shipping_tax_amount": 0
}
},
"items": [
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 22,
"base_price": 22,
"base_price_incl_tax": 22,
"base_row_invoiced": 0,
"base_row_total": 22,
"base_row_total_incl_tax": 22,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 3,
"name": "Radiant Tee-M-Orange",
"no_discount": 0,
"order_id": 3,
"original_price": 22,
"price": 22,
"price_incl_tax": 22,
"product_id": 1553,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 6,
"row_invoiced": 0,
"row_total": 22,
"row_total_incl_tax": 22,
"row_weight": 1,
"sku": "WS12-M-Orange",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 18,
"base_price": 18,
"base_price_incl_tax": 18,
"base_row_invoiced": 0,
"base_row_total": 18,
"base_row_total_incl_tax": 18,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 1,
"item_id": 4,
"name": "Advanced Pilates & Yoga (Strength)",
"no_discount": 0,
"order_id": 3,
"original_price": 18,
"price": 18,
"price_incl_tax": 18,
"product_id": 49,
"product_type": "downloadable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 7,
"row_invoiced": 0,
"row_total": 18,
"row_total_incl_tax": 18,
"row_weight": 0,
"sku": "240-LV08",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19"
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 27,
"base_price": 27,
"base_price_incl_tax": 27,
"base_row_invoiced": 0,
"base_row_total": 27,
"base_row_total_incl_tax": 27,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 6,
"name": "Sprite Stasis Ball 65 cm",
"no_discount": 0,
"order_id": 3,
"original_price": 27,
"parent_item_id": 5,
"price": 27,
"price_incl_tax": 27,
"product_id": 29,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 9,
"row_invoiced": 0,
"row_total": 27,
"row_total_incl_tax": 27,
"row_weight": 0,
"sku": "24-WG082-blue",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 5,
"base_price": 5,
"base_price_incl_tax": 5,
"base_row_invoiced": 0,
"base_row_total": 5,
"base_row_total_incl_tax": 5,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 7,
"name": "Sprite Foam Yoga Brick",
"no_discount": 0,
"order_id": 3,
"original_price": 5,
"parent_item_id": 5,
"price": 5,
"price_incl_tax": 5,
"product_id": 21,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 10,
"row_invoiced": 0,
"row_total": 5,
"row_total_incl_tax": 5,
"row_weight": 0,
"sku": "24-WG084",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 17,
"base_price": 17,
"base_price_incl_tax": 17,
"base_row_invoiced": 0,
"base_row_total": 17,
"base_row_total_incl_tax": 17,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 8,
"name": "Sprite Yoga Strap 8 foot",
"no_discount": 0,
"order_id": 3,
"original_price": 17,
"parent_item_id": 5,
"price": 17,
"price_incl_tax": 17,
"product_id": 34,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 11,
"row_invoiced": 0,
"row_total": 17,
"row_total_incl_tax": 17,
"row_weight": 0,
"sku": "24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 19,
"base_price": 19,
"base_price_incl_tax": 19,
"base_row_invoiced": 0,
"base_row_total": 19,
"base_row_total_incl_tax": 19,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 9,
"name": "Sprite Foam Roller",
"no_discount": 0,
"order_id": 3,
"original_price": 19,
"parent_item_id": 5,
"price": 19,
"price_incl_tax": 19,
"product_id": 22,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 12,
"row_invoiced": 0,
"row_total": 19,
"row_total_incl_tax": 19,
"row_weight": 0,
"sku": "24-WG088",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_original_price": 68,
"base_price": 68,
"base_price_incl_tax": 68,
"base_row_invoiced": 0,
"base_row_total": 68,
"base_row_total_incl_tax": 68,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 5,
"name": "Sprite Yoga Companion Kit",
"no_discount": 0,
"order_id": 3,
"original_price": 68,
"price": 68,
"price_incl_tax": 68,
"product_id": 51,
"product_type": "bundle",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 8,
"row_invoiced": 0,
"row_total": 68,
"row_total_incl_tax": 68,
"row_weight": 0,
"sku": "24-WG080-24-WG084-24-WG088-24-WG082-blue-24-WG086",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 0
}
},
{
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 52,
"base_price": 52,
"base_price_incl_tax": 52,
"base_row_invoiced": 0,
"base_row_total": 52,
"base_row_total_incl_tax": 52,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 10,
"name": "Chaz Kangeroo Hoodie",
"no_discount": 0,
"order_id": 3,
"original_price": 52,
"price": 52,
"price_incl_tax": 52,
"product_id": 67,
"product_type": "configurable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 13,
"row_invoiced": 0,
"row_total": 52,
"row_total_incl_tax": 52,
"row_weight": 1,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
},
{
"amount_refunded": 0,
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_price": 0,
"base_row_invoiced": 0,
"base_row_total": 0,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 11,
"name": "Chaz Kangeroo Hoodie-S-Gray",
"no_discount": 0,
"order_id": 3,
"original_price": 0,
"parent_item_id": 10,
"price": 0,
"product_id": 56,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 14,
"row_invoiced": 0,
"row_total": 0,
"row_weight": 0,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1,
"parent_item": {
"amount_refunded": 0,
"applied_rule_ids": "1",
"base_amount_refunded": 0,
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 52,
"base_price": 52,
"base_price_incl_tax": 52,
"base_row_invoiced": 0,
"base_row_total": 52,
"base_row_total_incl_tax": 52,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2017-08-21 22:22:19",
"discount_amount": 0,
"discount_invoiced": 0,
"discount_percent": 0,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 10,
"name": "Chaz Kangeroo Hoodie",
"no_discount": 0,
"order_id": 3,
"original_price": 52,
"price": 52,
"price_incl_tax": 52,
"product_id": 67,
"product_type": "configurable",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 13,
"row_invoiced": 0,
"row_total": 52,
"row_total_incl_tax": 52,
"row_weight": 1,
"sku": "MH01-S-Gray",
"store_id": 1,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2017-08-21 22:22:19",
"weight": 1
}
}
]
}
]
}
}
Step 3: Verify this step
- You need to log in to the Luma store as a customer. Then, on the dashboard, you should see the order.
- After loggin in as a customer, you then log in to Admin. Go to
Sales > Orders
. You will see the order is shown in the grid. The status of that order is Pending.
Conclusion
Above. I have just provided you three steps on how to convert the quote to an order. I hope it would be helpful for you when generating order. If you have any questions or new ideas, feel free to leave a comment below.
- How to create a simple Hello World module for Magento 2
- Magento 2 Block Template Ultimate Guides
- How to Create Module in Magento 2
- How to Create Controller in Magento 2
- How to create CRUD Models in Magento 2
- How to Create Magento 2 Block, Layout and Templates
- Configuration - System.xml
- How To Create Admin Menu In Magento 2
- Admin ACL
- Admin Grid