Asynchronous Checkout Interface

The cart processing and checkout integrations share a base method structure. These interfaces extend the base interface.

The IntegrationInfo input param provides values that checkout APIs use to map requests to responses and the necessary metadata and context. Integration code also needs instance details because code can be reused across stores.

IntegrationStatus supports only synchronous execution of Apex integrations. The implementation must return the status of the execution.

  • Success indicates that the integration executed successfully.

  • Failed indicates a transient, unknown error managed by the implementor. The buyer can retry this action.

    If IntegrationStatus returns Failed, the checkout session state is set to Error. In turn, the Checkout flow fails, presents an error to the buyer, and redirects the buyer back to the cart to resolve errors or retry.

If a runtime exception occurs during an Apex integration execution, the integration execution is rolled back and the system fires a platform error event. This rollback preserves data integrity and marks the integration task as failed. The checkout session state is updated to Error, which causes the Checkout flow process to fail. When the checkout fails, an error displays to the buyer, and they’re redirected back to the cart to resolve the errors or retry. To receive more information about an error, subscribe to the platform error event.