@noaignitereact-centra-checkoutContext

CentraProvider

React Context provider that is required to use the useCentra and useCentraHandlers hooks. Provides state management and related handlers of the users current Centra selection via the Checkout API. The handlers could be used for adding products to the selection and making purchases, for example.

useCentraSelection

This hook returns the centra selection

useCentraHandlers

This hook returns update handlers

useCentraReceipt

Returns the latest order receipt given a selection token

useCentraOrders

Returns the latest orders for the currently logged in user

  • @param from - Display orders from this index. Defaults to 0.
  • @param size - Display this many orders. Defaults lists all orders.

ProviderProps

The prop types that CentraProvider accepts