Gift Card Products: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Create a gift card product with promotional pricing

You can create a gift card product where the price a buyer pays is less than the balance loaded onto the gift card. This is useful for running promotions, such as selling a $50 gift card for $45.

To create a gift card product with promotional pricing:

  1. Call Create Gift Card Product. In the presetVariants array, set each variant's price and value fields separately. For example:

    Copy
  2. Optionally, set the expirationType and the corresponding expiration details. For a gift card that expires 1 year after purchase, set expirationType to RELATIVE and relativeExpirationDate to { "value": 1, "period": "YEARS" }.

Sync gift card products across multiple sites

If you manage multiple Wix sites, you may want to keep gift card products consistent across all of them. For example, if you update a product's denominations on one site, you can replicate the change on other sites.

To sync a gift card product across sites:

  1. Call Get Gift Card Product on the source site to retrieve the product you want to sync.
  2. Extract the giftCardProduct object from the response.
  3. For each target site, call Query Gift Card Products to check whether the product already exists by filtering on name.
  4. If the product exists on the target site, call Update Gift Card Product and pass the updated fields along with the target product's id and current revision.
  5. If the product doesn't exist on the target site, call Create Gift Card Product and pass the product details from the source site.
Did this help?