Get Payment Link Details
Retrieves detailed information about a specific payment link, including payment history and status changes.
Endpoint
GET /api/v1/paymentLinks/{id}
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 |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | required | Unique identifier for the payment link |
Response Parameters
Status Code: 200 OK
| Parameter | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the payment link |
paymentLinkId | string | Generated payment link number |
divisionAccountId | string | Division account identifier |
merchantId | string | Merchant identifier |
customer | object | Customer information |
description | string | Payment link description |
externalReference | string | External reference identifier |
externalUrl | string | Redirect URL after payment |
amounts | object | Payment amounts (currency, subtotal, total) |
dates | object | Payment dates (requestedDate, dueDate, linkExpiryDate) |
currencyCode | string | ISO 4217 currency code |
statusCode | string | Payment link status (created, in_progress, paid, partially_paid, expired, cancelled) |
statusChangedAt | dateTime | Last status change timestamp (ISO 8601) |
paymentLinkUrl | string | The payment link URL to share with customers |
paidAmount | long | Total paid amount in minor units |
lastAccessedAt | dateTime | Last time the payment link was accessed (nullable) |
accessCount | integer | Number of times the payment link has been accessed |
items | array | Line items |
metadata | object | Additional metadata |
payments | array | Array of PaymentInfo objects |
history | array | Array of HistoryEntry objects |
createdAt | dateTime | Creation timestamp (ISO 8601) |
updatedAt | dateTime | Last update timestamp (ISO 8601) |
createdBy | string | User who created the payment link |
updatedBy | string | User who last updated the payment link |
version | integer | Version number for optimistic concurrency |
Item Object
| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the line item |
description | string | Item description |
quantity | integer | Quantity of items |
unitPrice | long | Price per unit in minor units |
amount | long | Total item amount in minor units |
offlinePaidAmount | long | Cumulative offline amount recorded against this item, in minor units |
metadata | object | Custom key-value pairs (nullable) |
PaymentInfo Object
| Field | Type | Description |
|---|---|---|
id | string | Payment identifier |
amount | long | Payment amount in minor units |
currency | string | ISO 4217 currency code |
method | string | Payment method used |
status | string | Payment status |
date | dateTime | Payment date (ISO 8601) |
externalPaymentReference | string | External payment reference (nullable) |
HistoryEntry Object
| Field | Type | Description |
|---|---|---|
id | string | History entry identifier |
eventType | string | Type of event |
description | string | Human-readable description |
occurredAt | dateTime | Event timestamp (ISO 8601) |
createdBy | string | User who triggered event (nullable) |
Example Request
GET /api/v1/paymentLinks/550e8400-e29b-41d4-a716-446655440000
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"paymentLinkId": "PL-20241101103000-a1b2c3",
"divisionAccountId": "6F2A9C31-8B45-4E0B-9C77-12AF34D9B201",
"merchantId": "A91C4B87-3D0E-4B46-8E52-9BD4E57EAA98",
"customer": {
"id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"name": "John Smith",
"email": "[email protected]",
"phone": "+44 7700 123456",
"address": {
"line1": "123 Business Street",
"line2": "Suite 100",
"city": "London",
"state": "England",
"postalCode": "SW1A 1AA",
"country": "GB"
}
},
"description": "Website development services Q4",
"externalReference": "INV-2024-001",
"externalUrl": "https://external-provider/inv-001",
"amounts": {
"currency": "GBP",
"subtotal": 200000,
"total": 300000
},
"dates": {
"requestedDate": "2024-11-01T00:00:00Z",
"dueDate": "2024-12-01T00:00:00Z",
"linkExpiryDate": "2024-12-31T23:59:59Z"
},
"currencyCode": "GBP",
"statusCode": "paid",
"statusChangedAt": "2024-11-15T14:22:00Z",
"paymentLinkUrl": "https://group.pay.accessacloud.com/pay/550e8400-e29b-41d4-a716-446655440000",
"paidAmount": 300000,
"lastAccessedAt": "2024-11-15T14:20:00Z",
"accessCount": 3,
"items": [
{
"id": "9b2e7c14-4f1a-4d3b-8a21-6c0f5e2d1a77",
"description": "Frontend Development",
"quantity": 40,
"unitPrice": 5000,
"amount": 200000,
"offlinePaidAmount": 0,
"metadata": {
"projectCode": "PROJ-001",
"department": "Engineering"
}
}
],
"metadata": {
"projectId": "PROJ-001",
"clientRef": "CONTRACT-2024-Q4",
"priority": "high"
},
"payments": [
{
"id": "pay_1234567890abcdef",
"amount": 300000,
"currency": "GBP",
"method": "card",
"status": "succeeded",
"date": "2024-11-15T14:22:00Z",
"externalPaymentReference": "pi_1234567890abcdef"
}
],
"history": [
{
"id": "hist_001",
"eventType": "payment_received",
"description": "Payment of £3000.00 received via card",
"occurredAt": "2024-11-15T14:22:00Z",
"createdBy": "stripe_webhook"
}
],
"createdAt": "2024-11-01T10:30:00Z",
"updatedAt": "2024-11-15T14:22:00Z",
"createdBy": "api-key-user",
"updatedBy": "system",
"version": 1
}
Status Code: 400 Bad Request
Returned when the payment link ID format is invalid.
Status Code: 404 Not Found
Returned when no payment link is found for the given id.