There are different ways of creating a Checkout and initializing a Payment. In the step-by-step approach the process can be compared to the actual interactions from the customer in the shop system: items are added / updated along the way as well as billing and shipping information. The initialization of the payment for the Checkout starts when the customer confirms the order.
High-level summary:
In a first step, a Commerce Case with a Checkout and only the shopping cart items will be created.
POST Commerce Case
|
|
In the next step, personal information such as billing and shipping details will be added to the existing Checkout.
PATCH Checkout
|
In the last step, the customer will confirm the order by choosing the preferred payment method. The confirmation of the customer will trigger the payment for the Checkout.
Example for Order endpoint
POST Order
|
|
Note: Redirect / authentication not shown here
After completing the order (that resulted in a successful payment) all the details for the Commerce Case and Checkout can be retrieved.
GET Checkout
|
Once the items are ready for shipment, the Delivery can be performed to capture the money from the reservation and to mark the items as DELIVERED.
POST Deliver
|
|