The Checkout component implements the Universal Commerce Protocol (UCP) required by Google and manages the end-to-end checkout lifecycle.
Core capabilities
When the Cart is ready for payment, the module does the following inside your commercetools Project:
- Creates a Payment resource linked to the Cart.
- Creates an Authorization Transaction on that Payment and performs authorization with a Payment Service Provider (PSP).
- Updates the Authorization TransactionState (
Pending,Success, orFailure) based on the PSP response. - Upon successful authorization, the corresponding Order resource is created and the status is synchronized back to Google.
Functional considerations
Inventory management
If the requested quantity exceeds the available stock:
- The module returns an out-of-stock error to Google.
- The checkout session remains in a
Not Ready for Paymentstate until availability is restored.
Synchronize inventory data with commercetools to prevent checkout interruptions due to stock issues.
Tax configuration
Tax calculation is automatically applied per line item based on:
- The Product's assigned Tax Category.
- The
shippingAddressandbillingAddressof the Cart (countryandstatevalues).
To integrate a third-party tax engine, use one of the following options:
- Connect template: deploy the Connect Tax integration template and adapt it to your tax provider.
- Prebuilt application: install an existing tax integration from the Connect Marketplace.
Shipping configuration
Shipping Methods must be defined in your commercetools Project, including:
- Carrier information.
- Expected delivery days.
- Supported Zones and currencies.
Shipping Method Custom Fields
name and description are mandatory.| Field | Type | Description |
|---|---|---|
earliestDeliveryInDays | Number | Minimum estimated transit time in days. |
latestDeliveryInDays | Number | Maximum estimated transit time in days. |
carrier | String | Shipping provider name (for example: Acme Shipping). |
Shipping Method Custom Fields are not required if you use external shipping methods. In that case, delivery estimates and carrier information are provided by the external shipping service.
Order and fulfillment state management
Open to Confirmed to Complete or Cancelled. Keeping Order and shipment states accurate is essential for maintaining a consistent post-purchase experience.To automatically update Order states from your fulfillment provider, use one of the following options:
- Connect template: deploy the Connect Fulfillment Integration Template and adapt it to your fulfillment provider.
- Prebuilt application: install an existing fulfillment application from the Connect Marketplace.
UCP error mapping
UCP errors are mapped to clear, actionable messages to help shoppers understand what went wrong during checkout. Instead of displaying a generic error, the message explains the issue and, where possible, what the shopper can do to resolve it.
The following table lists the UCP error codes, their severity, and the message returned to the shopper.
| Error code | Severity | Message |
|---|---|---|
out_of_stock | Error | Item is not available. |
item_unavailable | Error | Product {sku} is unavailable. |
item_ineligible | Error | Item is not available for purchase. |
quantity_invalid_limit_exceeded | Error | The requested quantity exceeds the maximum allowed. Please reduce the quantity and try again. |
quantity_invalid_minimum_not_met | Error | The requested quantity is below the minimum required. Please increase the quantity and try again. |
missing_buyer_info | Error | Some required buyer information is missing. Please provide the missing details. |
address_undeliverable | Error | Delivery is not possible to this address. Please check the address or choose a different one. |
missing_fulfillment_info | Error | Required delivery information is missing. Please provide it. |
eligibility_invalid | Error | This action isn't available for the provided details. |
identity_required | Error | User identity is required to access this resource. |
insufficient_scope | Error | You don't have permission to complete this action. |
payment_failed | Error | Your payment failed due to a technical issue during processing. Please try again or use a different payment method. |
payment_ineligible | Error | The selected payment method is not accepted. Please choose a different payment method and try again. |
discount_code_invalid | Warning | The discount code is not valid. Please check the code. |
discount_code_expired | Warning | The discount code has expired. |
discount_code_already_applied | Warning | This discount code has reached its usage limit and is no longer available. |
discount_code_combination_disallowed | Warning | The discount code cannot be combined with other offers. |