younifyd
Menu

giftCardCredit

Adds funds to an existing gift card, increasing its available balance. Use this when a merchant wants to top up a customer's gift card — for example, as a promotional bonus, a customer service gesture, or to reload a…

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the giftCardCredit action (under Gift).
  3. Fill in the fields below, then reference the result from later steps as {{giftcardcredit.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation GiftCardCredit($id: ID!, $creditInput: GiftCardCreditInput!) {
  giftCardCredit(id: $id, creditInput: $creditInput) {
    giftCardCreditTransaction {
      amount {
        amount
        currencyCode
      }
      giftCard {
        balance
        createdAt
        crossCurrencyRedemptionStrategy
        customer
        deactivatedAt
        enabled
        expiresOn
        id
        initialValue
        isRedeemable
        lastCharacters
        lineItem
        maskedCode
        note
        order
        recipientAttributes
        templateSuffix
        updatedAt
      }
      id
      note
      processedAt
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstringrequired

The ID of the gift card to be credited.

creditInputobjectrequired

The input fields to credit a gift card.

creditAmountobjectrequired2 fields
notestring
processedAtstring
json
{
  "id": "string",
  "creditInput": {
    "creditAmount": {
      "amount": "string",
      "currencyCode": "USD"
    },
    "note": "string",
    "processedAt": "string"
  }
}

Response

Read the result with {{giftcardcredit.response.data.data.giftCardCredit}}. If the API returns errors, the step fails and they are at {{giftcardcredit.response.data.errors}}.

giftCardCreditTransactionobject
amountobject2 fields
giftCardobject18 fields
idstring
notestring
processedAtstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.

giftCardCredit — Shopify — Documentation