Skip to main content

List Payment Links

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

Endpoint​

GET /api/v1/paymentLinks

Header Parameters​

ParameterTypeRequiredDescription
x-api-keystringrequiredPaySuite provided API key
merchantIdstringrequiredCustomer identifier as provided during customer onboarding

Query Parameters​

ParameterTypeRequiredDescription
pageintegeroptionalPage number (default: 1, minimum: 1)
pageSizeintegeroptionalNumber of items per page (default: 25)
searchstringoptionalSearch term to filter payment links
statusstring[]optionalFilter by status. Accepted values: created, in_progress, paid, partially_paid, expired, cancelled. Multiple values can be provided
sortFieldstringoptionalField to sort by: CreatedAt, DueDate (default: CreatedAt)
sortDirectionstringoptionalSort direction: Ascending, Descending (default: Descending)

Response Parameters​

Status Code: 200 OK​

ParameterTypeDescription
paymentLinksarrayArray of PaymentLinkSummary objects
paginationobjectPagination information (see PaginationInfo below)
statsobjectSummary statistics (see PaymentLinkSummaryStats below)

PaymentLinkSummary Object​

FieldTypeDescription
iduuidUnique identifier for the payment link
externalReferencestringExternal reference identifier
externalUrlstringURL to the external provider's invoice
customerNamestringCustomer's full name
emailstringCustomer's email address
amountlongTotal payment link amount in minor units
currencystringISO 4217 currency code (e.g., GBP)
statusstringPayment link status
dueDatedateTimePayment due date (nullable)
createdAtdateTimeCreation timestamp (ISO 8601)
daysOverdueintegerDays past due date (null if not overdue)
paymentLinkstringLink to the payment detail page

PaginationInfo Object​

FieldTypeDescription
currentPageintegerCurrent page number
totalPagesintegerTotal number of pages
totalItemsintegerTotal number of items
itemsPerPageintegerItems displayed per page
hasNextPagebooleanWhether there is a next page
hasPreviousPagebooleanWhether there is a previous page

PaymentLinkSummaryStats Object​

FieldTypeDescription
totalOutstandinglongTotal unpaid amount in minor units
totalPaidlongTotal paid amount in minor units
overdueCountintegerNumber of overdue payment links
pendingCountintegerNumber of pending payment links

Example Request​

GET /api/v1/paymentLinks?page=1&pageSize=10&status=created&sortField=CreatedAt&sortDirection=Descending

Example Response​

{
"paymentLinks": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalReference": "INV-001",
"externalUrl": "https://external-provider/inv-001",
"customerName": "John Smith",
"email": "[email protected]",
"amount": 250000,
"currency": "GBP",
"status": "created",
"dueDate": "2024-12-01T00:00:00Z",
"createdAt": "2024-11-01T10:30:00Z",
"daysOverdue": null,
"paymentLink": "#payments/550e8400-e29b-41d4-a716-446655440000"
},
{
"id": "660f9511-f3ac-52e5-b827-557766551111",
"externalReference": "INV-002",
"externalUrl": "https://external-provider/inv-002",
"customerName": "Jane Wilson",
"email": "[email protected]",
"amount": 180000,
"currency": "GBP",
"status": "created",
"dueDate": "2024-11-25T00:00:00Z",
"createdAt": "2024-10-25T14:20:00Z",
"daysOverdue": null,
"paymentLink": "#payments/660f9511-f3ac-52e5-b827-557766551111"
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5,
"totalItems": 47,
"itemsPerPage": 25,
"hasNextPage": true,
"hasPreviousPage": false
},
"stats": {
"totalOutstanding": 1575000,
"totalPaid": 825000,
"overdueCount": 3,
"pendingCount": 12
}
}

Status Code: 400 Bad Request​

Returned when query parameters are invalid.

Status Code: 401 Unauthorized​

Returned when the API key is missing or invalid.