The Voucherify Developer Hub

Welcome to the Voucherify developer hub. You'll find comprehensive guides and documentation to help you start working with Voucherify as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Redemption

Every time you want to accept a Voucherify promotion, irrespective of the type, you need to invoke the redeem method. This will do two things. Firstly, it checks if a customer profile and its current context (order structure, attributes) are eligible for a discount. Secondly, it stores a redemption object with details about successful or failed redemption trials. There are two things you can redeem, a voucher and promotion tier.

Object definition

Redemption is the key operation in the voucher lifecycle. A customer can redeem a voucher once or multiple times depending on the selected limit (quantity). Each redemption is recorded in the voucher history (redemption_entries). There is also an option to cancel a redemption (rollback).

📘

Object definition

Redemption object reference

Endpoints

Utilities:

Client-side Library & UI widget

To speed up client-side redeem integration, you can use the voucherify.js library. It allows for either invoking the method directly or using the web widget

`Voucherify.redeem("gfct5ZWI1nL", { order: { amount: 5000 } }, **function** callback (response) { })`

Client-side caution

In some cases, client-side redemptions might be considered insecure, that's why it's disabled by default. You can turn it on in the Project Settings.

Rollback

If you want to reverse this operation, use rollback.

Webhooks

Every redemption, successful or failed, generates an event you can listen to (redemption succeeded, redemption failed, redemption rollback succeeded, redemption rollback failed). Go to webhooks to learn more.

Updated 5 months ago

Redemption


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.