Webhooks

You need to share the following webhook urls:

  1. Agent Balance/Quota Check - Enables you to check that the agent has the required balance before the transaction is done
  2. Transaction Debit/Credit - Before the processing the transaction, all information would be shared in this webhook. Incase of any refund or failure, your balance would be credited back and all information about the credit will be shared in this webhook.

📘

How to utilize transaction debit/credit webhook?

  • Incase of debits, the information in webhook would allow you to debit your agent
  • Incase of credits, the information in webhook would allow you to give reversal credit to your agent
  • You can use the information to store in your system

Agent Balance/Quota Check

This webhook will enable PayNearby to check if the agent has the required balance before the transaction is done

{
  "partner_id": "1",
  "agent_mob_no": "9876678998",
  "session_id": "chnghd87ujgt67hg",
  "amount": "1450.00",
  "txn_id": "PNB2020101198,
  "product_id": "2",
  "product_name": "BBPS",
  "descripion": "Agent Quota Check"
}

The format for returning the response should have the following format:

{
  "response_code": 1,
  "response_description":"Agent has sufficient balance",
  "agent_mob_no": "9876678998",
  "amount": "1450.00",
  "txn_id": "PNB2020101198,
}
response_codedescription
1Agent has sufficient balance
2Insufficient balance
3Session id is invalid

Transaction Debit/Credit

{
    "partner_id": 9,
    "txn_id": "1374",
    "agent_id": "1028",
    "agent_mob_no": "9003029597",
    "session_id": "sessionId",
    "type_id": "1",
    "type_txn": "debit",
    "product_id": "2",
    "product_name": "BBPS",
    "amount": "445.00",
    "customer_info": {
        "customer_number": "7010126057",
        "customer_name": "KEELAPATTI SALIAR SAMUGAMKEELAPATTI SALIAR SAMUGAM"
    },
    "payment_data": {
        "txn_amount": "445.00",
        "commission": "",
        "tds": "",
        "net_commission": ""
    },
    "payment_info": {
        "transaction_type": "Debit",
        "biller_type": "",
        "biller_id": "BBPTNEB",
        "biller_name": "",
        "biller_number": "NA",
        "bill_period": "20190401"
    }
}
{
    "partner_id": 9,
    "txn_id": "1374",
    "agent_id": "1028",
    "agent_mob_no": "9003029597",
    "session_id": "sessionId",
    "type_id":"2",
    "type_txn": "credit",
    "product_id": "2",
    "product_name": "BBPS",
    "amount": "445.00"
    "customer_info": {
        "customer_number": "7010126057",
        "customer_name": "KEELAPATTI SALIAR SAMUGAMKEELAPATTI SALIAR SAMUGAM"
    },
    "payment_data": {
        "txn_amount": "445.00",
        "commission": "",
        "tds": "",
        "net_commission": ""
    },
    "payment_info": {
        "transaction_type": "Reversal",
        "biller_type": "",
        "biller_id": "",
        "biller_name": "",
        "biller_number": "",
        "bill_period": ""
    }
}

The format for returning the response should have the following format:

{
  "response_code": 1,
  "response_description":"Transaction Info Received",
  "agent_mob_no": "9876678998",
  "amount": "1450.00",
  "txn_id": "PNB2020101198,
}