PAYRAM
API SPECS
  • INTRODUCTION
    • 👋PAYRAM
    • 💡Getting Started
      • Setup
      • YAML Configuration
      • Wallet Configuration
      • Reset Setup
      • Update PayRam Server
      • Check your Database
      • Project API Keys
      • Webhook Integration
      • 🦊Test Wallet Setup
  • PAYMENT INTEGERATION
    • 📪Payments Flow
    • 🎌Integrating Payments
      • Implementing the Payment Form
      • Generating a Payment Link
      • Get Payment Details
      • Checking Payment Status
      • Webhook
  • REFERRAL INTEGRATION
    • 👬Referral Flow
    • Create New Campaign
      • Embed the Referral Dashboard
      • Link Referrers to Referees
      • Trigger Events
  • Fund Management
    • 🛠️Smart Consolidation
    • ⛽GAS Station
    • 👮‍♀️Policy Management
  • DEVELOPERS
    • 🎨API Reference
    • 🧪Test Faucets
  • SUPPORT
    • ⁉️FAQ
      • Deployment FAQ's
      • Configuration FAQ's
      • API Integration FAQ's
      • Fund Management FAQ's
      • Referral FAQ's
      • Debug FAQ's
    • 📅Change Log
Powered by GitBook
On this page
  1. REFERRAL INTEGRATION

Referral Flow

Merchants have to first be registered as a customer of Payram payments.

PreviousWebhookNextCreate New Campaign

Last updated 3 months ago

The referral program is an add-on feature that complements the core Payram payments functionality. Once registered, you receive your unique API key and access to the Payram Dashboard.

Prerequisites

  • A valid Payram API key.

  • Access to your backend server for handling authentication.

  • Basic familiarity with JavaScript, HTML, and API integration.


The merchant has to complete 3 important steps to enable referral system for their customers, you can find a diagrammatic overview of the steps below:

Step 0: Create a Campaign

Campaigns can be created via the Payram Dashboard by navigating to Growth → Campaigns → Create New Campaign. During campaign creation, you can configure various parameters such as budget, duration, success conditions, and rewards for both referrers and referees.

Note: An event_key must be generated during campaign creation. This key is essential for triggering rewards in the subsequent steps.

Step 1: Register Referrers / Open Dashboard

Create a page or button on your site that invites users to join or view the referral program. When clicked, the button should trigger an API endpoint that retrieves an iFrame URL from the Payram backend. The iFrame will then display active campaigns, referral codes, and accrued rewards.

Implementation Details:

  • The button should trigger an API call from your backend server, which in turn calls Payram’s authentication API. This API registers the referrer and returns a unique URL to load within the iFrame.

Step 2: Link Referees to Referrers

Once users obtain their referral code from the dashboard, they can share it with others. To link new sign-ups (referees) to their referrers, design a user interface where users can enter the referral code. Subsequently, call the Payram API to associate the new user with the corresponding referrer.

Step 3: Trigger Events

When a success event related to a campaign occurs on your website (e.g., a new user sign-up), you must notify Payram by making an API call using the previously generated event_key. This step ensures that the appropriate rewards are processed.

Next Steps:

  • First, lets see how we can set up a campaign using the Payram Dashboard and what are our restricitions.

  • We will also go through each of the steps above individually along with code snippets to complete the Referral system integration.

👬