giftCardBalance
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
| Argument | Type | Description |
|---|---|---|
number | String! | |
pin | String |
Returns
| Field | Type | Description |
|---|---|---|
centAmount | Int! | |
currency | Currency! |
Example
query GiftCardBalance($number: String!, $pin: String) { giftCardBalance(number: $number, pin: $pin) { centAmount currency }}{ "number": "Example", "pin": "Example"}{ "data": { "giftCardBalance": { "centAmount": 1, "currency": "EUR" } }}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/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-cart:
GetGiftCardBalance

