Skip to main content
Available in🇮🇳 India

Creation

Two extra parameters need to be sent in the Create Payment Link/ Invoices API: callback_url​ string : URL hosted on your server where the user is redirected to after a successful payment. callback_method string : HTTP method for the callback request. Currently, only get is supported. These two would not be available in API response as of now and will be exposed later.

Callback parameters

The following query parameters are appended to the callback URL by Razorpay:

Signature Verification

  • The invoice_id​ attribute should have been stored in your system against an order, right after it was returned in the response to create payment link/invoices API request.
  • After validating the signature, you should fetch the order in your system corresponding to the razorpay_invoice_id​ and only mark this order successful.
  • The razorpay_signature should be validated by your backend. In order to verify the signature, you need to create a signature using razorpay_invoice_id, razorpay_invoice_receipt, razorpay_invoice_status and razorpay_payment_id​ as payload and your key_secret​ (your api secret) as secret. Of these, razorpay_invoice_receipt, razorpay_invoice_status ​and razorpay_payment_id​ ​are sent to your as callback query parameters as described above.
Pseudocode:
sample.py