Redeem Voucher (client-side) [Deprecated]

❗️

Deprecated

This endpoint represents the deprecated version of the API responsible for voucher redemption, and we do not recommend using it. The new Stackable Discounts API introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.

To redeem a voucher, you need to create a redemption object. It increments the redemption counter and updates the history of the voucher. This method is accessible through public keys, which you can use in client-side apps (mobile and web browser apps).

The client-side redemption works similar to the server-side voucher redemption endpoint. The difference lies in the authorization. For the client-side, you can use client-side keys.

📘

Opt-in

By default this feature is disabled. If you want to use it, you will need to enable the function explicitly in Project Settings.

❗️

Security Threat

Be careful if you want to include the voucher redemption functionality directly on your client side (website or mobile app). In this configuration, there is a chance that discounts can be modified before being sent to the server.

Expand Response

You may expand the response by adding the following object to your request body. The expanded response will include the category details of the voucher.

{
    "options": {
        "expand": [
            "category"
        ]
    }
}
Language
Authorization
URL
Click Try It! to start a request and see the response here!