Gift CardsAPI
API
The API for interacting with gift cards.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
Anchor to appliedGiftCards
appliedGiftCards
StatefulRemoteSubscribable<[]>
required
Gift Cards that have been applied to the checkout.
Was this section helpful?
Anchor to checkoutapiCheckoutApi
The API object provided to purchase.checkout
extension targets.
Anchor to applyGiftCardChange
applyGiftCardChange
(change: ) => Promise<>
required
Performs an update on the gift cards. It resolves when gift card change have been negotiated and results in an update to the value retrieved through the property.
Caution
> See security considerations if your extension retrieves gift card codes through a network call.
Note
This method will return an error if the buyer is using an accelerated checkout method, such as Apple Pay, Google Pay, or Meta Pay.
Was this section helpful?
Anchor to useAppliedGiftCardsuse Applied Gift Cards()
use Applied Gift Cards()
Returns the current gift cards applied to the cart.
[]
Was this section helpful?
Anchor to useApplyGiftCardChangeuse Apply Gift Card Change()
use Apply Gift Card Change()
Returns a function to add or remove gift cards.
(change: ) => Promise<>
Was this section helpful?