Skip to main content
GET
/
payment-link
/
get
/
{fromDate}
/
{toDate}
Retrieve the payment link records within the given date range.
curl --request GET \
  --url https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate} \
  --header 'X-HMAC-Signature: <api-key>' \
  --header 'accountId: <api-key>' \
  --header 'apiKey: <api-key>'
import requests

url = "https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}"

headers = {
"apiKey": "<api-key>",
"X-HMAC-Signature": "<api-key>",
"accountId": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {apiKey: '<api-key>', 'X-HMAC-Signature': '<api-key>', accountId: '<api-key>'}
};

fetch('https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-HMAC-Signature: <api-key>",
"accountId: <api-key>",
"apiKey: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("apiKey", "<api-key>")
req.Header.Add("X-HMAC-Signature", "<api-key>")
req.Header.Add("accountId", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}")
.header("apiKey", "<api-key>")
.header("X-HMAC-Signature", "<api-key>")
.header("accountId", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.omnispay.com/api/payment-link/get/{fromDate}/{toDate}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["apiKey"] = '<api-key>'
request["X-HMAC-Signature"] = '<api-key>'
request["accountId"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "<string>",
  "message": "<string>",
  "response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}
{
"status": "<string>",
"message": "<string>",
"response": {}
}

Retrieve Payment Links by Date Range

This endpoint fetches payment link records within a given date range, with pagination support.

Path Parameters

  • fromDate (string, required):
    The starting date (inclusive) for the date range filter.
    Format: yyyy-MM-dd HH:mm:ss
    • Example: 2025-01-01 00:00:00
    • The API will retrieve all payment link records created on or after this date.
  • toDate (string, required):
    The ending date (inclusive) for the date range filter.
    Format: yyyy-MM-dd HH:mm:ss
    • Example: 2025-01-31 23:59:59
    • The API will retrieve all payment link records created on or before this date.
📌 How it Works
If you specify a fromDate of 2025-01-01 00:00:00 and a toDate of 2025-01-31 23:59:59, the API will return all payment link records that were created within this date range. The results will be paginated based on the provided query parameters.

Query Parameters

  • page (integer, optional, default: 0): The page number to fetch.
  • size (integer, optional, default: 10): The number of records per page.

Request Headers

  • User-Agent (string, optional): The User-Agent header, which is not mandatory.

Example Request

GET /payment-link/get/2025-01-01%2000:00:00/2025-01-31%2023:59:59?page=1&size=20
User-Agent: Mozilla/5.0

Authorizations

apiKey
string
header
required
X-HMAC-Signature
string
header
required
accountId
string
header
required

Headers

User-Agent
string

Path Parameters

fromDate
string<date-time>
required

Start date in format yyyy-MM-dd HH:mm:ss

toDate
string<date-time>
required

End date in format yyyy-MM-dd HH:mm:ss

Query Parameters

page
integer<int32>
default:0

Page number for pagination (default: 0)

size
integer<int32>
default:10

Number of records per page (default: 10)

Response

OK. Payment link records retrieved successfully

status
string
message
string
response
object