Skip to main content

cURL

The following cURL request can be used to test the API POST endpoint on the demo environment.

You will need the following variables obtained from PaySuite.

  • {{API_KEY}}
  • {{MERCHANT_ID}}

Full Example​

curl --location 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data-raw '{
"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"
}
}'

Minimal Example (Required Fields Only)​

curl --location 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"customer": {
"name": "Jane Wilson",
"email": "[email protected]"
},
"description": "Invoice #INV-2024-002",
"externalReference": "INV-2024-002",
"amounts": {
"currency": "GBP",
"total": 75000
},
"dates": {
"requestedDate": "2024-10-16T00:00:00Z"
},
"items": [
{
"description": "Web Development Services",
"quantity": 1,
"unitPrice": 75000,
"amount": 75000
}
]
}'