> ## Documentation Index
> Fetch the complete documentation index at: https://docs.global-e.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Native Gift Certificates

The Global-e cartridges support **purchasing native SFCC gift certificates** and **redeeming them on the Global-e checkout**. Unlike the custom [Gift Cards](/gift-cards-sfcc) feature, this flow uses the platform's own `dw.order.GiftCertificate` objects, so redeemed certificates are created and tracked natively in SFCC.

<Note>
  This is an optional feature. It requires Business Manager configuration and project code. See [Required customization](#required-customization).
</Note>

## Purchasing a gift certificate

Native gift certificates are purchased through the standard SFCC gift certificate purchase flow (storefront gift-certificate page). The certificate appears on the cart as a normal line item.

## Redeeming a gift certificate on checkout

On the Global-e checkout, the shopper enters the certificate details and applies them. The number of input fields (Card ID only, Card ID + PIN, and so on) is configured on the Global-e side per project.

After a successful checkout, a gift certificate is created on the SFCC instance (**Merchant Tools → Ordering → Gift Certificates**).

The redemption uses the same three Global-e requests as other alternative payments, but with native gift-certificate semantics tracked in `redeemResponseJSON`:

| Request | When it is sent | What SFCC does |
| - | - | - |
| **Validate** | When the shopper applies the certificate | Checks that the certificate exists. Invalid certificates show an error; a valid balance is converted to the checkout currency and the totals refresh. |
| **Redeem** | After **Pay and Place Order**, when Global-e creates the order on its side | Marks the redemption as `PENDING` in `redeemResponseJSON`. The actual SFCC redemption happens on the subsequent Global-e **Payment Update** request and is then marked `REDEEMED`. |
| **Refund** | When a refund case is created on the Global-e side (for example the order is cancelled) | If the redemption was `PENDING`, it becomes `REFUNDED`. If it was already `REDEEMED`, a **new** SFCC gift certificate is created for the refund amount and the result becomes `REFUNDEDTONEW`. |

* If the certificate covers the full order total, the shopper can place the order with no additional payment.
* If it covers only part of the total, the shopper selects a payment method for the remainder.

Details of the certificates used are added to the **SendOrderToMerchant** and **PaymentNotification** payloads.

## Required customization

Native gift certificate behaviour is customized through dedicated Global-e hooks. Register the ones you need in your project cartridge `hooks.json`:

```json theme={null}
{
    "hooks": [
        { "name": "globale.onAfterGiftCertificateCreate", "script": "./cartridge/scripts/hooks/giftCertificate/onAfterGiftCertificateCreate.js" },
        { "name": "globale.onAfterGiftCertificateRedeem", "script": "./cartridge/scripts/hooks/giftCertificate/onAfterGiftCertificateRedeem.js" },
        { "name": "globale.onAfterGiftCertificateRefund", "script": "./cartridge/scripts/hooks/giftCertificate/onAfterGiftCertificateRefund.js" },
        { "name": "onAfterGiftCertificateOrderCreate", "script": "./cartridge/scripts/hooks/giftCertificate/onAfterGiftCertificateOrderCreate.js" }
    ]
}
```

<Note>
  **Note:** `onAfterGiftCertificateOrderCreate` (used for the OCAPI order-create flow) is registered **without** the `globale.` prefix, exactly as shown. The other three use the `globale.` namespace.
</Note>

The provider and strategy that back the native flow are:

* `int_globale/cartridge/scripts/globale/alternativePayments/providers/GiftCardNativeProvider.js`
* `int_globale/cartridge/models/globale/alternativePayments/GiftCardNativeStrategy.js`

See the [Hooks reference](/hooks-sfcc) for each hook's arguments and return values.

## See also

* [Gift Cards](/gift-cards-sfcc) · [Loyalty Points Cards](/loyalty-points-cards-sfcc)
* [Gift certificate hooks](/hooks-sfcc#globaleonaftergiftcertificaterefund)
