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 Financial Details
curl --location --request PUT 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks/{{PAYMENT_LINK_ID}}/financial-details' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"amounts": {
"currency": "GBP",
"subtotal": 150000,
"total": 150000
},
"items": [
{
"description": "Consulting Services - October 2024",
"quantity": 12,
"unitPrice": 12500,
"amount": 150000
}
]
}'
Multiple Items Example
curl --location --request PUT 'https://group.pay.accessacloud.com/paylinks-payment-demo/api/v1/paymentLinks/{{PAYMENT_LINK_ID}}/financial-details' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{API_KEY}}' \
--header 'merchantId: {{MERCHANT_ID}}' \
--data '{
"amounts": {
"currency": "GBP",
"subtotal": 275000,
"total": 275000
},
"items": [
{
"description": "Frontend Development",
"quantity": 40,
"unitPrice": 5000,
"amount": 200000
},
{
"description": "Backend Development",
"quantity": 15,
"unitPrice": 5000,
"amount": 75000
}
]
}'