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

Quickstart

Get started with our comprehensive API libraries and start developing your Voucherify integration.

📘

Help and support

We offer a team of dedicated, high-skilled developers who have experience with both Voucherify and CRM tools to integrate Voucherify with your existing technology stack. Learn more.

Integrating Voucherify into your app or website can begin as soon as you create a Voucherify account. Then, only three more steps are required to start the integration:

  1. Get your API keys so Voucherify can authenticate your API requests.
  2. Install an SDK so you can interact with the Voucherify API.
  3. Make a test API request to confirm everything is up and running.

In the following tutorial, we will redeem one of the pre-defined test voucher codes that come with the free Sandbox project.

📘

Free 30-day trial

  • After creating an account, you have 30-day access to a free Sandbox project.
  • You can send up to 100 requests per hour using Sandbox API keys.
  • If you continue your subscription after the trial, the Sandbox project won't be included in your projects limit.

Get your API keys

Voucherify authenticates your requests with API keys you can find in the Project Settings. Every Voucherify project has two keys pairs with different access levels that serve different integration architectures (application and client-side). Log into your account, go to the Project Settings and copy your Application Keys.

Install an SDK

We provide official libraries for different programming languages and mobile platforms.

Make a test API request

To check if your integration works correctly, make a test redemption request using your Sandbox keys copied from the Project Settings.

📘

Test data

Every Sandbox is populated with a set of test vouchers.

Call the redemption endpoint passing a voucher you want to redeem.

curl -X POST \
-H "X-App-Id: YOUR-API-KEY" \
-H "X-App-Token: YOUR-API-TOKEN" \
-H "Content-Type: application/json" \
-d '{}' "https://api.voucherify.io/v1/vouchers/voucherify.io-10-percent-off/redemption"
const voucherifyClient = require('voucherify')

const client = voucherifyClient({
    applicationId: 'YOUR-API-KEY',
    clientSecretKey: 'YOUR-API-TOKEN'
})

client.redemptions.redeem("voucherify.io-10-percent-off").then(console.log)
require_once('vendor/autoload.php');

use Voucherify\VoucherifyClient;
use Voucherify\ClientException;

$apiID  = "YOUR-API-KEY";
$apiKey = "YOUR-API-TOKEN";

$client = new VoucherifyClient($apiID, $apiKey);
$print_r($client->redemptions->redeem("voucherify.io-10-percent-off"));
require 'voucherify'

voucherify = Voucherify::Client.new({
  :applicationId => 'YOUR-API-KEY',
  :clientSecretKey => 'YOUR-API-TOKEN'
})

puts voucherify.redemptions.redeem('voucherify.io-10-percent-off')
import io.voucherify.client.VoucherifyClient;
import io.voucherify.client.model.redemption.RedeemVoucher;
import io.voucherify.client.model.redemption.response.RedeemVoucherResponse;

class QuickStartApp {
    public static void main(String[] args) {
        VoucherifyClient client = new VoucherifyClient.Builder()
                .setAppId("YOUR-API-KEY")
                .setClientSecretKey("YOUR-API-TOKEN")
                .build();

        RedeemVoucher redeemVoucher = RedeemVoucher.builder().build();
        RedeemVoucherResponse redeemVoucherResponse = client.redemptions().redeem("voucherify.io-10-percent-off", redeemVoucher);

        System.out.println("Redemption: " + redeemVoucherResponse);
    }
}
using System;
using Voucherify.DataModel;
using Voucherify.Core.Exceptions;
using System.Threading.Tasks;

public class Program {
    public static void Main() {
        var api = new Voucherify.Api(
           "YOUR-API-KEY",
           "YOUR-API-TOKEN"
           ).WithSSL();

       try
       {
           Voucherify.DataModel.Queries.RedemptionRedeem query = new Voucherify.DataModel.Queries.RedemptionRedeem();
           Voucherify.DataModel.Contexts.RedemptionRedeem context = new Voucherify.DataModel.Contexts.RedemptionRedeem();
           Voucherify.DataModel.Redemption redemption = await api.Redemptions.RedeemVoucher("voucherify.io-10-percent-off", query, context);
           
           Console.WriteLine("Redemption: {0}", redemption);
       }
       catch(Voucherify.Core.Exceptions.VoucherifyClientException exception) {
           Console.WriteLine("Exception: {0}", exception);
       }
    }
}

Voucherify will reply with the redemption and voucher details.

