FirmhouseCartProvider
Props
apiToken string
string
The storefront access token that you can get from the Firmhouse Portal.
cartToken string?
string?
The cart token that you can get from the Firmhouse SDK. This prop is optional, if you don't provide both cartToken
and initialFirmhouseCart
the cart will be initialized with an empty cart.
paymentPageUrl string?
string?
The URL of the payment page where the user will be redirected if the payment is failed.
paymentSuccessPageUrl string?
string?
The URL of the payment success page where the user will be redirected if the payment is successful.
locale string?
string?
The locale of the user. This prop is optional, and it defaults to default locale for the country.
fallback React.ReactNode?
React.ReactNode?
A fallback component that is shown while the data is loading. This prop is optional, and it defaults to null
.
availableCountries string[]?
string[]?
An array of country codes that will be available for the user to select. This prop is optional, and it defaults to ['NL', 'DE', 'BE', 'LU', 'AT', 'CH']
.
translations Record<string, Record<string, NestedTranslations>>?
Record<string, Record<string, NestedTranslations>>?
Example:
The initial cart object that you can get from the Firmhouse SDK. If you would like to initialize the cart based on the data that you have, you can provide this prop. This prop is optional, and it defaults to null
.
Example
Last updated
Was this helpful?