Menu
giftCardDebit
Removes funds from a gift card, decreasing its available balance. Use this for manual balance adjustments — for example, correcting an accidental over-credit or applying a fee.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the giftCardDebit action (under Gift).
- Fill in the fields below, then reference the result from later steps as
{{giftcarddebit.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 GiftCardDebit($id: ID!, $debitInput: GiftCardDebitInput!) {
giftCardDebit(id: $id, debitInput: $debitInput) {
giftCardDebitTransaction {
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",
"debitInput": {
"debitAmount": {
"amount": "string",
"currencyCode": "USD"
},
"note": "string",
"processedAt": "string"
}
}
Response
Read the result with {{giftcarddebit.response.data.data.giftCardDebit}}. If the API returns errors, the step fails and they are at {{giftcarddebit.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?