Skip to main content

Interface: InitOptions

Properties

__unstable_twoFactorRetryFn?

optional __unstable_twoFactorRetryFn?: () => Promise<Session | undefined>

Beta feature - (may change in the future) Middleware function that should return a Session, called when API functions return a 423. This function allows your app to refetch a session, store it by whatever means your app uses for future calls, then return it so the call that failed can be retried.

Returns

Promise<Session | undefined>

Session


appName?

optional appName?: string

Merchant application name, optional, but helpful for debugging


appVersion?

optional appVersion?: string

Merchant application version, optional, but helpful for debugging


loginRetryFn?

optional loginRetryFn?: () => Promise<Session | undefined>

Middleware function that should return a Session, called when API functions return a 401. This function allows your app to refetch a session, store it by whatever means your app uses for future calls, then return it so the call that failed can be retried.

Returns

Promise<Session | undefined>

Session


storefrontAccessToken?

optional storefrontAccessToken?: string

Recharge storefront access token used for Recharge Storefront API access


storeIdentifier?

optional storeIdentifier?: string

On Shopify this should be your myshopify.com domain