Update a payment link.
const url = 'https://api.ridleypay.com/v1/payment-links/41';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"Deposit for order 1042","description":"Balance due on delivery.","amount":2500,"active":false,"success_url":"https://example.com/thanks","cancel_url":"https://example.com/cart","max_uses":1,"expires_at":"2026-12-31T23:59:59Z","taxable":true,"recurring":null,"metadata":{"order_id":"1042"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.ridleypay.com/v1/payment-links/41 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Deposit for order 1042", "description": "Balance due on delivery.", "amount": 2500, "active": false, "success_url": "https://example.com/thanks", "cancel_url": "https://example.com/cart", "max_uses": 1, "expires_at": "2026-12-31T23:59:59Z", "taxable": true, "recurring": null, "metadata": { "order_id": "1042" } }'Send only the fields to change. Set active to false to turn the link off; its payments are kept.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The payment link ID.
Example
41Request Body
Section titled “Request Body”object
Shown to the customer on the checkout page. Must not be greater than 255 characters.
Example
Deposit for order 1042More detail shown under the title. Must not be greater than 5000 characters.
Example
Balance due on delivery.The amount to charge. Required unless you pass products. Must be at least 0.01. Must not be greater than 999999.99.
Example
2500Turn the link off (false) or back on (true).
Example
falseWhere to send the customer after paying. Must be a valid URL. Must not be greater than 2048 characters.
Example
https://example.com/thanksWhere to send the customer if they cancel. Must be a valid URL. Must not be greater than 2048 characters.
Example
https://example.com/cartTurn the link off after this many payments. Use 1 for a one-off link. Must be at least 1.
Example
1Turn the link off at this time (ISO 8601). Must be a valid date. Must be a date after now.
Example
2026-12-31T23:59:59ZAdd tax from your team’s tax settings on top of the amount. Defaults to false, so the customer pays exactly the amount.
Example
trueBill the customer on a schedule after the first payment.
object
Daily, weekly, monthly or yearly. This field is required when recurring is present.
Example
monthlyFor example 3 with monthly bills every 3 months. Must be at least 1. Must not be greater than 365.
Example
1Stop billing after this date. Must be a valid date. Must be a date after today.
Example
2027-06-30Example
nullUp to 50 keys of your own data. Copied onto every payment made with the link and included in its webhooks. Must not have more than 50 items.
object
Example
{ "order_id": "1042"}