Payment Links
Integrate with Payment Links API using partner auth.
Use Razorpay Payment Links to receive online payments from your customers. Create Payment Links from the
or using our APIs and share them with your customers. Customers open the links, select the payment method and make the payment.Given below is the sample code for Create a Payment Link API. You should send the account_id
of the sub-merchant using X-Razorpay-Account
in the header. Refer to the
Given below are the sample codes for Standard Payment Links. Pass the account_id
of the sub-merchant using X-Razorpay-Account
in the header.
Given below are the sample codes for UPI Payment Links. Pass the account_id
of the sub-merchant using X-Razorpay-Account
in the header.
amount
mandatory
integer
Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of ₹300.00, you must enter the value 30000
. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295.
Watch Out!
As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as 99990
and not 99991
.
currency
optional
string
A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of
Handy Tips
Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about
(May 2024).accept_partial
optional
boolean
Indicates whether customers can make
true
: Customer can make partial payments.false
: (default): Customer cannot make partial payments.
first_min_partial_amount
conditionally mandatory
integer
Minimum amount, in currency subunits, that must be paid by the customer as the first partial payment. Default value is 100
. Default currency is INR
. For example, if an amount of ₹700.00 is to be received from the customer in two installments of #1 - ₹500.00, #2 - ₹200.00, then you can set this value as 500000
. Must be passed along with accept_partial
parameter.
upi_link
mandatory for creating UPI Payment Link
boolean
Must be set to true
for creating UPI Payment Link. If the upi_link
parameter is not passed or passed with value as false, a Standard Payment Link will be created.
description
optional
string
A brief description of the Payment Link. The maximum character limit supported is 2048.
reference_id
optional
string
Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40.
customer
optional
object
Customer details
name
optional
string
The Customer's name.
optional
string
The customer's email address.
contact
optional
string
The customer's phone number.
expire_by
optional
integer
Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation.
notify
optional
array
Defines who handles Payment Link notification.
sms
optional
boolean
Defines who handles the SMS notification. Possible values:
true
: Razorpay handles the notification.false
: You handle the notification.
optional
boolean
Defines who handles the email notification. Possible values:
true
: Razorpay handles the notification.false
: You handle the notification.
notes
optional
json object
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Payment Link for Groceries.”
.
callback_url
optional
string
If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL.
Handy Tips
If the callback_url
is passed, it must be passed in the correct format. That is, it should contain a URL.
callback_method
conditionally mandatory
string
If callback_url
parameter is passed, callback_method must be passed with the value get
.
reminder_enable
optional
boolean
Used to send
true
: To send reminders.false
: To disable reminders.
Given below is the sample code for Fetch all Payment Links API. Pass the account_id
of the sub-merchant using X-Razorpay-Account
in the header.
- .
Was this page helpful?