Skip to main content

Storefront API now returns errors when adding a gift card to a cart with missing or invalid recipient details

As of API version 2026-01, the Storefront API returns a GIFT_CARD_RECIPIENT_INVALID error when adding a gift card to a cart with missing or invalid recipient details, such as in this example.

Previously, when adding a gift card to a cart using either the cartCreate or cartLinesAdd mutations, an empty cart and empty userErrors would be returned if any of the recipient details were invalid, such as a missing email address. With this change a GIFT_CARD_RECIPIENT_INVALID error is returned for both cartCreate or cartLinesAdd mutations, so that you can use the information to surface gift card recipient errors back to the client.

Was this section helpful?