Get User Links
GET /link
GET /linkRetrieve a paginated list of payment links created by the authenticated user. If pagination parameters are not provided, the API will return all links for the user.
API ReferenceAuthentication
All requests require authentication via the x-api-key header:
x-api-key: YOUR_API_KEYReplace YOUR_API_KEY with your actual key from the KiraPay dashboard.
Query Parameters (opt)
page
number
No
Page number for pagination (default: 1)
limit
number
No
Items per page (default: 10, max: 100)
If
pageandlimitare not provided, all links will be returned.Use pagination for large datasets to avoid heavy responses.
Request Example (cURL)
curl -X GET "https://kirapay-api.holatech.app/api/link?page=1&limit=10" \
-H "x-api-key: <YOUR_API_KEY>"Request Example (Nodejs)
import axios from "axios";
async function getUserLinks() {
const response = await axios.get(
"https://kirapay-api.holatech.app/api/link?page=1&limit=10",
{
headers: {
"x-api-key": process.env.KIRAPAY_API_KEY!,
},
}
);
console.log(response.data);
}
getUserLinks();Successful Response (200)
{
"message": "success",
"data": {
"links": [
{
"_id": "67a1b3f2c4d5e6f7g8h9i0j1",
"code": "abc123def4",
"price": 10,
"tokenOut": {
"symbol": "USDC",
"address": "0xA0b86a33E6441b8c4C8C0C8C0C8C0C8C0C8C0C8C",
"decimals": 6,
"chain": "ethereum"
},
"receiver": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"user": "507f1f77bcf86cd799439011",
"key": "api_key_123",
"name": "Order #A1209",
"redirectUrl": "https://merchant.example.com/thank-you",
"createdAt": "2025-01-25T10:00:00.000Z",
"updatedAt": "2025-01-25T10:00:00.000Z"
}
],
"total": 1,
"page": 1,
"totalPages": 1
},
"code": 200
}Response Fields
message
string
Response status message (success on success)
data.links
array
List of payment link objects
data.links[]._id
string
Unique identifier of the link (MongoDB ObjectId)
data.links[].code
string
Short code used in the payment URL
data.links[].price
number
Payment amount in the specified currency
data.links[].tokenOut.symbol
string
Token symbol (e.g., USDC)
data.links[].tokenOut.address
string
Smart contract address of the token
data.links[].tokenOut.decimals
number
Number of decimals for the token
data.links[].tokenOut.chain
string
Blockchain network (ethereum, polygon, etc.)
data.links[].receiver
string
Wallet address receiving funds
data.links[].user
string
User ID who created the link
data.links[].key
string
API key used to create the link
data.links[].name
string
Display name of the payment link
data.links[].redirectUrl
string
Redirect URL after successful payment
data.links[].createdAt
string
Timestamp when the link was created
data.links[].updatedAt
string
Timestamp when the link was last updated
data.total
number
Total number of links
data.page
number
Current page number
data.totalPages
number
Total number of pages available
code
number
HTTP status code (200)
🔹 With Pagination (10 per page)
curl -X GET "https://kirapay-api.holatech.app/api/link?page=1&limit=10" \
-H "x-api-key: <YOUR_API_KEY>"👉 Returns only 10 links per page (use page to navigate).
🔹 Without Pagination (all links)
curl -X GET "https://kirapay-api.holatech.app/api/link" \
-H "x-api-key: <YOUR_API_KEY>"👉 Returns all links created by the authenticated user.
Last updated
Was this helpful?