Gift Card Transaction Mapping

Topic summary

A developer is building a reporting system to map gift card transactions between Shopify and an external system within specific timeframes.

Current Challenges:

  • Initial approach: Tracking orders via receiptJson field only captures gift cards that have been used, missing creation events and proving inefficient since gift cards appear in few orders
  • Alternative approach: Using the new GiftCardTransaction connection lacks direct links to orders and doesn’t appear in tenderTransactions queries (gift card transactions don’t impact shop balance until the card is purchased, not when spent)

Potential Workaround:
Combining both methods by:

  • Filtering gift cards by creation date within the timeframe
  • Retrieving associated purchase orders
  • Using orders to get all gift card debits/refund credits
  • Querying transactions outside tenderTransactions scope

However, this requires multiple complex queries. The developer seeks either a direct connection from GiftCardTransaction to orders or a simpler query method.

Documentation Issue:
Notes that the description on the GiftCardTransaction interface page appears incorrect (text is reversed/garbled).

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hi,

I’m working on a reporting function for a client to map all of the transactions recorded against orders in their external system with all of the gcift card transactions in Shopify in a given time frame. Initially, I started by tracking orders and getting the gift card ID from the receiptJson field. This method doesn’t let me capture the creation event of the gift card, only getting a list of gift cards that have been transacted on, furthermore, it is incredibly inefficient as gift cards are only used on a small fraction of orders.

I then attempted to go the other way, get all of the gift cards, and their transactions via the newly added GiftCardTransaction connection, however since this type doesn’t have a connection to orders and doesn’t show up in https://shopify.dev/docs/api/admin-graphql/2024-10/queries/tenderTransactions since to my understanding, gift card transactions aren’t counted as having a financial impact on a shop's balance since the credit is applied to the shops balance on the purchase of the gift card, not when it’s spent.

Technically I can combine these methods by using the orders to get all of the gift card Debits/Refund Credits and use the gift cards filtered by created at to get the orders where they are purchased, even if they are not otherwise transacted on in the timeframe but this seems like a lot of queries and mess where there could be a connection from GiftCardTransaction to orders, or a way to query on transactions outside the scope of tenderTransactions (although from my understanding, that would effectively equate to being the same thing).

Please let me know if I’m missing something!

Thanks

quick note, looks like the description on this page is incorrect:

https://shopify.dev/docs/api/admin-graphql/2024-10/interfaces/GiftCardTransaction

Represents information about the metafields associated to the specified resource.