Skip to main content
Skip to main content



The URL to your Medusa backend.
An object used to set the Tanstack Query client. The object requires a client property, which should be an instance of QueryClient.
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.
API key used for authenticating admin requests. Follow this guide to learn how to create an API key for an admin user.
Publishable API key used for storefront requests. You can create a publishable API key either using the admin APIs or the Medusa admin.
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: `{}`

Was this section helpful?