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
- Add a step and choose the Shopify connector.
- Pick the giftCardCredit action (under Gift).
- 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.
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.
{
"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}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?