ValidateGiftCard (Global-e to Merchant)
The ValidateGiftCard request sends the gift card data to the platform, gets the card amount, and makes sure that the card is valid.
ValidateGiftCard is called when the user fills out all gift card fields on the checkout page.
Method/URL
https://www.merchant-site-domain.com/validate-gift-card-url
Parameters
Request
Name | Type | Description | Mandatory |
|---|---|---|---|
ValidateGiftCardRequest | Object ValidateGiftCardRequest | Provides information related to validating the gift card. |
Response
Name | Type | Description | Mandatory |
|---|---|---|---|
ValidateGiftCardResponse | Object ValidateGiftCardResponse | Provides API call response info. |
Objects for ValidateGiftCard API
Examples
Request
{
"MerchantGUID": abcdabcd - abcd - abcd - abcd - abcdabcdabcd ",
" ShippingCountryCode ":" UA ",
" CardFields ":{" CardId ":" 111111 "},
" MerchantCartToken ":" 2c5c7b3db2ed101426cba38d9c534086 "
}Responses
For valid cards:
{
"IsValid": true,
"Balance": 1000,
"CurrencyCode": "GBP",
"IsGlobalEGiftCard": false,
"ErrorCode": null,
"ErrorText": null
}For invalid cards:
{
"IsValid": false,
"Balance": null,
"CurrencyCode": null,
"IsGlobalEGiftCard": false,
"ErrorCode": null,
"ErrorText": "Invalid Card"
}