Skip to content

giftCardBalance

Queryin Gift card

What is left on a gift card, asked with its number and, for a card that has one, its PIN. Null when the card cannot be used: a missing or wrong PIN, an unknown number and a card locked after too many wrong PINs all answer the same, so nothing says which card numbers exist. A card in a currency other than the cart's cannot be used either. Limited per client, so card numbers cannot be tried one after another.

Arguments

ArgumentTypeDescription
numberString!
pinString

Returns

Money

FieldTypeDescription
centAmountInt!
currencyCurrency!

Example

query GiftCardBalance($number: String!, $pin: String) {
giftCardBalance(number: $number, pin: $pin) {
centAmount
currency
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved

Used by

The storefront packages that send it, in these GraphQL documents: