Skip to main content
Skip to main content

MedusaProviderProps

Properties

baseUrlstringRequired
The URL to your Medusa backend.
queryClientProviderPropsQueryClientProviderPropsRequired
An object used to set the Tanstack Query client. The object requires a client property, which should be an instance of QueryClient.
apiKeystring
API key used for authenticating admin requests. Follow this guide to learn how to create an API key for an admin user.
publishableApiKeystring
Publishable API key used for storefront requests. You can create a publishable API key either using the admin APIs or the Medusa admin.
maxRetriesnumber
Number of times to retry a request if it fails.

Default: 3

customHeadersRecord<string, any>
An object of custom headers to pass with every request. Each key of the object is the name of the header, and its value is the header's value.

Default: `{}`

medusaClientMedusa
An instance of the Medusa JS Client. If you don't provide an instance, one will be created using the baseUrl, apiKey, publishableApiKey, maxRetries, and customHeaders props.
Was this section helpful?