Demystifying Accelerators, DXC, and Pre-Composed Solutions
Join discussion
2022-10-19 5:00 pm
arrow pointing left
go to blog
Promo strategies
How to Create a Digital Referral Program with API?
Share it on Twitter
Share it on Facebook
Share it on LinkedIn
Share it on Twitter
Share it on Facebook
Share it on LinkedIn

How to Create a Digital Referral Program with API?

According to research, such as the one done by the guys at Hinge described in their fantastic book “Inside the Buyer’s Brain,” it quickly becomes apparent that referrals deserve more of your attention. To quote:

“We wanted to understand how buyers go about searching for the help they need. Where do they look when they want to find a new firm? In our research, we heard the same response again and again: More than 70% of buyers ask a friend or colleague for a recommendation.” 

Alongside SEO and SEM, referral marketing is classified as the most powerful channel to connect with new audiences. Through referral activities, you get to proactively seek high-value customers with the help of people they trust – their family and friends who already fell for your brand. What is even better is that referred customers usually have higher NPS and LTV scores, making them an invaluable asset in your marketing game. 

Here are some other numbers that will make you want to launch a digital referral program. It is estimated that referred customers:

  • are 18% less likely to churn,
  • tend to be 25% more profitable,
  • generate 25% higher LTV.

If that’s not enough, you don’t need to search far and wide to find examples of successful digital referral campaigns – top companies, such as Airbnb or Uber, run them all the time.



All in all, the message is clear and universal for businesses of all shapes and sizes – referral marketing is one of the most effective marketing techniques. If you’re not running a digital referral campaign right now, I urge you to run some referral experiments right away. 

In this post, I’ll show you how to achieve great referrals; you’ll see how a simple online referral program can be introduced into your environment without overburdening your developers, thanks to an API-first approach to referral program implementation.

Disclaimer: Throughout this post, I will be reviewing our own product (Voucherify), as well as its latest digital referral program features.

What is an API?

API stands for Application Programming Interface. It is a piece of code that allows two systems to communicate with each other in a clear and understandable way. With the use of API, companies can merge different platforms together by combining their functionalities. With API, you can quickly spin off a referral PoC without large upfront development costs and effort. For instance, the use of API allows you to send referral codes through popular social media platforms such as Facebook, WhatsApp, or Twitter. 

How to implement an API-based referral program?

A basic digital referral campaign you might want to start with could be a simple formula, such as: “Recommend two friends and you both get 25% off the next purchase.”

To do this, you need to put a referral mechanism in place that will help you identify customers who bring in new customers – the referrers – as well as those new customers that the Referrers brought in – the referees. Then, once you have this information, your referral system needs to provide both groups with 25% discount vouchers.

For this workflow to be effective, you will need individual online referral codes for your existing customers. You should send these codes to customers so they can share them with family and friends, who will then enter the referral codes upon making a purchase. As soon as you receive an order made with one of the digital referral codes, you will be able to catch the referral and reward both the referrer and the referee as planned (with a 25% discount voucher).

At this point you may face a dilemma – you’re most likely already running an environment that covers your e-commerce, CRM, and marketing channels – and you’d like to have digital referrals integrated into it. But on the other hand, it’s hard to justify putting too much development effort into what is basically just an experiment, and this one sounds like it could easily get tricky during development due to multiple integration points.

Thankfully, you can skip the headache using Voucherify API. It does not only provide you with an easy way to run online referral experiments but also to do this in a way that is already integrated into your environment, without any heavy lifting on the side of development. 

How to set up a digital referral program with Voucherify UI?

To start, Voucherify comes with a nice web GUI that you can use to set up a referral campaign. Once you go into Campaigns and add a new referral program, you can specify the details in just a few steps. 

Decide if you want to run a single- or double-sided digital referral program and whether referrers should be rewarded for each referral or other custom behavior, e.g., referee leaving a positive review online or signing up for your services. 

Referral program Voucherify dashboard

Next, define how to reward both parties. You can choose from the many types of incentives, such as vouchers, coupons, or gift cards. For the sake of this example, we’ll choose a simple 25% discount voucher. If you’re interested in running a more advanced digital referral program, you can add tiers to referrals to make your program more gamified. 

Referee rewards screen

Next, you are given the option to specify under what circumstances your referees will be rewarded. For instance, you may want to reward only new customers who place an order for $100 or more – a very handy option if you plan on devising a more nuanced digital program and at the same time protect your margins better. 

