Limited Preview - Right now Link Payment API is on invite only basis, Click here to join the waiting list
Paysharp APIs are organized around REST. Our API has predictable resource-oriented URLs, accepts JSON requests and returns JSON response, and uses standard HTTP response codes, authentication, and verbs.
You can use our APIs in the sandbox(testing) and production(live) environments. We provide two different API urls and tokens for sandbox and production(live).
Pass API token and content-type for all the requests in header, API token can be generated from merchant dashboard.
By calling the API, able to create a payment link url and optionally send payment link to the customer via e-mail, SMS and WhatsApp based on parameters.
Request
Parameters | Range | Datatype | Required | Description |
---|---|---|---|---|
amount | Min 1 - No Max limit | number | Y | Amount for the link payment (Paysharp does not set any maximum amount limits; the maximum amount limit may vary based on the MCC code up to 1 Lac / 2 Lac / 5 Lac / Or any upper limits set by NPCI) |
remarks | Max 20 | string | Y | Remark for the payment link. Recommend to include invoice Id if applicable |
validity | Min 1 - Max 1440 | number | Y |
The validity time for the payment link, mentioned in
hours. Post validity period link will expire, after
expiry, Link does not accept payment anymore. Example:
|
customerName | Max 100 | string | Y | Name of the customer who intent to make payment |
customerMobileNo | Max 10 | string | Y | Mobile No. of the customer who intent to make payment |
customerEmail | Max 250 | string | N | E-mail address of the customer who intent to make payment |
sendEmail | Boolean | N | Send the payment link to customer's e-mail, if request value is true and if customerEmail is passed. | |
sendSms | Boolean | N | Send the payment link to customer's mobile number via SMS, if request value is true. | |
sendWhatsApp | Boolean | N | Send the payment link to customer's mobile number via WhatsApp, if request value is true and if it is a valid WhatsApp number. |
Response
Parameters | Datatype | Description |
---|---|---|
linkPaymentUrl | string | API returns payment link which created for the customer payment. The payment link can be shared to customer. |
linkPaymentId | string | Returns Unique identifier to identify the payment link status |
amount | number | Returns the request value |
remarks | string | Returns the request value |
validity | number | Returns the request value |
createdDate | datetime | Payment link created date and time (Date is in ISO 8601 format). |
expiredDate | datetime | Payment link expire date and time. Post expiry, payment link does not accept payment anymore (Date is in ISO 8601 format). |
customerName | string | Returns the request value |
customerMobileNo | string | Returns the request value |
customerEmail | string | Returns the request value |
sendEmail | Boolean | Returns the request value |
sendSms | Boolean | Returns the request value |
sendWhatsApp | Boolean | Returns the request value |
Request
{
"amount" : 500,
"remarks" : "InvoiceNo-APR8910005",
"validity" : 24,
"customerName" : "Ram",
"customerMobileNo" : "9111100000",
"customerEmail" : "",
"sendEmail" : false,
"sendSms" : true,
"sendWhatsApp" : true
}
Response
{
"code" : 200,
"message" : "success",
"data" : {
"linkPaymentUrl" : "https://www.paysharp.in/p/rpghin6--a",
"linkPaymentId" : "rpghin6--a",
"amount" : 500,
"remarks" : "InvoiceNo-APR8910005",
"validity" : 24,
"createdDate" : "2025-02-20T11:25:51+05:30",
"expiredDate" : "2025-02-21T11:25:51+05:30",
"customerName" : "Ram",
"customerMobileNo" : "9111100000",
"customerEmail" : "",
"sendEmail" : false,
"sendSms" : true,
"sendWhatsApp" : true
}
}
By calling the API, able to get the status of the link payment.
Request
Parameters | Range | Datatype | Required | Description |
---|---|---|---|---|
linkPaymentId | Max 36 | string | Y | Unique identifier to identify the payment link status |
Response
Parameters | Datatype | Description |
---|---|---|
linkPaymentUrl | string | API returns payment link which created for the customer payment. The payment link can be shared to customer. |
linkPaymentId | string | Unique identifier to identify the payment link status |
amount | number | Returns the amount of link payment |
fee | number | Fee for the transaction |
tax | number | Tax for the transaction fee |
totalFee | number | Sum of fee and tax |
netAmount | number | Actual amount after deducting fee and tax. |
paysharpReferenceNo | string | Payment reference number for the transaction |
utrNumber | string | Unique transaction number provided by Bank |
transactionDate | datetime | Transaction date (Date is in ISO 8601 format). |
status | string |
Returns the transaction status
|
remarks | string | Remark for the transaction provided by the merchant while creating link payment |
validity | number | The validity time for the payment link, mentioned in hours. |
createdDate | datetime | Payment link created date and time (Date is in ISO 8601 format). |
expiredDate | datetime | Payment link expire date and time. Post expiry, payment link does not accept payment anymore (Date is in ISO 8601 format). |
Response Body Sent by Paysharp for Success Case
{
"code" : 200,
"message" : "success",
"data" : {
"linkPaymentUrl" : "https://www.paysharp.in/p/rpghin6--a",
"linkPaymentId" : "rpghin6--a",
"amount" : 500,
"fee" : 5,
"tax" : 0.90,
"totalFee" : 5.90,
"netAmount" : 494.10,
"paysharpReferenceNo" : "upi4980be28ncR5x3Qr9YDZ0t",
"utrNumber" : "016778983042",
"transactionDate" : "2025-02-20T11:25:51+05:30",
"status" : "SUCCESS",
"remarks" : "InvoiceNo-APR8910005",
"validity" : 24,
"createdDate" : "2025-02-20T11:25:51+05:30",
"expiredDate" : "2025-02-21T11:25:51+05:30"
}
}
Response Body Sent by Paysharp for Pending Case
{
"code" : 200,
"message" : "success",
"data" : {
"linkPaymentUrl" : "https://www.paysharp.in/p/rpghin6--a",
"linkPaymentId" : "rpghin6--a",
"amount" : 500,
"validity" : 24,
"createdDate" : "2025-02-20T11:25:51+05:30",
"expiredDate" : "2025-02-21T11:25:51+05:30",
"status" : "PENDING",
"remarks" : "InvoiceNo-APR8910005"
}
}
Response Body Sent by Paysharp for Link Expired Case
{
"code" : 200,
"message" : "success",
"data" : {
"linkPaymentUrl" : "https://www.paysharp.in/p/rpghin6--a",
"linkPaymentId" : "rpghin6--a",
"amount" : 500,
"validity" : 24,
"createdDate" : "2025-02-20T11:25:51+05:30",
"expiredDate" : "2025-02-21T11:25:51+05:30",
"status" : "EXPIRED",
"remarks" : "InvoiceNo-APR8910005"
}
}
By calling the API, able to Re-send link payment to the customer. Email or SMS or WhatsApp: Atlease any one option should be selected as true while calling this API. Maximum 3 times able to call the resend API per link payment.
Request
Parameters | Range | Datatype | Required | Description |
---|---|---|---|---|
linkPaymentId | Max 36 | string | Y | Unique identifier to identify the payment link status |
sendEmail | Boolean | N | Send the payment link to customer's e-mail, if request value is true and if customerEmail is passed. | |
sendSms | Boolean | N | Send the payment link to customer's mobile number via SMS, if request value is true. | |
sendWhatsApp | Boolean | N | Send the payment link to customer's mobile number via WhatsApp, if request value is true and if it is a valid WhatsApp number. |
Response
Parameters | Datatype | Description |
---|---|---|
linkPaymentId | string | Unique identifier to identify the payment link status |
SendEmail | Boolean | Returns the request value |
SendSms | Boolean | Returns the request value |
sendWhatsApp | Boolean | Returns the request value |
resentCount | number | Number of times the resent invoked |
Request
{
"linkPaymentId" : "rpghin6—a",
"sendEmail" : false,
"sendSms" : true,
"sendWhatsApp" : true
}
Response
{
"code" : 200,
"message" : "success",
"data" : {
"linkPaymentId" : "rpghin6--a",
"sendEmail" : false,
"sendSms" : true,
"sendWhatsApp" : true,
"resentCount" : 1
}
}
Webhook is common for all UPI products, for Link payment webhook, only fires for the payment success case. For link payments webhook response additionally, you will receive "linkPaymentId" parameter
Explore WebhookHttp Status Code: 200 - Success
400 - Error
Sample Error Response
{
"code" : 400,
"errorCode" : 7003,
"message" : "Link Payment Id not found"
}
Possible Errors
Error Codes | Error Messages |
---|---|
7001 |
|
7002 | Maximum Resend attempts reached. |
7003 | Link Payment Id not found. |
7004 | Unable to re-sent the Link Payment, link payment status is SUCCESS. |
7005 | Unable to re-sent the Link Payment, link payment status is EXPIRED. |
Login to your Sandbox / Production environment and download from the Settings -> Configuration page.