Skip to content

Integrations

Cross-module dependencies, data flow patterns, and API integration points for the Checkout module.

Integration Overview

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.

3
Hard Dependencies
5+
Soft Dependencies
12
REST Endpoints
14
CustomerData Sections

Quote Module Integration

Q

Magento_Quote

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.

Key Interfaces Used

  • CartManagementInterface
  • CartRepositoryInterface
  • ShippingMethodManagementInterface
  • BillingAddressManagementInterface
  • PaymentMethodManagementInterface

Data Flow

  • Checkout Session → Quote ID
  • Shipping Info → Quote Address
  • Payment Info → Quote Payment
  • Place Order → CartManagement::placeOrder()

Sales Module Integration

S

Magento_Sales

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.

Integration Points

  • Order creation via Quote conversion
  • Order success page display
  • Payment failed email handling
  • Last order retrieval for success page

Session Data Used

  • getLastRealOrderId()
  • getLastOrderId()
  • getLastSuccessQuoteId()

CatalogInventory Integration

I

Magento_CatalogInventory

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.

Payment Integration

Checkout integrates with the Payment module through Quote's payment management. Payment methods are rendered in the payment step via JavaScript components.

Payment Flow

  1. Get available methods via API
  2. Render payment forms (JS components)
  3. Validate payment data
  4. Save payment info to quote
  5. Process payment on order place

Key Interfaces

  • PaymentMethodManagementInterface
  • PaymentInterface (Quote)
  • PaymentInformationInterface

Shipping Integration

Shipping methods are loaded based on the destination address and rendered in the shipping step.

Shipping Flow

  1. Customer enters shipping address
  2. API estimates shipping rates
  3. Customer selects shipping method
  4. Save shipping info triggers totals update
  5. Shipping cost added to quote

Key Interfaces

  • ShippingMethodManagementInterface
  • ShippingInformationInterface
  • EstimateAddressInterface

Customer Integration

The checkout flow differs for logged-in customers vs. guests. Customer data like saved addresses is loaded to streamline checkout.

Logged-in Customer

  • Saved addresses loaded
  • Customer token auth
  • Order linked to account

Guest Checkout

  • Email required
  • Masked cart ID
  • Optional account creation

Plugin Integration

  • Customer group change
  • Quote recollection trigger

REST API Reference

The Checkout module exposes 12 REST endpoints for headless checkout implementations:

Shipping Information

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

Payment Information

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

Totals Calculation

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

GraphQL Support

Checkout operations are available via GraphQL through the Magento_CheckoutAgreementsGraphQl and Magento_QuoteGraphQl modules. Key mutations include:

  • setShippingAddressesOnCart
  • setShippingMethodsOnCart
  • setPaymentMethodOnCart
  • placeOrder