Get Payment Link Status Changes
Retrieves payment links that have had status changes within a specified time range. This endpoint is useful for synchronizing payment link statuses with external systems.
Endpoint
GET /api/v1/paymentLinks/status-changes
Header Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
x-api-key | string | required | PaySuite provided API key |
merchantId | string | required | Customer identifier as provided during customer onboarding |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
since | dateTime | required | Start of time range (ISO 8601 format) |
until | dateTime | optional | End of time range (ISO 8601 format, defaults to current time) |
status | string[] | optional | Filter by specific status: created, in_progress, paid, partially_paid, expired, cancelled. Multiple values can be provided |
page | integer | optional | Page number (default: 1, minimum: 1) |
pageSize | integer | optional | Number of items per page (default: 25) |
Response Parameters
Status Code: 200 OK
| Parameter | Type | Description |
|---|---|---|
changes | array | Array of PaymentLinkChanges objects |
pagination | object | Pagination information |
PaymentLinkChanges Object
| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the payment link |
externalReference | string | External reference identifier |
status | string | Payment link status |
statusChangedAt | dateTime | Timestamp when status changed (ISO 8601) |
currency | string | ISO 4217 currency code (e.g., GBP) |
paidAmount | long | Total paid amount in minor units |
Example Request
GET /api/v1/paymentLinks/status-changes?since=2024-10-16T00:00:00Z&until=2024-10-17T23:59:59Z&page=1&pageSize=50
Example Response
{
"changes": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalReference": "INV-2024-001",
"status": "paid",
"statusChangedAt": "2024-10-17T10:15:30Z",
"currency": "GBP",
"paidAmount": 250000
},
{
"id": "660f9511-f3ac-52e5-b827-557766551111",
"externalReference": "INV-2024-002",
"status": "expired",
"statusChangedAt": "2024-10-17T00:00:00Z",
"currency": "USD",
"paidAmount": 0
}
],
"pagination": {
"currentPage": 1,
"itemsPerPage": 50,
"totalPages": 1,
"totalItems": 2,
"hasNextPage": false,
"hasPreviousPage": false
}
}
Status Code: 400 Bad Request
Returned when the since parameter is missing or has an invalid format.
Status Code: 401 Unauthorized
Returned when the API key is missing or invalid.