Skip to Content
Help CenterManaging a ProgramGetting startedOffering dual-sided incentives
💡

This feature is only available on Business plans and above .

With Revroute Partners , you can create dual-sided incentives for your affiliate/referral programs, which give special discounts to customers who sign up via a referral link.

Some examples include:

  • 25% discount for the first 12 months
  • 30% lifetime discount
  • 5000 RUB one-off discount

This can drive powerful word-of-mouth growth as partners are more likely to share their link if it gives their audience/user base additional discounts, and on the other hand, their users are more likely to click on their links as well if they’re getting a special deal.

In this article, we’ll learn how to set up dual-sided incentives with Revroute Partners.

📝

To offer dual-sided incentives you need a billing system on your side that supports coupons or promo codes. Revroute stores the coupon identifier generated/registered in your billing system and surfaces it to your checkout flow — your application is responsible for applying that coupon at payment time.

This option ties the discount to the partner referral link itself. The customer doesn’t need to enter any code — your checkout automatically applies the right coupon based on which partner brought them in.

📝

Link-based discounts provide better attribution accuracy since you get visibility into the customer’s geolocation, device info, referrer details, and UTM data.

The trade-off here is that it requires some engineering work to set up.

Create a discount on Revroute

First, navigate to the partner group that you want to create a discount for. Under the Discount tab, you’ll be able to create a discount for the group

Group discounts page

If you already have a discount set up for your default group, you can just duplicate it. If not, click Create to create your first group discount:

Program discounts tab

New coupon

If you don’t have a coupon set up in your billing system yet, you can use the New coupon option to create one based on the discount type (percentage vs flat), amount, and duration set in Revroute.

Use existing coupon ID

If you already have an existing coupon in your billing system, you can enter its ID (typically an 8-character alphanumeric code) under the Use existing coupon ID option.

⚠️

Most billing systems don’t support updating coupons after creation, so you’d need to delete your discount in Revroute and create a new one if you want to update any of the discount parameters.

Note: Deleting a discount on Revroute does not delete the corresponding coupon in your billing system.

Add coupon logic to checkout flow

The key to implementing link-based discounts is to check if a customer is eligible for a discount using Revroute’s Customers API, then automatically apply the appropriate coupon to their checkout session.

Here’s how the flow works:

  1. When a user clicks a partner referral link, Revroute tracks them as a potential customer
  2. During checkout, you query the Revroute Customers API using the user’s ID
  3. If they’re eligible for a discount, you apply the coupon to their checkout session in your billing system
  4. If not, you allow them to enter promotion codes manually

The example below illustrates the logic using a generic billing-system client. Replace billing.checkout.create(...) with the equivalent call in your own billing system.

import { dub } from "@/lib/dub.ts"; import { billing } from "@/lib/billing.ts"; // your billing-system client // Get customer discount eligibility from Revroute const customers = await dub.customers.list({ externalId: userId, // their user ID within your app includeExpandedFields: true, }); const customerDiscount = customers.length > 0 ? customers[0].discount : null; // Create checkout session with conditional discount const session = await billing.checkout.create({ successUrl: "https://app.domain.com/upgraded", cancelUrl: "https://app.domain.com/pricing", lineItems: [ { priceId: "price_xxx", quantity: 1, }, ], mode: "subscription", // or "payment" for one-time purchases ...(customerDiscount ? { // Apply discount automatically if customer is eligible couponId: process.env.NODE_ENV !== "production" && customerDiscount.couponTestId ? customerDiscount.couponTestId : customerDiscount.couponId, } : { // Allow manual promo code entry if no automatic discount allowPromotionCodes: true, }), customerEmail: userEmail, metadata: { userId, ...(customerDiscount && { dubDiscountId: customerDiscount.id }), }, });

Once this is set up, eligible customers will automatically see the coupon code applied at checkout.

Option 2: Using promo codes (no code required)

If you prefer a no-code solution, you can set up promo-code-based discounts for your partners.

📝

Promo-code-based discounts are much easier to set up (no code required).

However, you do sacrifice on attribution accuracy since you won’t have any insights into the customer’s geolocation, device info, referrer details, and UTM data. Revroute will try to derive the customer’s location based on the billing address from your billing system, but it can sometimes be inaccurate.

Create a discount on Revroute

First, navigate to the partner group that you want to create a discount for. Under the Discount tab, you’ll be able to create a discount for the group

Group discounts page

If you already have a discount set up for your default group, you can just duplicate it. If not, click Create to create your first group discount:

Program discounts tab

New coupon

If you don’t have a coupon set up in your billing system yet, you can use the New coupon option to create one based on the discount type (percentage vs flat), amount, and duration set in Revroute.

Use existing coupon ID

If you already have an existing coupon in your billing system, you can enter its ID (typically an 8-character alphanumeric code) under the Use existing coupon ID option.

⚠️

Most billing systems don’t support updating coupons after creation, so you’d need to delete your discount in Revroute and create a new one if you want to update any of the discount parameters.

Note: Deleting a discount on Revroute does not delete the corresponding coupon in your billing system.

Auto-provision discount codes

When enabled, discount codes will be automatically created for all existing partners in this group and future partners when they join this group.

Auto provision discount codes

Create your partner code

Open the partner profile that you’d like to create a discount code for, then click Create Code in the “Discount codes” section.

Partner links page

Here you can select which referral link you’d like to associate the code with. Then you can create the discount code.

Partner links page

⚠️

Discount codes cannot be edited after creation, so ensure that you have everything correct before creating the code

After the code has been created, you’ll see its value populated in the Discount Code section, and it is ready for use. In the Partner Dashboard, they’ll also see the associated discount code within their partner links.

Partner links page with discount code

Displaying discount banner

Once you’ve set up dual-sided incentives, a potential next step would be to display the discount information on your pricing page / landing page hero.

To do that, all you need is to install the Revroute Analytics script with client-side click-tracking enabled – then, when someone lands on your site via a valid referral link, the script will automatically fetch the partner and discount data for you.

Last updated on