Skip to main content

Create Payment Link

Creates a new payment link that can be shared with customers to collect payments.

Endpoint​

POST /api/v1/paymentLinks

Header Parameters​

ParameterTypeRequiredDescription
x-api-keystringrequiredPaySuite provided API key
merchantIdstringrequiredCustomer identifier as provided during customer onboarding
Content-TypestringrequiredMust be application/json

Request Parameters​

ParameterTypeRequiredDescription
customerobjectrequiredCustomer information (see Customer object below)
descriptionstring max(500)requiredPayment link description
externalReferencestring max(100)requiredExternal reference identifier for the payment link
externalUrlstring max(1000)optionalURL to redirect after payment completion
amountsobjectrequiredPayment amounts (see Amounts object below)
datesobjectrequiredPayment dates (see Dates object below)
itemsarrayrequiredArray of line items (minimum 1). See Item object below
metadataobjectoptionalAdditional metadata as key-value pairs

Customer Object​

FieldTypeRequiredDescription
namestring max(200)optionalCustomer's full name
emailstring max(255)optionalCustomer's email address
phonestring max(20)optionalCustomer's phone number
addressobjectoptionalCustomer's address (see Address object below)

Address Object​

FieldTypeRequiredDescription
line1string max(200)requiredAddress line 1
line2string max(200)optionalAddress line 2
citystring max(100)optionalCity
statestring max(100)optionalState or province
postalCodestring max(20)optionalPostal or ZIP code
countrystring max(2)requiredISO 3166-1 alpha-2 country code

Amounts Object​

FieldTypeRequiredDescription
currencystringrequiredISO 4217 currency code (e.g., GBP, USD)
subtotallongoptionalSubtotal amount before adjustments (minimum 0)
totallongrequiredTotal amount to be paid in minor units (minimum 31). Sum of items[].amount must match this total

Dates Object​

FieldTypeRequiredDescription
requestedDatedateTimerequiredPayment requested date (typically Invoice date) - ISO 8601 format
dueDatedateTimeoptionalPayment due date - ISO 8601 format
linkExpiryDatedateTimeoptionalPayment Link expiry date - ISO 8601 format

Item Object​

FieldTypeRequiredDescription
descriptionstring max(1000)requiredItem description
quantityintegerrequiredQuantity of items (minimum 1)
unitPricelongrequiredPrice per unit in minor units (minimum 1)
amountlongrequiredTotal item amount in minor units (minimum 1)
metadataobjectoptionalCustom key-value pairs

Response Parameters​

Status Code: 201 Created​

ParameterTypeDescription
iduuidUnique identifier for the payment link
paymentLinkIdstringGenerated payment link number
divisionAccountIdstringDivision account identifier
merchantIdstringMerchant identifier
customerobjectCustomer information
descriptionstringPayment link description
externalReferencestringExternal reference identifier
externalUrlstringRedirect URL after payment
amountsobjectPayment amounts (currency, subtotal, total)
datesobjectPayment dates (requestedDate, dueDate, linkExpiryDate)
currencyCodestringISO 4217 currency code
statusCodestringPayment link status (created, in_progress, paid, partially_paid, expired, cancelled)
statusChangedAtdateTimeLast status change timestamp (ISO 8601)
paymentLinkUrlstringThe payment link URL to share with customers
paidAmountlongTotal paid amount in minor units
lastAccessedAtdateTimeLast time the payment link was accessed (nullable)
accessCountintegerNumber of times the payment link has been accessed
itemsarrayLine items
metadataobjectAdditional metadata
createdAtdateTimeCreation timestamp (ISO 8601)
updatedAtdateTimeLast update timestamp (ISO 8601)
createdBystringUser who created the payment link
updatedBystringUser who last updated the payment link
versionintegerVersion number for optimistic concurrency

Example Request​

{
"customer": {
"name": "John Smith",
"email": "[email protected]",
"phone": "+44 20 7946 0958",
"address": {
"line1": "123 High Street",
"line2": "Apartment 4B",
"city": "London",
"state": "Greater London",
"postalCode": "SW1A 1AA",
"country": "GB"
}
},
"description": "Invoice #INV-2024-001 - Consulting Services",
"externalReference": "INV-2024-001",
"externalUrl": "https://example.com/invoices/INV-2024-001",
"amounts": {
"currency": "GBP",
"subtotal": 125000,
"total": 125000
},
"dates": {
"requestedDate": "2024-10-16T00:00:00Z",
"dueDate": "2024-11-30T00:00:00Z",
"linkExpiryDate": "2024-12-31T23:59:59Z"
},
"items": [
{
"description": "Consulting Services - October 2024",
"quantity": 10,
"unitPrice": 12500,
"amount": 125000
}
],
"metadata": {
"projectId": "PROJ-456",
"department": "Professional Services"
}
}

Example Response​

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"paymentLinkId": "PL-20241016153000-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 20 7946 0958",
"address": {
"line1": "123 High Street",
"line2": "Apartment 4B",
"city": "London",
"state": "Greater London",
"postalCode": "SW1A 1AA",
"country": "GB"
}
},
"description": "Invoice #INV-2024-001 - Consulting Services",
"externalReference": "INV-2024-001",
"externalUrl": "https://example.com/invoices/INV-2024-001",
"amounts": {
"currency": "GBP",
"subtotal": 125000,
"total": 125000
},
"dates": {
"requestedDate": "2024-10-16T00:00:00Z",
"dueDate": "2024-11-30T00:00:00Z",
"linkExpiryDate": "2024-12-31T23:59:59Z"
},
"currencyCode": "GBP",
"statusCode": "created",
"statusChangedAt": "2024-10-16T15:30:00Z",
"paymentLinkUrl": "https://group.pay.accessacloud.com/pay/550e8400-e29b-41d4-a716-446655440000",
"paidAmount": 0,
"lastAccessedAt": null,
"accessCount": 0,
"items": [
{
"id": "9b2e7c14-4f1a-4d3b-8a21-6c0f5e2d1a77",
"description": "Consulting Services - October 2024",
"quantity": 10,
"unitPrice": 12500,
"amount": 125000,
"offlinePaidAmount": 0
}
],
"metadata": {
"projectId": "PROJ-456",
"department": "Professional Services"
},
"createdAt": "2024-10-16T15:30:00Z",
"updatedAt": "2024-10-16T15:30:00Z",
"createdBy": "api-key-user",
"updatedBy": "api-key-user",
"version": 1
}

Status Code: 400 Bad Request​

Returned when the request validation fails. Common validation errors include:

  • Total amount must be greater than 30
  • Items array must contain at least 1 item
  • Required fields missing (customer, description, externalReference, amounts, dates)
  • Invalid currency code

Status Code: 401 Unauthorized​

Returned when the API key is missing or invalid.