OneBasket

Events

The events OneBasket emits during the lifecycle of a basket and an order.

OneBasket emits events as baskets and orders change. Server-side integrations use them to react to a customer's progress through checkout and to order processing.

Subscribing to events

Events are delivered to server-side integrations, not to browsers or apps. Contact your Stadion technical contact to set up a subscription.

Basket events

EventEmitted when
BasketCreatedA new basket is created. This is the state of a basket before any product is added.
BasketUpdatedAny provider basket in the basket is updated. It is emitted at the end of an asynchronous change, such as adding a product.
BasketDeletedA basket is deleted. Storefronts call this "emptying" the basket.
PaymentIntentCreatedThe basket is prepared for payment. OneBasket uses this event to coordinate the payment system and to tell each provider that a payment will be made. A provider can lock inventory or reject the payment. The basket is immutable from this point, unless the payment intent is deleted before payment arrives.
PaymentIntentDeletedThe customer backed out of payment. The basket is mutable again, so the customer can change quantities or add another product.
BasketCompleteOneBasket received confirmation of the payment from the payment provider. The basket is permanently immutable. The Orders service receives this event and starts order processing.

Order events

EventEmitted when
OrderProcessingCompletedEvery provider has confirmed or rejected its part of the order. Read the per-provider details to find the cause of a rejection.

How events relate to the Storefront API

Storefront requestResulting event
Create a basketBasketCreated
Any request that changes a basketBasketUpdated
Delete a basketBasketDeleted
Create a payment intentPaymentIntentCreated
Cancel a payment intentPaymentIntentDeleted
Payment confirmed by the payment providerBasketComplete, then OrderProcessingCompleted

On this page