Checkout Messages
Checkout sends Messages to provide feedback about events.
To receive Messages from Checkout, pass the onInfo, onWarn, or onError message handlers with the checkoutFlow or paymentFlow methods when initializing Checkout.
Message structure
Checkout Messages are JSON objects with the following common fields. In addition to these common fields, some Messages also contain a payload field with data about the event.
codeString | Message code for the event. |
severityString | Severity level of the event. Can be |
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
Generated when the requested Application is deactivated. Activate the Application in the Merchant Center to continue.
codeString | "application_disabled" |
severityString |
|
messageString | Application |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Cart Messages
Cart Empty
codeString | "cart_empty" |
severityString |
|
messageString | Cart |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Cart Emptied During Checkout
Generated when the Cart was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process.
codeString | "cart_emptied_during_checkout" |
severityString |
|
messageString | Cart |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Cart Not Found
codeString | "cart_not_found" |
severityString |
|
messageString | Cart for |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Cart With Existing Payment
codeString | "cart_with_exisiting_payment" |
severityString |
|
messageString | Cart with existing approved payment. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Add Discount Code Error
Generated when there was an error adding a Discount Code.
codeString | "add_discount_code_error" |
severityString |
|
messageString | Error adding discount code. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Remove Discount Code Error
Generated when there was an error removing the Discount Code.
codeString | "remove_discount_code_error" |
severityString |
|
messageString | Error removing discount code. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Discount Not Applicable
Generated when the Discount Code is not applicable for the current cart.
codeString | "discount_code_not_applicable" |
severityString |
|
messageString | Discount code not applicable. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains string values for |
Unsupported Country
Generated when the country of the shipping address and/or billing address associated with the Cart does not match the countries set for the Application.
codeString | "unsupported_country" |
severityString |
|
messageString | Cart |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Shipping Address Missing Error
Generated when the shipping address is missing for the given Cart.
codeString | "shipping_address_missing" |
severityString |
|
messageString | The shippingAddress field is missing for cart |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
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 |
|
messageString | Selected shipping method no longer matches cart. |
correlationIdString | Unique identifier of the event. |
Set Shipping Address Error
Generated when the Cart cannot be updated with the shipping address.
codeString | "set_shipping_address_error" |
severityString |
|
messageString | Error setting shipping address. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Checkout Messages
Checkout Loaded
Generated when Checkout is loaded and waiting for the configuration properties to be passed with the checkoutFlow or paymentFlow method.
codeString | "checkout_loaded" |
severityString |
|
messageString | Checkout loaded. |
correlationIdString | Unique identifier of the event. |
Checkout Started
Generated when the configuration properties are passed successfully with the checkoutFlow or paymentFlow method and the checkout process starts.
codeString | "checkout_started" |
severityString |
|
messageString | Checkout started. |
correlationIdString | Unique identifier of the event. |
Checkout Cancelled
Generated when the customer cancels the checkout process.
codeString | "checkout_cancelled" |
severityString |
|
messageString | Checkout cancelled. |
correlationIdString | Unique identifier of the event. |
Checkout Completed
Generated when the customer completes the checkout process.
codeString | "checkout_completed" |
severityString |
|
messageString | Checkout for |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Configuration Messages
Init Error
Generated when an error occurs during Checkout's initialization.
codeString | "init_error" |
severityString |
|
messageString | Error during initialization. |
correlationIdString | Unique identifier of the event. |
Init Timeout
Generated when Checkout does not receive the configuration properties with the checkoutFlow or paymentFlow method on time.
codeString | "init_timeout" |
severityString |
|
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 |
|
messageString | The provided |
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
Generated when the Application does not support the requested Checkout mode.
codeString | "invalid_mode" |
severityString |
|
messageString |
|
correlationIdString | Unique identifier of the event. |
Expired Session
Generated when the Checkout Session is expired.
codeString | "expired_session" |
severityString |
|
messageString | Session is expired. |
correlationIdString | Unique identifier of the event. |
Failed To Refresh Session
Generated when the Checkout Session fails to refresh.
codeString | "failed_to_refresh_session" |
severityString |
|
messageString | Failed to refresh session. |
correlationIdString | Unique identifier of the event. |
Bad Input Data
Generated when the Checkout properties contains invalid fields.
codeString | "invalid_fields" |
severityString |
|
messageString | Some fields are invalid. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
No Shipping Methods
Generated when no Shipping Method is available for the shipping address of the Cart. This may indicate an incomplete configuration.
codeString | "no_shipping_methods" |
severityString |
|
messageString | There are no shipping methods matching cart. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Deprecated Fields
Generated when the Checkout properties contains one or more deprecated fields.
codeString | "deprecated_fields" |
severityString |
|
messageString | Some fields are deprecated. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
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 |
|
messageString | Some fields are invalid and have been updated. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains two arrays:
|
Order Messages
Order Created
Generated when an Order is created after a successful checkout process.
codeString | "order_created" |
severityString |
|
messageString | Order |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Order Creation Error
codeString | "order_creation_error" |
severityString |
|
messageString | Order creation failed with approved payment. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains |
Payments Messages
Payment Connector Error
Generated when the payment Connector triggers an error.
codeString | "payment_connector_error" |
severityString |
|
messageString | Payment connector error. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Methods Received
Generated when Checkout receives and loads the payment methods configured for the Application.
codeString | "payment_methods_received" |
severityString |
|
messageString | Payment methods received. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Multiple Payment Method Containers
Generated when multiple containers for vendor payment buttons are found.
codeString | "multiple_vendor_button_containers" |
severityString |
|
messageString | Multiple vendor button containers detected, this may cause issues. |
correlationIdString | Unique identifier of the event. |
No Payment Methods
Generated when no payment method is set up for an Application. Add at least one Payment method to the Application in the Merchant Center.
codeString | "no_payment_methods" |
severityString |
|
messageString | There are no payment methods configured. |
correlationIdString | Unique identifier of the event. |
Payment Method Loading
Generated when the selected payment method is loading.
codeString | "payment_method_loading" |
severityString |
|
messageString | Payment method loading. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Method Loading Error
Generated when the loading of the selected payment method fails.
codeString | "payment_method_loading_error" |
severityString |
|
messageString | Payment method loading failed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Method Loaded
Generated when the selected payment method is loaded.
codeString | "payment_method_loaded" |
severityString |
|
messageString | Payment method loaded. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Method Selected
Generated when the customer selects the payment method.
codeString | "payment_method_selected" |
severityString |
|
messageString | Payment method selected. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Method Selection Confirmation
Generated when the customer has entered the payment method information and moves to the next step.
codeString | "payment_method_selection_confirmation" |
severityString |
|
messageString | Payment method selected. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Method Selection Confirmation Failed
Generated when the selection of the payment method by the customer is not successful.
codeString | "payment_method_selection_confirmation_failed" |
severityString |
|
messageString | Payment method selection failed. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Started
Generated when the payment starts.
codeString | "payment_started" |
severityString |
|
messageString | Payment started. |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |
Payment Failed
Generated when the payment fails.
codeString | "payment_failed" |
severityString |
|
messageString | Payment failed. |
correlationIdString | Unique identifier of the event. |
Payment Cancelled
Generated when the customer cancels the payment (for example, by closing the browser's window).
codeString | "payment_cancelled" |
severityString |
|
messageString | Payment cancelled. |
correlationIdString | Unique identifier of the event. |
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 |
|
messageString | Payment validation failed. |
correlationIdString | Unique identifier of the event. |
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 |
|
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 |
|
messageString | Payment validation started. |
correlationIdString | Unique identifier of the event. |
Payment Verification Started
Generated when Checkout starts verifying the payment authorization given by the payment service provider (PSP).
codeString | "payment_verification_started" |
severityString |
|
messageString | Payment verification started. |
correlationIdString | Unique identifier of the event. |
Payment Verification Timeout
Generated when the verification of the payment authorization times out.
codeString | "payment_verification_timeout" |
severityString |
|
messageString | Payment verification timeout. |
correlationIdString | Unique identifier of the event. |
External Terms And Conditions Pending
Generated in Payment Only mode when the customer hasn't accepted the terms and conditions yet.
codeString | "external_terms_and_conditions_pending" |
severityString |
|
messageString | External terms and conditions pending. |
correlationIdString | Unique identifier of the event. |
Project Messages
Project Is Deactivated
Generated when the Checkout projectKey is deactivated and cannot be initialized. To activate it, contact the Checkout support team.
codeString | "project_deactivated" |
severityString |
|
messageString | Project |
correlationIdString | Unique identifier of the event. |
payloadObject | Contains the |