Sale Prices and Discounts
This section outlines the steps necessary for implementing sale prices as part of the checkout process, covering both dynamic and fixed pricing scenarios.
Int64CalculationMode
One of the following possible values of CalculationModeOptions enumeration denoting the calculation mode of a discount to be implemented by GEM:
CalculationMode Option Value | Name | Description |
---|---|---|
1 (default) | Percentage discount | The discount value specified in Note: The discount value provided is not a percentage. It represents the discount amount in your domestic currency. The ratio of the discount amount to the domestic price is calculated in the shopper's currency. This same ratio is then applied and deducted in the shopper's currency. |
2 | Fixed in original currency | The discount value specified in OriginalDiscountValue denotes the fixed value in the merchant’s currency. When calculating the discount’s |
3 | Fixed in customer currency | The discount value specified in |
Dynamic Prices
To implement sale prices for countries for which Global-e converts the prices, you must pass as the sale price through the OriginalSalePrice
field in the getCheckoutCartInfo
response in your domestic currency.
Example:
"OriginalListPrice": 46,
"OriginalSalePrice": 25
Sample:
{ "productsList": [ { "ProductCode": "4296033", "ProductGroupCode": "697662", "CartItemId": "8426207451", "NameEnglish": "Name", "Name": " Name", "DescriptionEnglish": "Lorem ipsum dolor sit amet", "Description": " Lorem ipsum dolor sit amet", "URL": "https://domain/image.html", "GenericHSCode": "610443", "Brand": { "BrandCode": "661", "Name": "Brand" }, "ImageURL": "https://domain/images/image.jpg", "ImageWidth": 560, "ImageHeight": 840, "OriginalListPrice": 46, "OriginalSalePrice": 25, "OrderedQuantity": 1, "IsBlockedForGlobalE": false, "Weight": 6.64 } ] }
Fixed Prices
To implement sale prices that are fixed, you must pass the fixed prices in the SalePrice
, OriginalPrice
fields, and set isFIxedPrice
to true in the getCheckoutCartInfo
response in the local currency.
Example:
"IsFixedPrice": true,
"SalePrice": 120,
"ListPrice": 120,
The OriginaListPrice
and OriginalSalePrice
fields are ignored if they are passed.
Sample:
{ "productsList": [ { "ProductCode": "4296033", "ProductGroupCode": "697662", "CartItemId": "8426207451", "NameEnglish": "Name", "Name": " Name", "DescriptionEnglish": "Lorem ipsum dolor sit amet", "Description": " Lorem ipsum dolor sit amet", "URL": "https://domain/image.html", "GenericHSCode": "610443", "Brand": { "BrandCode": "661", "Name": "Brand" }, "ImageURL": "https://domain/images/image.jpg", "ImageWidth": 560, "ImageHeight": 840, "IsFixedPrice": true, "SalePrice": 120, "ListPrice": 120, "OriginalListPrice": 0, "OriginalSalePrice": 0, "OrderedQuantity": 1, "IsBlockedForGlobalE": false, "Weight": 6.64 } ] }
To implement a fixed price display outside of the checkout, see Fixed Prices Support.
Checkout Discount
Discounts are passed to the Global-e checkout via the getCheckoutCartInfo’s
discountsList object.
Product-level Discounts
To apply a discount to a product, assign the same value to the discountsList.ProductCartItemId
as for the productsList.CartItemId
{ "productsList": [ { "ProductCode": "SKU or product itentifier", "CartItemId": "lineID1", "NameEnglish": "Product name", "Name": "Product name", "DescriptionEnglish": "Product description", "Description": "Product description", "URL": "https:/domain/page.html", "ImageURL": "https://domain/image.jpg", "ImageWidth": 100, "ImageHeight": 100, "OriginalListPrice": 100, "OriginalSalePrice": 100, "OrderedQuantity": 2, "IsBlockedForGlobalE": false, "Weight": 11.4 } ], "discountsList": [ { "CalculationMode": 1, "Name": "Discount Name", "Description": "Discount description", "OriginalDiscountValue": 20, "CouponCode": "yourCouponCode", "DiscountCode": "yourDiscountCode", "DiscountType": 1, "ProductCartItemId": "lineID1" } ] }
Cart Level Discounts
Implement Cart-level discounts as you have done for product-level discounts but omit the ProductCartItemId
for it to be considered a cart-level discount.
For the different types of calculation modes, see ???.
{ "productsList": [ { "ProductCode": "SKU or product itentifier", "CartItemId": "lineID1", "NameEnglish": "Product name", "Name": "Product name", "DescriptionEnglish": "Product description", "Description": "Product description", "URL": "https:/domain/page.html", "ImageURL": "https://domain/image.jpg", "ImageWidth": 100, "ImageHeight": 100, "OriginalListPrice": 100, "OriginalSalePrice": 100, "OrderedQuantity": 2, "IsBlockedForGlobalE": false, "Weight": 11.4 } ], "discountsList": [ { "CalculationMode": 1, "Name": "Discount Name", "Description": "Discount description", "OriginalDiscountValue": 20, "CouponCode": "yourCouponCode", "DiscountCode": "yourDiscountCode", "DiscountType": 1 } ] }