Skip to main content
The Global-e cartridges support purchasing gift cards as regular products and redeeming gift cards on the Global-e checkout. This page covers the custom (non-native) gift card flow; for SFCC native gift certificates, see Native Gift Certificates. The cartridges include the framework plus a demo implementation based on SFCC custom objects of type DEMO_GLOBALE_GIFT_CARDS. The demo is a working example only — replace it with your own provider before production. Do not import demo custom-object data from metadata/demo/ into production.
This is an optional feature. It requires both Business Manager configuration and project code. See Required customization.

Selling a gift card as a product

A gift card is sold like any other product. In Business Manager, create the product and enable the product custom attribute Is Globale Gift Card (geIsGiftCard) under the product attributes. The product can be a standalone SKU or a master with variants for different amounts. The shopper adds it to the basket and purchases it like any other product.

Redeeming a gift card on checkout

On the Global-e checkout, the shopper enters the card details and applies the card. The number of input fields (Card ID only, Card ID + PIN, and so on) is configured on the Global-e side per project. The redemption uses three Global-e requests handled on the SFCC side: After a card is applied, checkout totals show how much of the order is covered by the gift card.
  • If the card covers the full order total, the shopper can place the order without any additional payment.
  • If the card covers only part of the total, the shopper selects a payment method for the remainder.
Details of the cards used are added to the SendOrderToMerchant and PaymentNotification payloads.

Required customization

Purchase (create the gift card after payment)

To create gift cards when a card product is purchased through the Global-e checkout, implement the globale.onAfterPaymentUpdate hook in your project cartridge (or in int_globale_sfra / int_globale_sitegenesis, depending on your architecture). ./hooks.json
./cartridge/scripts/globale/hooks/onAfterPaymentUpdate.js

Redemption (provide a real card provider)

The demo implementation uses SFCC custom objects of type DEMO_GLOBALE_GIFT_CARDS. Override it with a provider that integrates your gift card system: int_globale/cartridge/scripts/globale/alternativePayments/providers/GiftCardProvider.js The strategy that drives validate/redeem/refund/create lives at int_globale/cartridge/models/globale/alternativePayments/GiftCardStrategy.js.

Summary

The demo (based on SFCC custom objects) is a minimal reference that shows the core moving parts of the gift card feature. Production projects supply their own provider and, where required, an onAfterPaymentUpdate handler. Never deploy the demo DEMO_GLOBALE_GIFT_CARDS provider or demo object data to production.

See also