Payment Links APIs

Create, update, cancel and fetch Payment Links and resend notifications using Payment Links APIs.


Payment Links help you to receive payments from customers by sending them links via email and SMS. Use our APIs to create Payment Links. You can enter details such as amount, link expiry time, and more and send the link to the customer via email or SMS. The customer can select their desired payment method and complete the payment. Once the customer makes the payment, you will receive the amount in your bank account according to your settlement cycle.

There are two types of Payment Links:

  • Standard Payment Links: You can make payments using netbanking, cards, wallets, UPI and bank transfer payment methods using Standard Payment Links.

  • UPI Payment Links: You can select the UPI app of your choice to make payments using UPI Payment Links.

Handy Tips

This documentation applies to the new APIs, which were launched on 1 Sep 2020. If you have gone live after December 2020, you will, by default, be on the new version. If you have the old version of APIs:

  1. Log in to the .
  2. Click on Payment Links.
  3. Click on Documentation to access the Legacy API documentation.

Check your Dashboard to see which API version you should integrate.

  • If the New API tag is shown on Dashboard, you are integrated with our New API Contracts. The screenshot below shows the New API tag on the Dashboard. Click on Documentation to know more about the New API Contracts.

  • If no tag is shown, you are integrated with our Legacy API Contracts. The screenshot below shows the absence of the tag on the Dashboard. Click on Documentation to know more about the Legacy API Contracts.

The table below lists the applicable features for New and Legacy contracts.

You can create, update, cancel, fetch, and resend payment links using APIs. Check the

for endpoints, sample codes, and parameter descriptions.

Upon successful payment, customers can be directed to a designated URL through the callback_url and callback_method parameters.

For example, you can redirect customers to https://example-callback-url.com/.

razorpay_payment_id

Payment ID of the successful payment.

razorpay_payment_link_id

Payment Link ID generated at the time of link creation.

razorpay_payment_link_reference_id

Internal order ID set by you for business reference using the reference_id parameter at the time of link creation. No value is returned if reference_id parameter was not used.

razorpay_payment_link_status

Current status of the link.

razorpay_signature

Signature for server-side validation to be calculated as HMAC hex digest using SHA256 algorithm. This is described below with a sample code.

The query parameters are added to the URL as shown:

https://example-callback-url.com/?razorpay_payment_id=pay_Fc8mUeDrEKf08Y&razorpay_payment_link_id=plink_Fc8lXILABzQL7M&
razorpay_payment_link_reference_id=TSsd1989&
razorpay_payment_link_status=partially_paid&razorpay_signature=b0ea302006d9c3da504510c9be482a647d5196b265f5a82aeb272888dcbee70e

You can verify the razorpay_signature parameter to validate that it is authentic and sent from Razorpay servers.

  • The razorpay_payment_link_id​ attribute should be stored in your system against an order, right after it is returned in the create response. This is displayed as just id (for example, "id": "plink_FKeEiabyAAiSVQ") in the response.
  • The razorpay_signature should be validated by your server. In order to verify the signature, you need to create a signature using
    • razorpay_payment_link_id
    • razorpay_payment_link_reference_id
    • razorpay_payment_link_status
    • razorpay_payment_id​ as payload and your key_secret​ (your API secret) as secret.

After validating the signature, you should fetch the order in your system corresponding to the razorpay_payment_link_id​ and mark this order as successful.


Was this page helpful?


payment link api
create payment link api
api for payment links
manage payment links