API Reference

@frontend-sdk/recharge - v0.26.0

Interfaces

Type aliases

CDNRequestStatus

Ƭ CDNRequestStatus: "loading" | "ready"


ShippingIntervalUnitType

Ƭ ShippingIntervalUnitType: "days" | "weeks" | "months"

Functions

useReCharge

Const useReCharge(options): UseReCharge

Parameters

NameType
optionsUseReChargeOptions

Returns

UseReCharge

Interface: Cart

Properties

checkoutUrl

Readonly checkoutUrl: string


items

Readonly items: readonly CartItem[]

Interface: CartItem

Properties

id

Readonly id: number


properties

Optional Readonly properties: Record<PropertyKey, unknown>


quantity

Readonly quantity: number

Interface: Metafield

Properties

key

Readonly key: string


namespace

Readonly namespace: string


value

Readonly value: unknown

Interface: Metafields

Hierarchy

Interface: Product

Properties

externalId

Readonly externalId: number


metafields

Optional Readonly metafields: Metafields

Interface: UseReCharge

Properties

getCartItem

Readonly getCartItem: <Target>(target: Target, shippingIntervalFrequency: number) => Target

Type declaration

▸ <Target>(target, shippingIntervalFrequency): Target

Returns the cart item object that is passed to addItems hook in frontend-checkout to add items to cart

Type parameters
NameType
TargetTarget: CartItem
Parameters
NameType
targetTarget
shippingIntervalFrequencynumber
Returns

Target


isRechargeable

Readonly isRechargeable: boolean

Does the product have subscriptions/selling plans?


shippingIntervalFrequency

Optional Readonly shippingIntervalFrequency: readonly number[]

Available shipping intervals for a given product variant


shippingIntervalUnitType

Optional Readonly shippingIntervalUnitType: string


status

Optional Readonly status: CDNRequestStatus

Status of the fetch call to reCharge's CDN

Interface: UseReChargeOptions

Properties

currentVariantId

Readonly currentVariantId: number


product

Readonly product: null | CMSProduct


storeUrl

Readonly storeUrl: string