Skip to main content

The GiftCardConfiguration object now includes default gift card expiration

You can now query a merchant's default gift card expiration settings using the GraphQL Admin API.

The new expirationConfiguration field on the GiftCardConfiguration object returns the merchant's configured expiration settings, including the duration value and time unit (days, months, or years). When merchants have automatic gift card expiration enabled, you can use these settings to calculate the expiresOn date for new gift cards.

How it works

  • The expirationConfiguration field returns either:
    • a GiftCardExpirationConfiguration object when the merchant has configured a default gift card expiration
    • null when the merchant has gift cards set never to expire
  • The GiftCardExpirationConfiguration object includes:

Example query

query {
  giftCardConfiguration {
    expirationConfiguration {
      expirationValue
      expirationUnit
    }
  }
}
Was this section helpful?