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. For now following 3 events are supported. 

  • "new_signup"
  • "new_referral"
  • "new_specific_action_referral"

"data" includes corresponding data for each event.

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

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


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

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


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

{                                       
    "event": "new_specific_action_referral",
    "data":    
        {
            "email": "testspecificactionreferral@irefer.io",
            "name": "Jack Roe",
            "ip": "73.114.18.205",
            "referrer_email": "testsignup@irefer.io",
            "specific_action": "\/order-received\/"
        }
}                                       

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

Did this answer your question?