Webhooks

You need to share the following webhook urls:

  • Check Balance - Enables PayNearby to show the agent's balance on the solution
  • Agent Balance/Quota Check - Enables you to check that the agent has the required balance for the transaction
  • Transaction Debit/Credit - Before the processing the transaction, all information would be shared in this webhook. This allows you to debit the agent and confirm that the transaction can be processed. Incase of any refund or failure, your balance would be credited back and all information about the credit will be shared in this webhook. This will enable you to also give credit back to your agents on your platform

📘

Webhook Format

  • The URL should should accept JSON request & should provide us a response, based on the request.
    • The response should be in JSON format only

1. Check Balance

This webhook will enable PayNearby to retrieve the agent balance and show it on the WL solution

Type of Request: POST

{
  "client_agent_id": "78976",
  "partner_id": "9021",
  "agent_mob_no": "9876678998",
  "session_id": "chnghd87ujgt67hg",
  "remarks": "Session Check",
  "url": "Partner Session Check URL",
  "product_id": "1",
  "product_name": "DMT"
}
{
  "client_agent_id": "78976",
  "partner_id": "9021",
  "session_id": "chnghd87ujgt67hg",
  "remarks": "Agent Balance Check",
  "balance": "17289.00",
  "response_code": "0",
  "description": "Success",
  "product_id": 1,
  "product_name": "DMT"
}

2. Agent Balance/Quota Check

This will enable you to check if the agent has the required balance for the transaction

Type of Request: POST

{
  "partner_id": "9011",
  "client_agent_id": "78976",
  "agent_mob_no": "9876678998",
  "session_id": "chnghd87ujgt67hg",
  "amount": "1450.00",
  "txn_id": "PNB2020101198,
  "product_id": "1",
  "product_name": "DMT",
  "url": "Quota Check URL of Partner"
}
{
  "response_code": "0"
  "description": "Success",
  "partner_id": "9011",
  "client_agent_id": "78976",
  "session_id": "chnghd87ujgt67hg",
  "amount": "17289.00",
  "txn_id": "PNB2020101198",
  "product_id": "1",
  "product_name": "DMT"
}

3. Transaction Debit/Credit

Before the processing the transaction, all information would be shared in this webhook

Incase of credit back to you, this webhook will be initiated. Based on the information in this webhook, you can give credit back to your agents for reversals or transaction failures

Type of Request: POST

{
    "partner_id": "9011",
    "txn_id": "PNB20201023456",
    "agent_id": "1234",
    "agent_mob_no": "987678987",
    "session_id": "xcvYthgnj897ojhghnhh",
    "type_id": "1",
    "type_txn": "debit",
    "product_id": "1",
    "product_name": "DMT",
    "client_agent_id": "78987",
    "amount": "2800",
    "customer_info": {},
    "payment_data": {},
    "payment_info": {}
}
{
    "response_code" : "0",
    "description" : "success",
    "partner_id": "9011",
    "txn_id": "PNB20201023456",
    "agent_id": "1234",
    "agent_mob_no": "987678987",
    "session_id": "xcvYthgnj897ojhghnhh",
    "type_id": "1",
    "type_txn": "debit",
    "product_id": "1",
    "product_name": "DMT",
    "client_agent_id": "78987",
    "amount": "2800"
}