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_idattribute 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_idand only mark this order successful. -
The
razorpay_signatureshould be validated by your backend. In order to verify the signature, you need to create a signature usingrazorpay_invoice_id,razorpay_invoice_receipt,razorpay_invoice_statusandrazorpay_payment_idas payload and yourkey_secret(your api secret) as secret. Of these,razorpay_invoice_receipt,razorpay_invoice_statusandrazorpay_payment_idare sent to your as callback query parameters as described above.
sample.py