Payment Links
Integrate with Payment Links API using partner auth.
Use Payment Links to receive online payments from your customers. Create Payment Links from the Dashboard 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.
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 RM 300.00, you must enter the value 30000.
currency
optional
string A three-letter ISO code for the currency in which you want to accept the payment. For example, MYR.
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 MYR. For example, if an amount of RM 700.00 is to be received from the customer in two installments of #1 - RM 500.00, #2 - RM 200.00, then you can set this value as 500000. Must be passed along with accept_partial parameter.
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
json 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 Curlec handles the notification.false: You handle the notification.
optional
boolean Defines who handles the email notification. Possible values:
true: Razorpay Curlec 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?