Webhooks overview

Along with iRefer APIs to directly interact with iRefer, we also support Webhooks so that we can notify you on certain iRefer events. You will be able to setup your endpoints to be called when certain iRefer events.

Whenever those iRefer events happen, we will call your webhook endpoint with the event details. Event details are sent via HTML POST request along with JSON data structure. This data structure includes event name and corresponding event data.

{                                       
    "event": "event_name",
    "data":  event_json_data
}  


"event" includes event name. Following events are supported. 

  • "new_signup"
  • "new_friend_invite"
  • "new_lead"
  • "new_referral"
  • "new_reward"

"data" includes corresponding data for each event.

Following is a sample JSON data structure for "new_signup" event. 

{                                       
    "event": "new_signup",
    "data":    
        {
            "campaign_id": "23456",
            "email": "testsignup@irefer.io",
            "name": "Peter Joe",
            "ip": "73.114.18.205"
        }
}                                       

 

Following is a sample JSON data structure for "new_friend_invite" event. 

{                                       
  "event": "new_friend_invite",
    "data":    
        {
            "campaign_id": "23456",
          "customer_email": "testcustome@irefer.io",
          "friend_email": "testsignup@irefer.io",
          "friend_name": "Peter Joe"
        }
}                                       

 

Following is a sample JSON data structure for "new_referral" event. 

{                                       
    "event": "new_referral",
    "data":    
        {
            "campaign_id": "23456",
            "email": "testreferral@irefer.io",
            "name": "Peter Joe",
            "ip": "73.114.18.205"
            "referrer_email": "testsignup@irefer.io",
            "specific_action": ""
        }
}                                       


Following is a sample JSON data structure for "new_referral" event on a specific action.

{                                       
    "event": "new_referral",
    "data":    
        {
            "campaign_id": "23456",
            "email": "testspecificactionreferral@irefer.io",
            "name": "Jack Roe",
            "ip": "73.114.18.205",
            "referrer_email": "testsignup@irefer.io",
          "specific_action": "\/leadcapture"
        }
}                                       


Following is a sample JSON data structure for "new_reward" event for referrer. 

{                                       
    "event": "new_reward",
    "data":    
        {
            "campaign_id": "23456",
            "type": "referrer",
            "email": "testsignup@irefer.io",
            "name": "Peter Joe",
            "referrals_count": "3",
            "reward_heading": "Get $50 for referring 3 friends"
        }
}                                       


Following is a sample JSON data structure for "new_reward" event for referred person if you have double sided reward. 

{                                       
    "event": "new_reward",
    "data":    
        {
            "campaign_id": "23456",
            "type": "referred",
            "email": "testsignupreferred@irefer.io",
            "name": "Stefano Test",
            "referrals_count": "0",
            "reward_heading": "Get $50 for referring 3 friends"
        }
}                                       

 

To get started with setting up your webhooks or if you have any specific queries, please contact iRefer customer support. 


Did this help answer your question?

thumbs up
thumbs down

Thanks for the feedback! 🙏🏽