{
   "id":"r_c9PaWW40Nhq8s2f9YbYvWqaL",
   "object":"redemption",
   "date":"2018-07-17T13:08:30Z",
   "customer_id":null,
   "tracking_id":"(tracking_id not set)",
   "result":"SUCCESS",
   "voucher":{
      "code":"voucherify.io-10-percent-off",
      "campaign":null,
      "category":"sandbox",
      "type":"DISCOUNT_VOUCHER",
      "discount":{
         "type":"PERCENT",
         "percent_off":10.0
      },
      "gift":null,
      "start_date":null,
      "expiration_date":null,
      "validity_timeframe":null,
      "publish":{
         "object":"list",
         "count":0,
         "url":"/v1/vouchers/voucherify.io-10-percent-off/publications?page=1&limit=10"
      },
      "redemption":{
         "object":"list",
         "quantity":null,
         "redeemed_quantity":1,
         "url":"/v1/vouchers/voucherify.io-10-percent-off/redemptions?page=1&limit=10"
      },
      "active":true,
      "additional_info":null,
      "metadata":null,
      "assets":{
         "qr":{
            "id":"U2FsdGVkX1+p1AE6wbSzAiurW+csDQS3y6NQJcAxxThFNw9z9yK7NY7TTA8bPmRvYFWJBMlxv6aX4QoCckkuK0srOF8RXPBe2NzNxJAkbdRxJxNon9y9PZeMLyHQ+jVhmnnwlEcrA3QJJHEk1WNa3fPuZxmDDdPcy1Nxh3HaHy5ZMPIdf+sD6HlqIpbijmF5",
            "url":"[https://dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2Bp1AE6wbSzAiurW%2BcsDQS3y6NQJcAxxThFNw9z9yK7NY7TTA8bPmRvYFWJBMlxv6aX4QoCckkuK0srOF8RXPBe2NzNxJAkbdRxJxNon9y9PZeMLyHQ%2BjVhmnnwlEcrA3QJJHEk1WNa3fPuZxmDDdPcy1Nxh3HaHy5ZMPIdf%2BsD6HlqIpbijmF5"
         },
         "barcode":{
            "id":"U2FsdGVkX18vb3FOlGCLTUsqnSgaorD1tMjLewTDnjDFUbDH1gxlXykrlaJZulrLaUOOHaE+JY6ulQ4PwFkr7U7fQrdcVHpfgDa+Xzi3nbspZw+V56i4PpvJ1KSURUDGqc5Ykta5Ai4G45HV7xlrzxIbiX75Aq8BDjbXnHr488X7Veavcc+vkukKFE2CNrsS",
            "url":"https://dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX18vb3FOlGCLTUsqnSgaorD1tMjLewTDnjDFUbDH1gxlXykrlaJZulrLaUOOHaE%2BJY6ulQ4PwFkr7U7fQrdcVHpfgDa%2BXzi3nbspZw%2BV56i4PpvJ1KSURUDGqc5Ykta5Ai4G45HV7xlrzxIbiX75Aq8BDjbXnHr488X7Veavcc%2BvkukKFE2CNrsS"
         }
      },
      "is_referral_code":false,
      "updated_at":"2018-07-17T13:08:30Z",
      "object":"voucher](https://dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2Bp1AE6wbSzAiurW%2BcsDQS3y6NQJcAxxThFNw9z9yK7NY7TTA8bPmRvYFWJBMlxv6aX4QoCckkuK0srOF8RXPBe2NzNxJAkbdRxJxNon9y9PZeMLyHQ%2BjVhmnnwlEcrA3QJJHEk1WNa3fPuZxmDDdPcy1Nxh3HaHy5ZMPIdf%2BsD6HlqIpbijmF5%22%7D,%22barcode%22:%7B%22id%22:%22U2FsdGVkX18vb3FOlGCLTUsqnSgaorD1tMjLewTDnjDFUbDH1gxlXykrlaJZulrLaUOOHaE+JY6ulQ4PwFkr7U7fQrdcVHpfgDa+Xzi3nbspZw+V56i4PpvJ1KSURUDGqc5Ykta5Ai4G45HV7xlrzxIbiX75Aq8BDjbXnHr488X7Veavcc+vkukKFE2CNrsS%22,%22url%22:%22https://dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX18vb3FOlGCLTUsqnSgaorD1tMjLewTDnjDFUbDH1gxlXykrlaJZulrLaUOOHaE%2BJY6ulQ4PwFkr7U7fQrdcVHpfgDa%2BXzi3nbspZw%2BV56i4PpvJ1KSURUDGqc5Ykta5Ai4G45HV7xlrzxIbiX75Aq8BDjbXnHr488X7Veavcc%2BvkukKFE2CNrsS%22%7D%7D,%22is_referral_code%22:false,%22updated_at%22:%222018-07-17T13:08:30Z%22,%22object%22:%22voucher)"
   }
}

Test e-store

You can also try out Voucherify capabilities by using a test ecommerce store already connected to your account. To access the store, log into your account and click on the Showcase icon.

Updated 3 days ago

Quickstart


Get started with our comprehensive API libraries and start developing your Voucherify integration.

Suggested Edits are limited on API Reference Pages

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