Skip to main content

Documentation Portal

ClientApplyLoyaltyVouchers (Global-e to Merchant)

Note

This API is part of Global-e's extensions and plug-ins. Merchants do not need to implement this API unless a custom integration is required.

Use this method to validate the Loyalty Vouchers selected by the user from the list that has been provided in the loyaltyVouchersList argument of the SendCart API call for the current user’s checkout page. This method can only be executed from within the context of the current user’s client session. Validates Loyalty Vouchers and applies them to the current user’s cart if all the vouchers in the list are valid and applicable.

  • If at least one Loyalty Voucher in the list is invalid, Merchant.ResponseInfo.Success is set to FALSE.

  • If all Loyalty Vouchers are valid, the Merchant’s server should re-calculate the cart pricing and execute before returning a response, the SendCart API call with the CartToken argument value returned from the previous call to SendCart for the current user.

Method/URL

https://www.merchant-site-domain.com/ClientApplyLoyaltyVouchers 
Parameters

Request

Name

Type

Description

Mandatory

cartAction

Object Merchant.CartAction

Delineates what action to perform with the cart data.

Yes

Response

Name

Type

Description

Mandatory

Merchant.ResponseInfo

Object Merchant.ResponseInfo

Describes the response to the API call. In case of an error, indicates the error.

Objects for ClientApplyLoyaltyVouchers API
Examples