Referral Flow
Merchants have to first be registered as a customer of Payram payments.
Last updated
Merchants have to first be registered as a customer of Payram payments.
Last updated
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.
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:
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.
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.
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.
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.