Finally, you are given the chance to introduce similar limitations on rewards granted to referrers. You can specify to which customer segment (newly created or previously configured) you’d like to send referral codes – and what type of rewards the referrers will receive in return for their successful referrals. In our example, we chose to send the 25% discount voucher to everyone who has attracted at least two new customers.

To learn how to build a referral program step-by-step, watch the webinar below:

How to set up a referral program with Voucherify API?

At this point, you are ready to run your online referral campaign. To do this, you’ll need three things. 

Firstly, you’ll need to ensure that customer data is present in Voucherify; so that it knows who to distribute the codes to. You can import customer data on your own, using a bog-standard CSV file. Any CRM you are working with can export a list for you in this format which means getting your hands on the data should be hassle-free. The only thing you’ll need to make sure of is that the data contains everything that Voucherify needs to work with. This is easily achievable with the use of Excel, especially as everything you need to do is carefully described in Voucherify docs.

If you have more development time for this, there’s also a convenient API that you can use to reflect your customer data in Voucherify and keep it consistent with your CRM. This approach has the benefit of scale and pays off quickly when you start working with more digital referral experiments, keeping your total referral experiment costs low.

Having migrated the customer data, you’ll need to put something into place that will validate the codes upon checkout – a way for your customers to enter a referral code, and then a bit of code that will pass that code on to Voucherify.

Voucherify makes this much easier than it seems, it’s designed for plug-and-play. For a web-based checkout, it provides a ready-made widget that your developers can embed in no time that will handle all the necessary input and backend interaction and send back a signal when a code is validated. For other channels, there is a well-documented API your developers can work with that makes it just as simple.

This, again, will only have to be done once. All digital referral campaigns that you will run afterward can reuse the integration that your developers put into place at this point.

Finally, you’ll need to send out the referral codes. This is specific to the channels that you work with. Voucherify provides a good API for generating codes and sending them out, e.g., using Braze. Some coding will be necessary here, but once again, we’ve made sure to keep it brief – and, as usual, once you have referral publishing API infrastructure in place, you can reuse it later.

And that’s it! All that’s left to do is sit back, relax, munch on some popcorn, and await the results.

Analyze how your referral program performs

Ok, so the online referral codes are out. Now you’ll want to know if people are actually using them as well as how many new customers the program is bringing in.

If you fancy carrying out a quick experiment like the one in our example, Voucherify got you covered. In addition to the mechanism for collecting digital referrals, it also provides you with a dashboard that you can use to visualize and analyze them.  All you need to do is select your referral campaign and check out the redemption history. This will give you a comprehensive view of all customers that have used your referral codes as well as transaction details.

If you’re looking for a speedy means to check if your referral program is gaining traction, there’s no need to look any further. Still, should you wish to analyze the data in more detail, you can always make use of the built-in data export functionality which presents you with all the campaign history data and can be used either in Excel or your BI environment.

Once you take a closer look at the data, you may find that not all of your referral sources are equal. Regardless of your target group, it is not impossible, or even uncommon, to find sources of poor-quality referrals. For example, some users may repeatedly bring in new customers who make low-value purchases just to get a discount voucher.

Clearly, this kind of behavior can significantly harm the efficiency of your digital referral program but don’t despair! You’re armed with a weapon with which you can fight back.

With Voucherify, you can protect your campaign by blocking customers that you suspect are trying to exploit it. All you need to do is invalidate their referral codes. I’m sure you’ll agree that it doesn’t get any simpler than that.

Here are some other ways of keeping your referral program safe. 


In this post, we’ve shown you how to run a basic experiment for a digital referral campaign. Voucherify API will make it easy for you to run it as a one-off occurrence. But its true power lies in running multiple campaigns in sync across other departments and business environments.

The key to unlocking this power is the integration of our referral API with your existing environment of CRM, distribution tools, and more. This is especially important when you are already running a tailored environment that allows you to experiment with marketing campaigns and scale them quickly and cheaply.

About Voucherify referral API

Voucherify is designed with an API-first mindset, exactly for the purpose of lightweight and seamless integration into such environments. This guarantees that not only will you find it helpful, but also the developers on your team will appreciate the time savings, and those savings will quickly start accumulating into a much lower total cost of running and maintaining digital referral campaigns.

Voucherify is not just a tool for fantastic digital referral campaigns. It can easily handle coupons, gift cards, loyalty programs, and cart promotions. And, most importantly, it will give you low-level API-first access to everything it supports, so that you can integrate any promotional campaign into any kind of software environment and support any marketing scenario. 


Run amazing digital referral programs with Voucherify

Get started


Share it on Twitter
Share it on Facebook
Share it on LinkedIn

Are you wasting time and money on digital promotions?

It’s time for a change.