Webhooks

  1. Session Check Validation - You will need to share a webhook to validate the session_id of the agents on your application. These will ensure that the transactions have happened during an authenticated session on your applications.

This will be initiated 2 times:

  • Your agent initiates an AePS request from your application
  • Before processing an AePS transaction
{
    "agent_emailid": "[email protected]",
    "agent_mob_no": "9967552388",
    "agent_name": "Namrata",
    "client_agent_id": "12119",
    "partner_id": "1008",
    "session_id": "YSKJSALLKSAKJ",
    "time": 0,
    "url": "",
    "product_id": "1",
    "product_name": "AEPS"
}
{
    "response_code": "0",
    "description": "Valid Session",
    "client_agent_id": "12119",
    "agent_name": "Namrata",
    "agent_mob_no": "9967552388",
    "agent_emailid": "[email protected]",
    "time": "0",
    "session_id": "YSKJSALLKSAKJ",
    "partner_id": 1008
}

🚧

Please ensure this is a highly available webhook so that the AePS solution is always available to your agents.

  1. Transaction Debit/Credit - You will need to share a webhook where AePS SDK will inform you about the transaction details after the transaction. You can use the information received in this webhook to:
  • Store transaction details in your server
  • Credit your merchant and give commission
{

    "partner_id": "1",

    "txn_id": "PNB20201023456",

    "agent_id": "1234",

    "agent_mob_no": "987678987",

    "session_id": "xcvYthgnj897ojhghnhh",

    "type_id": "2",

    "type_txn": "credit",

    "product_id": "1",

    "product_name": "aeps",

    "client_agent_id": "78987",

    "amount": "2800",

    "customer_info": {

        "customer_id": "15678",

        "customer_number": "8056789098",

        "customer_name": "Swamy"

    },

    "payment_data": {

        “txn_amount": "2800",

        "commission": "", 

        "tds": "",

        "net_commission”: “”

    },

    "payment_info": {

        "bank_id": "1",

        "bank_name": "State Bank of India",

        "aadhaar_number": "xxxxxxxx1234",

            }

}
{
    "response_code": "0",
    "description": "Success",
    "partner_id": 1008,
    "txn_id": "NA",
    "agent_id": "12119",
    "agent_mob_no": "9967552378",
    "session_id": "X45YNS8IMSU64OL",
    "type_id": "1",
    "type_txn": "debit",
    "product_id": "1",
    "product_name": "AEPS",
    "client_agent_id": "2",
    "amount": "100.00"
}

🚧

Please ensure that this is a highly available webhook so that you can store transaction details in your server.