Streamlined Gift Card Integration with Storefront API
The Shopify Storefront API has been enhanced in version 2025-10, making it easier than ever to manage gift cards in your online store's cart. Now, you can add new gift cards to a cart without removing any previously applied ones.
How to Add Gift Cards Using the Storefront API
Using the cartGiftCardCodesAdd mutation in the GraphQL Storefront API, you can seamlessly add one or more gift cards to an existing cart. This feature simplifies the checkout process for customers and provides greater flexibility for store owners. Here's how it works:
- Create a cart using the Storefront API if one does not already exist.
- Call the
cartGiftCardCodesAddmutation, passing the relevant gift card codes as parameters. - Gift cards are added instantly to the cart, alongside any existing ones.
Why This Matters for Merchants
The ability to add gift cards without replacing previously applied ones provides the following benefits:
- Improved customer experience by allowing multiple gift cards to be used seamlessly.
- Reduced customer support inquiries about gift card management during checkout.
- Faster and more efficient cart updates for developers building storefront experiences.
Get Started Today
Ready to implement this new feature in your store? Visit the Shopify Storefront API documentation to explore the cartGiftCardCodesAdd mutation and other powerful tools available to you.