Skip to main content

Interface: UseOneClickCheckoutResponse

Interface representing the response of the useOneClickCheckout hook.

Hierarchy​

Properties​

addToCart​

• addToCart: (item: CartItem) => void

Type declaration​

▸ (item): void

addToCart: A function that accepts a CartItem object as a parameter and adds the item to the shopping cart.

Parameters​
NameType
itemCartItem
Returns​

void

Inherited from​

Omit.addToCart

Defined in​

hooks/useCart.tsx:23


cartId​

• cartId: undefined | string

cartId: A string representing the unique identifier of the cart, or undefined if the cart has not been created yet.

Inherited from​

Omit.cartId

Defined in​

hooks/useCart.tsx:47


cartItems​

• cartItems: CartItem[]

cartItems: An array of CartItem objects, representing the items in the shopping cart.

Inherited from​

Omit.cartItems

Defined in​

hooks/useCart.tsx:17


• cartLink: undefined | string

cartLink: A string representing the URL for the cart's checkout page, or undefined if the cart has not been created yet.

Inherited from​

Omit.cartLink

Defined in​

hooks/useCart.tsx:53


isLoading​

• isLoading: boolean

isLoading: A boolean indicating whether the cart is currently being loaded or modified.

Inherited from​

Omit.isLoading

Defined in​

hooks/useCart.tsx:41


removeFromCart​

• removeFromCart: (id: number) => void

Type declaration​

▸ (id): void

removeFromCart: A function that accepts an item's ID as a parameter and removes the corresponding item from the shopping cart.

Parameters​
NameType
idnumber
Returns​

void

Inherited from​

Omit.removeFromCart

Defined in​

hooks/useCart.tsx:29


totalCost​

• totalCost: number

Total cost of everything in the cart, in USDC

Inherited from​

Omit.totalCost

Defined in​

hooks/useCart.tsx:58


triggerCheckout​

• triggerCheckout: () => Promise<void>

Type declaration​

▸ (): Promise<void>

A function that triggers the checkout process.

Returns​

Promise<void>

Defined in​

hooks/useOneClickCheckout.tsx:33