Skip to main content

cURL

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

You will need the following variables obtained from PaySuite.

  • {{API_KEY}}
  • {{MERCHANT_ID}}
  • {{PAYMENT_LINK_ID}} - The UUID of the payment link to update

Update Description and Dates​

curl --location --request PUT 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks/{{PAYMENT_LINK_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"description": "Invoice #INV-2024-001 - Consulting Services (Updated)",
"externalUrl": "https://example.com/invoices/INV-2024-001/updated",
"dates": {
"requestedDate": "2024-10-16T00:00:00Z",
"dueDate": "2024-12-31T00:00:00Z",
"linkExpiryDate": "2025-01-31T23:59:59Z"
}
}'

Update Customer Details​

curl --location --request PUT 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks/{{PAYMENT_LINK_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"customer": {
"name": "Jane Wilson",
"email": "[email protected]",
"phone": "+44 20 7946 1234"
}
}'

Update Metadata​

curl --location --request PUT 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks/{{PAYMENT_LINK_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"metadata": {
"projectId": "PROJ-456",
"department": "Professional Services",
"updated": "true"
}
}'