# Checkout Events Receive real-time updates when changes occur during order creation and payment processing. Events allow you to receive real-time updates about order creation and payment processing. For example, you can receive notifications if an order creation fails, or if a payment authorization succeeds or fails. By subscribing to these events, you can manage your Checkout processes more effectively, ensuring a smoother experience for both you and your customers. ## How to subscribe to Checkout Events Events use the [Subscriptions API](/api/projects/subscriptions.md), which is separate from the Checkout API. With Subscriptions, you specify a message queue ([destination](/api/projects/subscriptions.md#destination)) which receives the event notifications. This allows you to process events asynchronously, without blocking the Checkout flow. To subscribe to Checkout Events, create a [SubscriptionDraft](/urn?urn=ctp%3Aapi%3Atype%3ASubscriptionDraft) with the `events` field containing the desired [EventTypes](/api/events.md#eventtype), and post this SubscriptionDraft to the [Create Subscription](/urn?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fsubscriptions%3APOST) endpoint. The following example SubscriptionDraft subscribes to refund-related events using Google Cloud Pub/Sub as the destination. To subscribe to all Checkout events, do not include any values in the `types` array. ```json { "destination": { "type": "GoogleCloudPubSub", "topic": "Topic", "projectId": "" }, "events": [ { "resourceTypeId": "checkout", "types": [ "CheckoutPaymentRefunded", "CheckoutPaymentRefundFailed", ] } ] } ``` ## Compare Checkout notification types Checkout provides multiple notification mechanisms for different layers of your integration. The following table summarizes when to use each type: | Layer | Type | Delivery | Purpose | Best for | | --- | --- | --- | --- | --- | | Frontend | [Checkout Messages](/checkout/messages.md) | Browser SDK callbacks (`onInfo`, `onWarn`, `onError`) | Reflect real-time Session events | UI updates, user feedback, prompting user actions | | Backend | Checkout Events (this page) | Message queues (such as SQS or Pub/Sub) | Track events related to Checkout Order creation and Payment processing | Checkout process management, backend workflows, logging | | Backend | [Messages](/api/projects/messages.md) | Message queues (such as SQS or Pub/Sub) | Track resource changes across the platform | Automation, logging, ERP sync | Use Checkout Messages for immediate, in-browser feedback during a Customer's active session. Use Checkout Events and backend Messages for backend workflows that require reliable, asynchronous processing. ## Representations ### Events The following Events represent a change or an action related to the Checkout process. Each Event has a `data` field containing [event data](/checkout/checkout-events.md#event-data-payload). This data is specific to a particular change or action. #### Checkout Order Creation Failed Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutOrderCreationFailedEvent). #### Checkout Payment Authorized Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentAuthorizedEvent). #### Checkout Payment Authorization Failed Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentAuthorizationFailedEvent). #### Checkout Payment Charged Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentChargedEvent). #### Checkout Payment Charge Failed Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentChargeFailedEvent). #### Checkout Payment Authorization Cancelled Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentAuthorizationCancelledEvent). #### Checkout Payment Cancel Authorization Failed Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentCancelAuthorizationFailedEvent). #### Checkout Payment Refunded Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentRefundedEvent). #### Checkout Payment Refund Failed Event [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutPaymentRefundFailedEvent). ### Event Data Payload #### Checkout Message Order Payload Base Data [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutMessageOrderPayloadBaseData). #### Checkout Message Payments Payload Base Data [type definition](/checkout/checkout-events.md?urn=ctp:api:type:CheckoutMessagePaymentsPayloadBaseData). ## Related pages - [Area overview page with navigation](/checkout.md) - [Previous page: Browser SDK](/checkout/browser-sdk.md) - [Next page: Messages](/checkout/messages.md)