Resource: payment-links
The** Get All Payment Links** API is used to get all the payment links generated for a given date range, and you can specify how many records are to be displayed per page in the response.
HTTP Method: GET
Environment
| Test Environment | <https://uatoneapi.payu.in/payment-links> | 
| Production Environment | <https://oneapi.payu.in/payment-links> | 
Note: The access token with the scope as read_payment_links is required on the header. For more information on getting the access token, refer to Get Token API - Payment Links.
Request headers
| Parameter | Description | 
|---|---|
mid  | 
  
  | 
Authorization  | 
  Bearer   | 
Query parameters
| Parameters | Description | Example | 
|---|---|---|
pageOffset  | 
  The parameter needs to include the page offset in terms of the rows.  | 
  2  | 
pageSize  | 
  The parameter needs to include the number of rows to be displayed per page in the response.  | 
  20  | 
orderBy  | 
  This parameter can contain any of the following column names by which the rows in the API response are sorted:  | 
  addedOn  | 
order  | 
  This parameter can contain any of the following values: 
  | 
  asc  | 
dateFrom  | 
  
  | 
  2022-01-22  | 
searchText  | 
  
  | 
  Insurance Premium Payment  | 
dateTo  | 
  
  | 
  2022-01-28  | 
active  | 
  
 
  | 
  active  | 
Sample request
curl --location -g --request GET 'https://uatoneapi.payu.in/payment-links?pageSize=20&pageOffset=0&orderBy=amount&order=desc&dateFrom=2022-03-21&dateTo=2022-03-22' \
--header 'merchantId: {{merchantId}}' \
--header 'Authorization: Bearer {{access_token}}'import http.client
conn = http.client.HTTPSConnection("{{stagingurl}}")
payload = ''
headers = {
  'merchantId': '{{merchantId}}',
  'Authorization': 'Bearer {{access_token}}'
}
conn.request("GET", "/payment-links?pageSize=20&pageOffset=0&orderBy=amount&order=desc&dateFrom=2022-03-21&dateTo=2022-03-22", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require "uri"
require "net/http"
url = URI("{{stagingurl}}/payment-links?pageSize=20&pageOffset=0&orderBy=amount&order=desc&dateFrom=2022-03-21&dateTo=2022-03-22")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["merchantId"] = "{{merchantId}}"
request["Authorization"] = "Bearer {{access_token}}"
response = http.request(request)
puts response.read_bodyOkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("{{stagingurl}}/payment-links?pageSize=20&pageOffset=0&orderBy=amount&order=desc&dateFrom=2022-03-21&dateTo=2022-03-22")
  .method("GET", null)
  .addHeader("merchantId", "{{merchantId}}")
  .addHeader("Authorization", "Bearer {{access_token}}")
  .build();
Response response = client.newCall(request).execute();Sample response
{
  "status": 0,
  "message": null,
  "result": {
    "pageSize": 20,
    "pages": 1,
    "rows": 1,
    "pageOffset": 0,
    "paymentLinksList": [
      {
        "invoiceNumber": "INV8446471886220",
        "description": "paymentLink for testing",
        "createDate": "2022-03-21T14:53:53.000+0530",
        "paymentLinkURL": "http://pp72.pmny.in/4IwlctBtwp2V",
        "customerName": null,
        "amount": 2,
        "active": true,
        "expiry": "2022-03-21T16:12:12.000+0530",
        "isAmountFilledByCustomer": false,
        "status": "active",
        "isScheduled": 0,
        "reminderCount": 0
      }
    ]
  },
  "errorCode": null,
  "guid": null
}