Skip to main content
Loop writes this metafield only when the feature is enabled for your shop. Contact your Merchant Success Manager or Implementation team to request enablement.

Overview

When Loop issues a Shopify gift card for a return, it can append structured gift card details to the original Shopify order. Integrations read this metafield from Shopify’s order API — there is no Loop API endpoint for this data. Scope: Shopify-native gift card issuance only (Loop creates the gift card in Shopify). This does not apply to third-party store credit or gift card platforms (for example Rise.ai) or other credit providers. Use the Gift card webhook for those flows.

Metafield location

Each successful issuance adds one map entry keyed by that gift card. If Loop writes the same gift card again, the existing entry for that key is replaced with the same payload — integrators should treat entries as idempotent by map key.

When Loop writes

Loop writes when all of the following are true:
  1. The shop has this feature enabled.
  2. Gift card credit is successfully issued (action issued).
  3. The provider is Shopify gift card API or Shopify gift card order (Loop-created Shopify gift cards).
Loop does not write for Rise, Reshop, Shopify store credit refund, third-party gift card webhooks, failed issuance, or shops without enablement.

Standard vs out-of-stock exchange

Both paths write the same metafield when Loop issues a Shopify gift card. The entry shape differs. When Loop issues a Shopify gift card for an out-of-stock exchange (including auto out-of-stock gift cards), Loop writes this metafield when enabled and does not send the giftcard.requested webhook. That webhook still applies for third-party providers such as Rise.
Out-of-stock edge case: If Loop cannot obtain a Shopify gift card ID or a non-zero issuance amount, no metafield entry is written for that event.

Entry schema

Each map value uses the same fields as the Gift card webhook payload (minus topic and trigger), plus issuance identifiers. Amount fields are formatted strings in shop currency.

Examples

Standard issuance

Out-of-stock exchange (second entry on the same order)

Reading from Shopify

Query the order metafield with the Shopify Admin API:
Parse value as JSON. Multiple issuances on the same order accumulate as separate map keys.