Skip to main content
PriceOSProvider configures auth and backend settings for all PriceOS React hooks.
Set up backend handlers first with React integration guide.

Usage

Parameters

ReactNode
required
Your app tree that will use PriceOS hooks.
function
Returns a bearer token that is sent as Authorization: Bearer ... to your backend handler routes. Type: () => Promise<string | null | undefined>. Use this when your backend requires authenticated requests.
string
Base URL for your PriceOS handler routes. Default: /api/priceos. Use this if your handlers are mounted somewhere else, for example https://api.yourapp.com/priceos.
string
Controls SDK logging output in the browser. Allowed values: "none" | "error" | "warn" | "info" | "debug". Default: "error".

Full example