Requires write_gift_card_transactions access scope. Also: User needs create_and_edit_gift_cards permission.

Credit a gift card.


The input fields to credit a gift card.

Anchor to id
id
required

The ID of the gift card to be credited.


Was this section helpful?

The gift card credit transaction that was created.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation giftCardCredit($creditInput: GiftCardCreditInput!, $id: ID!) {
  giftCardCredit(creditInput: $creditInput, id: $id) {
    giftCardCreditTransaction {
      # GiftCardCreditTransaction fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "creditInput": {
    "creditAmount": {
      "amount": "29.99",
      "currencyCode": "AED"
    },
    "note": "<your-note>",
    "processedAt": "2019-09-07T15:50:00Z"
  },
  "id": "gid://shopify/<objectName>/10079785100"
}
input GiftCardCreditInput {
  creditAmount: MoneyInput!
  note: String
  processedAt: DateTime
}

input MoneyInput {
  amount: Decimal!
  currencyCode: CurrencyCode!
}