command

Create Order

Command to create a new order from a checked-out cart.

Command
POST/orders

Overview

CreateOrder is sent by the Checkout OrchestratorCheckout OrchestratorServicev1.0.0Runs the checkout saga. Reserves inventory, authorizes payment and creates the order, coordinating the steps that turn a...Publishesreserve-inventory, authorize-payment +1Ownerordering-platformMapRepoView docs and handled by the Order ServiceOrder ServiceServicev1.0.0The system of record for orders. Creates and cancels orders, serves order lookups, and publishes events as orders move t...Publishesorder-created, order-completed +1Subscribescreate-order, cancel-order +1APIsAsyncAPIOwnerordering-platformMapRepoView docs. It is the final step of the checkout saga — once inventory is reserved and payment is authorized, this command creates the order. On success the Order Service publishes an Order CreatedOrder CreatedEventv1.0.0Published when a new order has been created. Ownerordering-platformSchemaMapView docs event.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

9 properties

Command to create a new order from a checked-out cart

cartIdstring<uuid>
required

Identifier of the cart this order was created from

customerIdstring<uuid>
required

Identifier of the customer placing the order

itemsarray[object]
required

The items in the order

totalinteger
required

Order total in minor units (e.g. cents)

Minimum: 0
currencystring
required

ISO 4217 currency code

Match pattern: ^[A-Z]{3}$
paymentAuthorizationIdstring

Identifier of the payment authorization for this order