Skip to main content

Documentation Portal

RefundGiftCard

Call RefundGiftCard to return the used gift card balance when the order is cancelled or a new Refund has been created.

Global‑e sends the list of all applied gift cards and the total amount to refund for gift cards in both currencies (customer currency and gift card currency), as well as the conversion rate. The Merchant’s platform determines the actual refund values to be refunded for each gift card and returns the respective values in the API response accordingly.

For each gift card, set the following in response:

  • GiftCardData.RefundedBalanceInGiftCardCurrency – must not exceed the provided value of GiftCardData.BalanceUsedInCardCurrency

  • GiftCardData.RefundedBalanceInCustomerCurrency – must not exceed the provided value of GiftCardData.BalanceUsedInCustomerCurrency

  • GiftCardData.IsRefundSuccess

    • Set to true: If the two previous values for the card and values are successfully refunded.

    • Set to false: If the refund was added but something went wrong.

If no refunds are added for the particular card, do not set these values.

Method/URL

https://www.merchant-site-domain.com/refund-gift-card-url
Parameters

Request

Requests can contain more parameters than listed.

Name

Type

Description

Mandatory

order

Object RefundGiftCardRequest

Contains information about the gift card refund.

Yes

Response

Note

Some response values are encoded and require the merchant to decode them, for example URLs, addresses, emails, and phone numbers.

Name

Type

Description

Mandatory

order

Object RefundGiftCardResponse

Contains information about the response to the API call for gift card refunds.

Yes

Objects for RefundGiftCard API
Examples

Request

{
    "MerchantGUID": " abcdabcd-abcd-abcd-abcd-abcdabcdabcd",
    "Cards": [{
            "CardId": 2290,
            "BalanceInGiftCardCurrency": 1000.000000,
            "BalanceInCustomerCurrency": 906.270000,
            "GiftCardCurrencyCode": "USD",
            "CustomerCurrencyCode": "EUR",
            "BalanceUsedInCardCurrency": 273.990000,
            "BalanceUsedInCustomerCurrency": 248.3100,
            "RedeemTransactionId": "TestSuccessRedeemTransaction",
            "CardFields": {
                "CardId": "card1000"
            }
        }
    ],
    "TotalToRefundInCustomerCurrency": 115.0,
    "TotalToRefundInGiftCardCurrency": 126.89,
    "ConversionRate": 0.906269,
    "OrderId": "GE927127"
}

Response

{
    "Cards": [{
            "CardId": 2290,
            "BalanceInGiftCardCurrency": 1000.000000,
            "BalanceInCustomerCurrency": 906.270000,
            "GiftCardCurrencyCode": "USD",
            "CustomerCurrencyCode": "EUR",
            "BalanceUsedInCardCurrency": 273.990000,
            "BalanceUsedInCustomerCurrency": 248.3100,
            "RedeemTransactionId": "TestSuccessRedeemTransaction",
            "CardFields": {
                "CardId": "card1000"
            },
            "RefundedBalanceInGiftCardCurrency": 126.89,
            "RefundedBalanceInCustomerCurrency": 115.0,
            "IsRefundSuccess": true
        }
    ],
    "TotalToRefundInCustomerCurrency": 115.0,
    "TotalToRefundInGiftCardCurrency": 126.89,
    "ConversionRate": 0.906269,
    "OrderId": "GE2991190US"
}