Skip to main content
mutation

Requires write_gift_cards access scope.

Creates a new GiftCard with a specified initial value. You can assign the gift card to a Customer or create it without assignment for manual distribution.

You can customize the gift card with an optional code, expiration date, and internal note. If you don't provide a code, the system generates a random 16 character alphanumeric code. The mutation also supports scheduling gift card notifications to recipients, with a personalized message, through the recipientAttributes field on the GiftCardCreateInput input object.

•GiftCardCreateInput!
required

The input fields to create a gift card.


Was this section helpful?

Anchor to GiftCardCreatePayload returnsGiftCardCreatePayload returns

•GiftCard

The created gift card.

•String

The created gift card's code.

•[GiftCardUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?