Interface: UseOneClickCheckoutResponse
Interface representing the response of the useOneClickCheckout hook.
Hierarchy
Omit<CartContextProps,"createCheckout">↳
UseOneClickCheckoutResponse
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
| Name | Type |
|---|---|
item | CartItem |
Returns
void
Inherited from
Omit.addToCart
Defined in
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
cartItems
• cartItems: CartItem[]
cartItems: An array of CartItem objects, representing the items in the shopping cart.
Inherited from
Omit.cartItems
Defined in
cartLink
• 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
isLoading
• isLoading: boolean
isLoading: A boolean indicating whether the cart is currently being loaded or modified.
Inherited from
Omit.isLoading
Defined in
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
| Name | Type |
|---|---|
id | number |
Returns
void
Inherited from
Omit.removeFromCart
Defined in
totalCost
• totalCost: number
Total cost of everything in the cart, in USDC
Inherited from
Omit.totalCost
Defined in
triggerCheckout
• triggerCheckout: () => Promise<void>
Type declaration
▸ (): Promise<void>
A function that triggers the checkout process.
Returns
Promise<void>