Checkout sends Messages to provide feedback about events.
onInfo, onWarn, or onError message handlers with the checkoutFlow or paymentFlow methods when initializing Checkout.Message structure
payload field with data about the event.codeString | Message code for the event. |
severityString | Severity level of the event. Can be info, warn, or error. |
messageString | Human-readable description of the event. |
correlationIdString | Unique identifier of the event. |
{
"severity": "error",
"code": "project_deactivated",
"message": "Project {projectKey} is deactivated.",
"payload": {
"project": {
"key": "{projectKey}"
}
},
"correlationId": "spa/commercetools-checkout/1729263187262/565301612087128"
}
{
"severity": "info",
"code": "order_created",
"message": "Order {orderId} created.",
"payload": {
"order": {
"id": "{orderId}"
}
},
"correlationId": "spa/commercetools-checkout/1729263187262/565301612087128"
}
Message types
Application Messages
Application Deactivated
codeString | "application_disabled" |
severityString | error |
messageString | Application {applicationKey} for {projectKey} is disabled. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the project and application objects with the related key property. |
Cart Messages
Cart Empty
codeString | "cart_empty" |
severityString | error |
messageString | Cart {cartId} is empty. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property. |
Cart Emptied During Checkout
codeString | "cart_emptied_during_checkout" |
severityString | error |
messageString | Cart {cartId} was emptied during checkout. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property. |
Cart Not Found
codeString | "cart_not_found" |
severityString | error |
messageString | Cart for {projectKey} and session {sessionId} not found. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the project and session objects with the related key and id properties. |
Non Orderable Cart Error
codeString | "non_orderable_cart_error" |
severityString | error |
messageString | This cart is not orderable. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id and errors properties. |
Cart With Existing Payment
codeString | "cart_with_existing_payment" |
severityString | error |
messageString | Cart with existing approved payment. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property. |
Unsupported Country
codeString | "unsupported_country" |
severityString | error |
messageString | Cart {cartId} has unsupported country. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array. |
Shipping Address Missing Error
Generated when the shipping address is missing for the given Cart.
codeString | "shipping_address_missing" |
severityString | error |
messageString | The shippingAddress field is missing for cart {cartId}. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property. |
Shipping Address Does Not Match Cart
Generated when the selected Shipping Method does not match the Cart anymore.
codeString | "shipping_method_does_not_match_cart" |
severityString | info |
messageString | Selected shipping method no longer matches cart. |
correlationIdString | Unique identifier of the event. |
Set Shipping Address Error
codeString | "set_shipping_address_error" |
severityString | error |
messageString | Error setting shipping address. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the errors array of objects, with the related code and message properties. |
Checkout Messages
Checkout Loaded
checkoutFlow or paymentFlow method.codeString | "checkout_loaded" |
severityString | info |
messageString | Checkout loaded. |
correlationIdString | Unique identifier of the event. |
Checkout Started
checkoutFlow or paymentFlow method and the checkout process starts.codeString | "checkout_started" |
severityString | info |
messageString | Checkout started. |
correlationIdString | Unique identifier of the event. |
Checkout Cancelled
Generated when the customer cancels the checkout process.
codeString | "checkout_cancelled" |
severityString | info |
messageString | Checkout cancelled. |
correlationIdString | Unique identifier of the event. |
Checkout Completed
Generated when the customer completes the checkout process.
codeString | "checkout_completed" |
severityString | info |
messageString | Checkout for {orderId} completed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the order object with the id property. |
Configuration Messages
Init Error
Generated when an error occurs during Checkout's initialization.
codeString | "init_error" |
severityString | error |
messageString | Error during initialization. |
correlationIdString | Unique identifier of the event. |
Init Timeout
checkoutFlow or paymentFlow method on time.codeString | "init_timeout" |
severityString | error |
messageString | Timeout error, no init message received. |
correlationIdString | Unique identifier of the event. |
Invalid Locale
Generated when the provided locale is invalid.
codeString | "invalid_locale" |
severityString | warn |
messageString | The provided {locale} is invalid. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the provided locale string, the related locale field (language or currency), and the used fallback one. |
Invalid Mode
codeString | "invalid_mode" |
severityString | info |
messageString | {mode} mode requires an application with mode type {modeTypeRequested}. Current mode {modeTypeReceived}. |
correlationIdString | Unique identifier of the event. |
Expired Session
codeString | "expired_session" |
severityString | error |
messageString | Session is expired. |
correlationIdString | Unique identifier of the event. |
Failed To Refresh Session
codeString | "failed_to_refresh_session" |
severityString | error |
messageString | Failed to refresh session. |
correlationIdString | Unique identifier of the event. |
Bad Input Data
codeString | "invalid_fields" |
severityString | error |
messageString | Some fields are invalid. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the invalidFields array of objects with the related schema, path, value and message properties. |
No Shipping Methods
codeString | "no_shipping_methods" |
severityString | error |
messageString | There are no shipping methods matching cart. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cart object with the id property. |
Shipping Method Selected
Generated when the customer selects a Shipping Method that is different from the default option.
codeString | "shipping_method_selected" |
severityString | info |
messageString | Shipping Method selected. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the method object with the name and id properties. |
Shipping Method Selection Confirmation
Generated when the customer selects a Shipping Method and moves to the next step of the checkout process.
codeString | "shipping_method_selection_confirmation" |
severityString | info |
messageString | Shipping Method selection confirmed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the method object with the name and id properties. |
Deprecated Fields
codeString | "deprecated_fields" |
severityString | warn |
messageString | Some fields are deprecated. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the deprecatedFields array. |
Updated Fields
Generated when some fields provided in the Checkout initialization request are invalid and have been updated to match our schema. An array of updates will be provided with a sequence of edits used to transform an invalid value into a valid one.
codeString | "updated_fields" |
severityString | warn |
messageString | Some fields are invalid and have been updated. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains two arrays:
|
Discount Code Messages
Add Discount Code Error
Generated when there was an error adding a Discount Code.
codeString | "add_discount_code_error" |
severityString | error |
messageString | Error adding discount code. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the error object. |
Remove Discount Code Error
codeString | "remove_discount_code_error" |
severityString | error |
messageString | Error removing discount code. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the error object. |
Discount Not Applicable
codeString | "discount_code_not_applicable" |
severityString | info |
messageString | Discount code not applicable. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cartId and discountCode properties. |
Not Applicable Discount Code Removed
paymentFlow method and Checkout removes a Discount Code from the Cart because it does not apply to the Cart. Checkout removes the Discount Code to avoid an order creation error when converting the Cart to an Order.codeString | "not_applicable_discount_code_removed" |
severityString | warn |
messageString | Not applicable discount code removed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the cartId and discountCode properties. |
Gift card Messages
Gift Card Balance Started
Generated when the customer enters the gift card's code for the payment, and Checkout initiates the retrieving of the gift card's balance.
codeString | "gift_card_balance_started" |
severityString | info |
messageString | Gift card balance started. |
correlationIdString | Unique identifier of the event. |
Gift Card Balance Success
Generated when Checkout successfully retrieves a gift card's balance.
codeString | "gift_card_balance_success" |
severityString | info |
messageString | Gift card balance started. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the amount and isBalanceSufficient properties. |
Gift Card Balance Error
Generated when an error occurs while retrieving the balance of a gift card.
codeString | "gift_card_balance_error" |
severityString | error |
messageString | Gift card balance failed. |
correlationIdString | Unique identifier of the event. |
Gift Card Balance Removed
Generated when the customer removes a gift card's balance that was initially applied as a payment integration.
codeString | "gift_card_balance_removed" |
severityString | info |
messageString | Gift card balance removed. |
correlationIdString | Unique identifier of the event. |
Gift Card Redeem Started
Generated when the customer confirms the payment by gift card and Checkout initiates the redemption of the gift card's balance.
codeString | "gift_card_redeem_started" |
severityString | info |
messageString | Gift card redeem started. |
correlationIdString | Unique identifier of the event. |
Gift Card Redeem Success
Generated when the redemption of a gift card's balance is successful.
codeString | "gift_card_redeem_success" |
severityString | info |
messageString | Gift card redeem success. |
correlationIdString | Unique identifier of the event. |
Gift Card Redeem Error
Generated when the redemption of a gift card's balance fails.
codeString | "gift_card_redeem_error" |
severityString | error |
messageString | Gift card redeem failed. |
correlationIdString | Unique identifier of the event. |
Order Messages
Order Created
codeString | "order_created" |
severityString | info |
messageString | Order {orderId} created. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the order object with the id property. |
Order Creation Error
codeString | "order_creation_error" |
severityString | error |
messageString | Order creation failed with approved payment. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties. |
Order Verification Started
codeString | "order_verification_started" |
severityString | info |
messageString | Order verification started. |
correlationIdString | Unique identifier of the event. |
Order Verification Timeout
codeString | "order_verification_timeout" |
severityString | error |
messageString | Order verification timeout. |
correlationIdString | Unique identifier of the event. |
Order Verification Retry Error
codeString | "order_verification_retry_error" |
severityString | error |
messageString | Order verification retry error. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the error property that can be either orderReferenceNotAvailable or orderVerificationOngoing. |
Payments Messages
Connector Error
codeString | "connector_error" |
severityString | error |
messageString | Connector error. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the connector object with the id property and optional error, message, and data properties. |
Payment Integrations Received
Generated when Checkout receives and loads the payment integrations configured for the Application.
codeString | "payment_integrations_received" |
severityString | info |
messageString | Payment integrations received. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the paymentIntegrations array of objects with the type and connectorId properties. |
Multiple Payment Integration Containers
codeString | "multiple_vendor_button_containers" |
severityString | warn |
messageString | Multiple vendor button containers detected, this may cause issues. |
correlationIdString | Unique identifier of the event. |
Payment Integration Not Available
Generated when there is an error with the selected payment integration and the payment integration is unavailable.
codeString | "payment_integration_not_available" |
severityString | warn |
messageString | Payment integration not available. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the method object with the type, id, and connectorId properties. |
No Payment Integrations
codeString | "no_payment_integrations" |
severityString | error |
messageString | There are no payment integrations configured. |
correlationIdString | Unique identifier of the event. |
Payment Integration Loading
Generated when the selected payment integration is loading.
codeString | "payment_integration_loading" |
severityString | info |
messageString | Payment integration loading. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type and connectorId properties. |
Payment Integration Loading Error
Generated when the loading of the selected payment integration fails.
codeString | "payment_integration_loading_error" |
severityString | error |
messageString | Payment integration loading failed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains an error object and the integration object with the type and connectorId properties. |
Payment Integration Loaded
Generated when the selected payment integration is loaded.
codeString | "payment_integration_loaded" |
severityString | info |
messageString | Payment integration loaded. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type and connectorId properties. |
Payment Integration Selected
Generated when the customer selects the payment integration.
codeString | "payment_integration_selected" |
severityString | info |
messageString | Payment integration selected. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type and hasVendorButton properties. |
Payment Integration Selection Confirmation
Generated when the customer has entered the payment integration information and moves to the next step.
codeString | "payment_integration_selection_confirmation" |
severityString | info |
messageString | Payment integration selected. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type and hasVendorButton properties. |
Payment Integration Selection Confirmation Failed
Generated when the selection of the payment integration by the customer is not successful.
codeString | "payment_integration_selection_confirmation_failed" |
severityString | info |
messageString | Payment integration selection failed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type property. |
Error Loading All Payment Integrations
Generated when the loading of all the payment integrations have failed.
codeString | "error_loading_all_payment_integrations" |
severityString | error |
messageString | Error loading all payment integrations. |
correlationIdString | Unique identifier of the event. |
Payment Started
Generated when the payment starts.
codeString | "payment_started" |
severityString | info |
messageString | Payment started. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the integration object with the type property. |
Payment Failed
Generated when the payment fails.
codeString | "payment_failed" |
severityString | error |
messageString | Payment failed. |
correlationIdString | Unique identifier of the event. |
payload | Contains the reference data of a Payment. |
Payment Cancelled
Generated when the customer cancels the payment (for example, by closing the browser's window).
codeString | "payment_cancelled" |
severityString | info |
messageString | Payment cancelled. |
correlationIdString | Unique identifier of the event. |
payload | Contains the reference data of a Payment. |
Payment Validation Failed
Generated when Checkout and the payment service provider (PSP) do not validate the payment information entered by the customer.
codeString | "payment_validation_failed" |
severityString | info |
messageString | Payment validation failed. |
correlationIdString | Unique identifier of the event. |
payload | Contains the reference data of a Payment. |
Payment Validation Passed
Generated when Checkout and the payment service provider (PSP) validate the payment information entered by the customer.
codeString | "payment_validation_passed" |
severityString | info |
messageString | Payment validation passed. |
correlationIdString | Unique identifier of the event. |
Payment Validation Started
Generated when the validation of the payment information entered by the customer starts.
codeString | "payment_validation_started" |
severityString | info |
messageString | Payment validation started. |
correlationIdString | Unique identifier of the event. |
External Terms And Conditions Pending
codeString | "external_terms_and_conditions_pending" |
severityString | info |
messageString | External terms and conditions pending. |
correlationIdString | Unique identifier of the event. |
Project Messages
Project Is Deactivated
projectKey is deactivated and cannot be initialized. To activate it, contact the Checkout support team.codeString | "project_deactivated" |
severityString | error |
messageString | Project {projectKey} is deactivated. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the project object with the key property. |