Integrations
Cross-module dependencies, data flow patterns, and API integration points for the Checkout module.
Cross-module dependencies, data flow patterns, and API integration points for the Checkout module.
The Checkout module serves as the central orchestrator for the purchase flow, integrating with multiple core modules to process orders. It acts as a facade over Quote (cart management), Sales (order creation), Payment, and Shipping modules.
Hard Dependency (module.xml sequence)
The Quote module is the backbone of checkout, managing the shopping cart state and totals calculation. Checkout delegates cart management entirely to Quote.
Hard Dependency (module.xml sequence)
After checkout completion, Sales module takes over with order management. The checkout success page displays order information from Sales entities.
Hard Dependency (module.xml sequence)
Stock validation during checkout ensures products are available before order placement. This is critical for preventing overselling.
MSI Note
In Magento 2.4+, Multi-Source Inventory (MSI) modules may supplement or replace CatalogInventory for stock validation. The InventorySales module handles stock reservations during checkout.
Checkout integrates with the Payment module through Quote's payment management. Payment methods are rendered in the payment step via JavaScript components.
Shipping methods are loaded based on the destination address and rendered in the shipping step.
The checkout flow differs for logged-in customers vs. guests. Customer data like saved addresses is loaded to streamline checkout.
The Checkout module exposes 12 REST endpoints for headless checkout implementations:
| Method | Endpoint | Auth |
|---|---|---|
| POST | /V1/carts/mine/shipping-information | Customer |
| POST | /V1/guest-carts/:cartId/shipping-information | Guest |
| POST | /V1/carts/:cartId/shipping-information | Admin |
| Method | Endpoint | Action |
|---|---|---|
| POST | /V1/carts/mine/payment-information | Save & Place Order |
| GET | /V1/carts/mine/payment-information | Get Payment Methods |
| POST | /V1/carts/mine/set-payment-information | Save Only (no order) |
| POST | /V1/guest-carts/:cartId/payment-information | Guest: Save & Place |
| Method | Endpoint | Auth |
|---|---|---|
| POST | /V1/carts/mine/totals-information | Customer |
| POST | /V1/guest-carts/:cartId/totals-information | Guest |
| POST | /V1/carts/:cartId/totals-information | Admin |
Checkout operations are available via GraphQL through the Magento_CheckoutAgreementsGraphQl
and Magento_QuoteGraphQl modules. Key mutations include: