Checkout Messages

commercetools Checkout sends Messages to provide feedback about events.

To receive Messages from commercetools 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.

code
String

The Message code for the event.

severity
String

The severity level of the event. It can be info, warn, or error.

message
String

A human-readable description of the event.

Example Message of severiry level 'error' with payloadjson
{
"severity": "error",
"code": "project_deactivated",
"message": "commercetools Checkout {projectKey} is deactivated.",
"payload": {
"project": {
"key": "{projectKey}"
}
}
}
Example Message of severiry level 'info' with payloadjson
{
"severity": "info",
"code": "order_created",
"message": "Order {orderId} created.",
"payload": {
"order": {
"id": "{orderId}"
}
}
}

Message types

Application Messages

Application Deactivated

Generated when the requested Application is deactivated. Activate the Application in the Merchant Center to continue.

code
String
"application_disabled"
severity
String

error

message
String

Application {applicationKey} for commercetools Checkout {projectKey} is disabled.

payload
Object

Contains the project and application objects with the related key property.

Application Not Found

Generated when the requested Application is not found. The Application may have been deleted or its configuration is incorrect.

code
String
"application_not_found"
severity
String

error

message
String

Application {applicationKey} for commercetools Checkout {projectKey} not found.

payload
Object

Contains the project and application objects with the related key property.

Cart Messages

Cart Empty

Generated when the Cart for the current checkout is empty. The Cart must contain at least one Line Item.

code
String
"cart_empty"
severity
String

error

message
String

Cart {cartId} is empty.

payload
Object

Contains the cart object with the id property.

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.

code
String
"cart_emptied_during_checkout"
severity
String

error

message
String

Cart {cartId} was emptied during checkout.

payload
Object

Contains the cart object with the id property.

Cart Not Found

Generated when the Cart is not found. To start the checkout process, a valid Cart with at least one Line Item is required.

code
String
"cart_not_found"
severity
String

error

message
String

Cart {cartId} for commercetools Checkout {projectKey} and application {applicationKey} not found.

payload
Object

Contains the project, application, and cart objects with the related key and id properties.

Cart With Existing Payment

Generated when trying to add a Payment to a Cart that already references an approved Payment.

code
String
"cart_with_exisiting_payment"
severity
String

error

message
String

Cart with existing approved payment.

payload
Object

Contains the cart object with the id property.

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.

code
String
"unsupported_country"
severity
String

error

message
String

Cart {cartId} has unsupported country.

payload
Object

Contains the cart object with the id property, shippingCountry, billingCountry, and the supportedCountries array.

Set Shipping Address Error

Generated when the Cart cannot be updated with the shipping address.

code
String
"set_shipping_address_error"
severity
String

error

message
String

Error setting shipping address.

payload
Object

Contains the errors array of objects, with the related code and message properties.

Checkout Messages

Checkout Loaded

Generated when Checkout is loaded and waiting for the configuration properties to be passed with the checkoutFlow or paymentFlow method.

code
String
"checkout_loaded"
severity
String

info

message
String

Checkout loaded.

Checkout Started

Generated when the configuration properties are passed successfully with the checkoutFlow or paymentFlow method and the checkout process starts.

code
String
"checkout_started"
severity
String

info

message
String

Checkout started.

Checkout Cancelled

Generated when the customer cancels the checkout process.

code
String
"checkout_cancelled"
severity
String

info

message
String

Checkout cancelled.

Checkout Completed

Generated when the customer completes the checkout process.

code
String
"checkout_completed"
severity
String

info

message
String

Checkout for {orderId} completed.

payload
Object

Contains the order object with the id property.

Configuration Messages

Init Error

Generated when an error occurs during Checkout's initialization.

code
String
"init_error"
severity
String

error

message
String

Error during initialization.

Init Timeout

Generated when Checkout does not receive the configuration properties with the checkoutFlow or paymentFlow method on time.

code
String
"init_timeout"
severity
String

error

message
String

Timeout error, no init message received.

Invalid Mode

Generated when the Application does not support the requested Checkout mode.

code
String
"invalid_mode"
severity
String

info

message
String

{mode} mode requires an application with mode type {modeTypeRequested}. Current mode {modeTypeReceived}.

Bad Input Data

Generated when the checkoutConfig object contains one or more invalid fields.

code
String
"invalid_fields"
severity
String

error

message
String

Some fields are invalid.

payload
Object

Contains the invalidFields array of objects with the related field, message, and invalidValue properties.

Invalid Token

Generated when the accessToken is invalid.

code
String
"invalid_token"
severity
String

error

message
String

The token is invalid.

No Shipping Methods

Generated when no Shipping Method is available for the shipping address of the Cart. This may indicate an incomplete configuration.

code
String
"no_shipping_methods"
severity
String

error

message
String

There are no shipping methods matching cart.

payload
Object

Contains the cart object with the id property.

Unavailable Locale

Generated when the provided locale is not available for localization. The localization falls back to English.

code
String
"unavailable_locale"
severity
String

error

message
String

The provided locale {locale} is not available for translated definitions.

payload
Object

Contains the locale property.

Deprecated Fields

Generated when the checkoutConfig object contains one or more deprecated fields.

code
String
"deprecated_fields"
severity
String

warn

message
String

Some fields are deprecated.

payload
Object

Contains the deprecatedFields array.

Permissions Not Found

Generated when no permissions to create a Composable Commerce API Client are found. To create permissions, in the Merchant Center navigation menu, go to any page under commercetools Checkout and click Confirm creation.

code
String
"no_permissions_found"
severity
String

warn

message
String

No permissions are found in your commercetools Checkout.

Order Messages

Order Created

Generated when an Order is created after a successful checkout process.

code
String
"order_created"
severity
String

info

message
String

Order {orderId} created.

payload
Object

Contains the order object with the id property.

Order Creation Error

Generated when an Order that references an approved Payment cannot be created.

code
String
"order_creation_error"
severity
String

error

message
String

Order creation failed with approved payment.

payload
Object

Contains paymentReference, sessionId, and the errors array of objects, with the related code and message properties.

Payments Messages

Payment Connector Error

Generated when the payment Connector triggers an error.

code
String
"payment_connector_error"
severity
String

error

message
String

Payment connector error.

payload
Object

Contains the connector object with the id property.

Payment Methods Received

Generated when Checkout receives and loads the payment methods configured for the Application.

code
String
"payment_methods_received"
severity
String

info

message
String

Payment methods received.

payload
Object

Contains the paymentMethods array of objects with the type and connectorId properties.

Multiple Payment Method Containers

Generated when multiple containers for vendor payment buttons are found.

code
String
"multiple_vendor_button_containers"
severity
String

warn

message
String

Multiple vendor button containers detected, this may cause issues.

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.

code
String
"no_payment_methods"
severity
String

error

message
String

There are no payment methods configured.

Payment Method Loading

Generated when the selected payment method is loading.

code
String
"payment_method_loading"
severity
String

info

message
String

Payment method loading.

payload
Object

Contains the method object with the type and connectorId properties.

Payment Method Loading Error

Generated when the loading of the selected payment method fails.

code
String
"payment_method_loading_error"
severity
String

error

message
String

Payment method loading failed.

payload
Object

Contains the method object with the type and connectorId properties.

Payment Method Loaded

Generated when the selected payment method is loaded.

code
String
"payment_method_loaded"
severity
String

info

message
String

Payment method loaded.

payload
Object

Contains the method object with the type and connectorId properties.

Payment Method Selected

Generated when the customer selects the payment method.

code
String
"payment_method_selected"
severity
String

info

message
String

Payment method selected.

payload
Object

Contains the method object with the type and hasVendorButton properties.

Payment Method Selection Confirmation

Generated when the customer has entered the payment method information and moves to the next step.

code
String
"payment_method_selection_confirmation"
severity
String

info

message
String

Payment method selected.

payload
Object

Contains the method object with the type and hasVendorButton properties.

Payment Method Selection Confirmation Failed

Generated when the selection of the payment method by the customer is not successful.

code
String
"payment_method_selection_confirmation_failed"
severity
String

info

message
String

Payment method selection failed.

payload
Object

Contains the method object with the type property.

Payment Started

Generated when the payment starts.

code
String
"payment_started"
severity
String

info

message
String

Payment started.

payload
Object

Contains the method object with the type property.

Payment Failed

Generated when the payment fails.

code
String
"payment_failed"
severity
String

error

message
String

Payment failed.

Payment Cancelled

Generated when the customer cancels the payment (for example, by closing the browser's window).

code
String
"payment_cancelled"
severity
String

info

message
String

Payment cancelled.

Payment Validation Failed

Generated when Checkout and the payment service provider (PSP) do not validate the payment information entered by the customer.

code
String
"payment_validation_failed"
severity
String

info

message
String

Payment validation failed.

Payment Validation Passed

Generated when Checkout and the payment service provider (PSP) validate the payment information entered by the customer.

code
String
"payment_validation_passed"
severity
String

info

message
String

Payment validation passed.

Payment Validation Started

Generated when the validation of the payment information entered by the customer starts.

code
String
"payment_validation_started"
severity
String

info

message
String

Payment validation started.

Payment Verification Started

Generated when Checkout starts verifying the payment authorization given by the payment service provider (PSP).

code
String
"payment_verification_started"
severity
String

info

message
String

Payment verification started.

Payment Verification Timeout

Generated when the verification of the payment authorization times out.

code
String
"payment_verification_timeout"
severity
String

error

message
String

Payment verification timeout.

External Terms And Conditions Pending

Generated in Payment Only mode when the customer hasn't accepted the terms and conditions yet.

code
String
"external_terms_and_conditions_pending"
severity
String

info

message
String

External terms and conditions pending.

Project Messages

Project Is Deactivated

Generated when the commercetools Checkout projectKey is deactivated and cannot be initialized. To activate it, contact the Checkout support team.

code
String
"project_deactivated"
severity
String

error

message
String

commercetools Checkout {projectKey} is deactivated.

payload
Object

Contains the project object with the key property.