GiftCardsResource
This class is used to send requests to Store Gift Card API Routes. All its method
are available in the JS Client under the medusa.giftCards property.
Customers can use gift cards during checkout to deduct the gift card's balance from the checkout total. The methods in this class allow retrieving a gift card's details by its code. A gift card can be applied to a cart using CartsResource.
Related Guide: How to use gift cards in a storefront.
Methods
retrieve
Retrieve a Gift Card's details by its associated unique code.
Example
Parameters
codestringRequiredThe code of the gift card.
customHeadersRecord<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromiseResponsePromise<StoreGiftCardsRes>RequiredResolves to the details of the gift card.
ResponsePromiseResponsePromise<StoreGiftCardsRes>RequiredWas this section helpful?