Skip to main content

List Payment Links

Retrieve a paginated list of payment links with optional filtering and sorting.

GEThttps://api.zenpayz.com/merchant/api/v1/payment-links
Bearer · API key

Request

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation
Content-Type
REQUIRED
application/json

Query Parameters

ParameterTypeDescription
status
OPTIONAL
stringFilter by status: ACTIVE, INACTIVE, EXPIRED
currency
OPTIONAL
stringFilter by currency code
page
OPTIONAL
numberPage number (default: 1)
limit
OPTIONAL
numberItems per page (default: 20, max: 100)
sortBy
OPTIONAL
stringSort field (default: createdAt)
sortOrder
OPTIONAL
stringSort direction: ASC or DESC (default: DESC)
searchTerm
OPTIONAL
stringSearch by title or description

Response

Success (200 OK)

{
"success": true,
"data": {
"items": [
{
"linkId": "pl_a1b2c3d4e5f6g7h8",
"title": "Pro Plan Payment",
"description": "Payment for Pro Plan subscription",
"amount": 4999,
"currency": "INR",
"status": "ACTIVE",
"usageType": "SINGLE",
"maxUses": null,
"usageCount": 0,
"expiresAt": "2024-02-15T23:59:59.000Z",
"shortCode": "ZP-XYZ789",
"shortUrl": "https://pay.zenpayz.com/s/ZP-XYZ789",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
],
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
},
"message": "Payment links retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 35,
"api_version": "v1",
"endpoint": "GET /payment-links",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid query parameters
UNAUTHORIZED401Invalid API key

Examples

curl -X GET "https://api.zenpayz.com/merchant/api/v1/payment-links?status=ACTIVE&page=1&limit=20" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json"