cURL
curl --request PATCH \ --url http://localhost:3000/api/canary/payment-links/{id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "metadata": { "orderId": "12345" }, "active": true, "amount": 123, "successUrl": "<string>", "cancelUrl": "<string>" } '
{ "statusCode": 400, "message": [ "Invalid input data" ], "error": "Bad Request" }
Update an existing payment link
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The unique identifier of the payment link
Payment link update details
Optional custom metadata
{ "orderId": "12345" }
Whether the payment link is active
The URL to redirect to on successful payment
The URL to redirect to if customer cancels
Payment link updated successfully