Search code examples
djangopayment-gatewayopenedxrazorpay

Razorpay accessing callback URL using GET method instead of POST


I have implemented the Razorpay payment gateway to my platform according to the documentation. As per the documentation after successful payment, the gateway will try to access the URL using the POST method with the order payment information to process the order on the platform.

razorpay success page

This is the success page I am seeing after the payment as the account is in test mode. After clicking on the success it is redirecting the callback URL using GET method without any data, so I am not able to process the order at my end. According to the docs, it should access using POST method. Does anyone know in what case the gateway is accessing the callback URL with GET method ?


Solution

  • Well, the problem was with the Nginx redirecting from HTTP to https as the callback URL provided was in HTTP and thus Razorpay was accessing the API using the GET method.

    Simply change the HTTP callback URL to https if you are using https for your server.