Webhooks - adding benefits to referrals

Webhooks: Automatically Grant Benefits to Referred Customers

Webhooks in Reditus let you automatically grant benefits (discounts, extended trials, bonus features, credits, or priority onboarding) to referred users the moment a referral event happens. This turns your affiliate program into a powerful double-sided incentive: affiliates earn commissions, and referred customers receive an immediate, tangible benefit.

How It Works

  1. Reditus detects a referral event

Examples:

  • referral.created – a new user signs up via an affiliate link
  • referral.converted – a referred user becomes a paying customer
  • referral.upgraded / referral.downgraded – plan changes for a referred customer
  1. Reditus sends a webhook to your endpoint
  • HTTP POST request
  • JSON payload with referral and customer details
  • Signed so you can verify authenticity
  1. Your system processes the event
  • Validates the signature
  • Applies your benefit logic (discounts, extended trials, features, credits, onboarding flags)
  • Responds with HTTP 200 on success

Why Use Webhooks for Referral Benefits?

1. Increase Conversion Rates

Referred users convert better when they see an immediate benefit, such as:

  • 20% off the first 3 months
  • Extended 30-day trial instead of 14 days

This reduces friction and makes the decision feel like a special, time-bound opportunity.

2. Double-Sided Incentives

The best affiliate programs reward both sides:

  • Affiliate: earns commission
  • Referred customer: gets a discount, extended trial, or bonus features

Affiliates can then promote you as offering a real deal, not just another product.

3. Full Automation

Without webhooks, you’d need to:

  • Manually check which signups were referred
  • Apply discounts or trial changes in your billing system
  • Notify customers about their benefits

Webhooks automate this end-to-end so benefits are applied instantly and reliably.

Common Referral Benefit Flows

1. Extended Trial Period

Use case: Standard trial is 14 days; referred users get 30 days.

Flow:

  1. referral.created webhook received
  2. Your endpoint:
  • Looks up or creates the user in your database
  • Sets trial_end to 30 days from signup
  • Flags the account as referred = true

2. Discount on First Payments

Use case: 20% off the first 3 months for referred customers.

Flow:

  1. referral.converted webhook received when the user becomes paying
  2. Your endpoint:
  • Calls your billing provider (e.g., Stripe, Paddle) API
  • Applies a coupon or promotional code to the subscription
  • Stores the discount details on the customer record

3. Bonus Features or Credits

Use case: Temporary access to premium features or usage credits.

Flow:

  1. referral.created webhook received
  2. Your endpoint:
  • Grants a feature flag (e.g., premium_features_until = now + 30 days)
  • Or adds credits (e.g., credits += 1,000)
  • Triggers an email explaining what they received and for how long

4. Priority Onboarding

Use case: White-glove onboarding for referred customers.

Flow:

  1. referral.created webhook received
  2. Your endpoint:
  • Creates a task in your CRM or CS tool
  • Tags the account as priority_onboarding
  • Notifies your customer success team (Slack, email, etc.)

Implementation Steps in Reditus

Step 1: Define Your Benefit Rules

Decide what benefit to grant and when. Examples:

  • "All referred signups get a 30-day trial instead of 14 days."
  • "All referred customers get 20% off their first 3 invoices."
  • "Referred users get premium features for 30 days + 500 bonus credits."

Document:

  • Trigger event(s): referral.created, referral.converted, etc.
  • Conditions: specific plans, countries, affiliates, or campaigns
  • Exact benefit: discount %, duration, features, credits

Step 2: Create a Webhook Endpoint

Implement an HTTPS endpoint on your server, e.g. POST /webhooks/reditus that:

  • Accepts JSON
  • Sets Content-Type: application/json
  • Parses the request body as JSON
  • Validates the signature
  • Use the signing secret from Reditus
  • Recompute the signature from the raw payload
  • Compare with the header value (constant-time comparison)
  • Processes the event
  • Inspect event.type (e.g., referral.created)
  • Run the appropriate benefit logic
  • Responds with HTTP 200 on success
  • Return non-2xx only if you want Reditus to treat it as a failure

Step 3: Configure Webhooks in Reditus

In your Reditus dashboard:

  1. Go to Integrations / Webhooks
  2. Add your endpoint URL (e.g. https://yourapp.com/webhooks/reditus)
  3. Select the events you need, such as:
  • Referral created
  • Referral converted
  • Referral upgraded / Referral downgraded
  1. Copy the signing secret and store it securely (e.g., environment variable)

Step 4: Implement Benefit Logic in Your Handler

Ready to grow your SaaS?

  • Free Plan
  • Easy to use
  • No credit card required