Skip to main content

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​

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

Query Parameters​

ParameterTypeRequiredDescription
sincedateTimerequiredStart of time range (ISO 8601 format)
untildateTimeoptionalEnd of time range (ISO 8601 format, defaults to current time)
statusstring[]optionalFilter by specific status: created, in_progress, paid, partially_paid, expired, cancelled. Multiple values can be provided
pageintegeroptionalPage number (default: 1, minimum: 1)
pageSizeintegeroptionalNumber of items per page (default: 25)

Response Parameters​

Status Code: 200 OK​

ParameterTypeDescription
changesarrayArray of PaymentLinkChanges objects
paginationobjectPagination information

PaymentLinkChanges Object​

FieldTypeDescription
iduuidUnique identifier for the payment link
externalReferencestringExternal reference identifier
statusstringPayment link status
statusChangedAtdateTimeTimestamp when status changed (ISO 8601)
currencystringISO 4217 currency code (e.g., GBP)
paidAmountlongTotal 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.