Skip to main content
object

Requires read_gift_cards access scope.

A gift card that customers use as a payment method. Stores the initial value, current balance, and expiration date.

You can issue gift cards to a specific Customer or send them to a GiftCardRecipient with a personalized message. The card tracks its transaction history through GiftCardCreditTransaction and GiftCardDebitTransaction records. You can create and deactivate gift cards using the GiftCardCreate and GiftCardDeactivate mutations, respectively.


Note

After a gift card is deactivated, it can't be used for further purchases or re-enabled.


•MoneyV2!
non-null

The gift card's remaining balance.

•DateTime!
non-null

The date and time at which the gift card was created.

•Customer

The customer who will receive the gift card.

•DateTime

The date and time at which the gift card was deactivated.

•Boolean!
non-null

Whether the gift card is enabled.

•Date

The date at which the gift card will expire.

•ID!
non-null

A globally-unique ID.

•MoneyV2!
non-null

The initial value of the gift card.

•String!
non-null

The final four characters of the gift card code.

•String!
non-null

The gift card code. Everything but the final four characters is masked.

•String

The note associated with the gift card, which isn't visible to the customer.

•Order

The order associated with the gift card. This value is null if the gift card was issued manually.

•GiftCardRecipient

The recipient who will receive the gift card.

•String

The theme template used to render the gift card online.

•GiftCardTransactionConnection

The transaction history of the gift card.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•DateTime!
non-null

The date and time at which the gift card was updated.


Was this section helpful?

•query

Retrieves a GiftCard by its ID. Returns the gift card's balance, transaction history, Customer information, and whether it's enabled.

Additional fields include the initial value, expiration date, deactivation timestamp (if applicable), and the associated Order if the gift card was purchased by a customer through checkout. Gift cards that merchants create manually won't have an associated order.

Arguments

•ID!
required

The ID of the GiftCard to return.


•query

Returns a paginated list of GiftCard objects issued for the shop.

You can filter gift cards by attributes such as status, last characters of the code, balance status, and other values using the query parameter. You can also apply SavedSearch objects to filter results.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•GiftCardSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to default
•string

Filter by a case-insensitive search of multiple fields in a document, including gift card codes.

Example:

  • query=a5bh6h64b329j4k7
  • query=Bob Norman
Anchor to balance_status
•string

Valid values:

  • full
  • partial
  • empty
  • full_or_partial

Example:

  • balance_status:full
Anchor to created_at
•time

Example:

  • created_at:>=2020-01-01T12:00:00Z
Anchor to expires_on
•date

Example:

  • expires_on:>=2020-01-01
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to initial_value
•string

Example:

  • initial_value:>=100
•string

Valid values:

  • manual
  • purchased
  • api_client

Example:

  • source:manual
•string

Valid values:

  • disabled
  • enabled
  • expired
  • expiring

Example:

  • status:disabled OR status:expired
•ID

The ID of a saved search. The search’s query string is used as the query argument.



Was this section helpful?

•mutation

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.

Arguments

•GiftCardCreateInput!
required

The input fields to create a gift card.


•mutation

Deactivate a gift card. A deactivated gift card cannot be used by a customer. A deactivated gift card cannot be re-enabled.

Arguments

•ID!
required

The ID of the gift card to deactivate.


•mutation

Send notification to the customer of a gift card.

Arguments

•ID!
required

The ID of the gift card to send.


•mutation

Send notification to the recipient of a gift card.

Arguments

•ID!
required

The ID of the gift card to send.


•mutation

Update a gift card.

Arguments

•ID!
required

The ID of the gift card to be updated.

•GiftCardUpdateInput!
required

The input fields to update the gift card.



Was this section helpful?

•interface

Was this section helpful?