I am using razorpay payments pages and webhooks to calculate store the payment information to my own database. I see there are three fields that are being returned by it(the webhook), the payment amount, the fees, and the tax. From what I could gather from the documentation, the final settled amount that is received by the business owner is calculated as follows: payment amount - fees - tax. However when I try to make a test payment and make this calculation and check my settlements dashboard on razorpay, it doesn't add up. The amount - fees - tax != amount shown on razorpay dashboard
Can anyone help me with this? I am attaching an example payload below that razorpay webhook pushes.
Example payload from razorpay docs
{
"entity":"event",
"account_id":"acc_DLXfTGFm2PS7Cy",
"event":"payment.captured",
"contains":[
"payment"
],
"payload":{
"payment":{
"entity":{
"id":"pay_DORWaWz6UGwvRx",
"entity":"payment",
"amount":70000,
"currency":"INR",
"status":"captured",
"order_id":"order_DORWL4a5PvwmiR",
"invoice_id":null,
"international":false,
"method":"upi",
"amount_refunded":0,
"refund_status":null,
"captured":true,
"description":null,
"card_id":null,
"bank":null,
"wallet":null,
"vpa":"sauravkumar@exampleupi",
"email":"[email protected]",
"contact":"+919998887776",
"notes":{
"participant_name":"Saurav Kumar",
"email":"[email protected]",
"phone":"9998887776"
},
"fee":1652,
"tax":252,
"error_code":null,
"error_description":null,
"created_at":1569853622
}
}
},
"created_at":1569853628
}