> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/api-reference/paymentlink/update-payment-link/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # Update payment link PUT https://api-sandbox.payabli.com/api/PaymentLink/update/{payLinkId} Content-Type: application/json Updates a payment link's details. Reference: https://beta-docs.payabli.com/api-reference/paymentlink/update-payment-link ## Authentication - `requestToken` header (required) — API Key authentication via header ## Servers - `https://api-sandbox.payabli.com/api` (Sandbox, default) - `https://api.payabli.com/api` (Production) ## Request ### Path parameters - `payLinkId` (string, required) — ID for the payment link. ### Body (application/json) This endpoint expects an object. - `contactUs` (ContactElement, optional) — ContactUs section of payment link page - `logo` (Element, optional) — Logo section of payment link page - `messageBeforePaying` (LabelElement, optional) — Message section of payment link page - `notes` (NoteElement, optional) — Notes section of payment link page - `page` (PageElement, optional) — Page header section of payment link page - `paymentButton` (LabelElement, optional) — Payment button section of payment link page - `paymentMethods` (MethodElement, optional) — Payment methods section of payment link page - `review` (HeaderElement, optional) — Review section of payment link page - `settings` (PagelinkSetting, optional) — Settings section of payment link page ## Response ### 200 Success - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (string, optional) — If `isSuccess` = true, this contains the payment link identifier. If `isSuccess` = false, this contains the reason of the error. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Errors ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 500 Internal Server Error Internal API Error - `any` ### 503 Service Unavailable Error Database connection error - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (map from string to any, optional) — The object containing the response data. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Types ### ContactElement - `emailLabel` (string, optional) — Custom content for email - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `header` (string, optional) — Header text for section - `order` (integer, optional) — Order of element or section in container. - `paymentIcons` (boolean, optional) — Flag indicating if icons for accepted card brands will be shown - `phoneLabel` (string, optional) — Custom content for phone number ### Element - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `order` (integer, optional) — Order of element or section in container. ### LabelElement - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `label` (string, optional) — Label to display for section or element - `order` (integer, optional) — Order of element or section in container. ### NoteElement - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `header` (string, optional) — Header text for section - `order` (integer, optional) — Order of element or section in container. - `placeholder` (string, optional) — Placeholder text for input field - `value` (string, optional) — Pre-populated value for input field ### PageElement - `description` (string, optional) — Page description in header - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `header` (string, optional) — Page header - `order` (integer, optional) — Order of element or section in container. ### MethodElement - `allMethodsChecked` (boolean, optional) — Flag indicating if all allowed payment methods will be pre-selected. - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `header` (string, optional) — Header text for section - `methods` (MethodsList, optional) - `order` (integer, optional) — Order of element or section in container. - `settings` (MethodElementSettings, optional) — Settings for wallet payment methods. ### HeaderElement - `enabled` (boolean, optional) — Toggles whether the section or element is enabled. - `header` (string, optional) — Header text for section - `order` (integer, optional) — Order of element or section in container. ### PagelinkSetting - `color` (string, optional) — An HTML color code in format #RRGGBB - `customCssUrl` (string, optional) — Complete URL to a custom CSS file to be loaded with the page - `language` (string, optional) — Two-letter code following ISO 639-1 - `pageLogo` (FileContent, optional) — Object containing logo file to upload/ use in page - `redirectAfterApprove` (boolean, optional) — Flag indicating if the capability for redirection in the page will be activated - `redirectAfterApproveUrl` (string, optional) — Complete URL where the page will be redirected after completion ### MethodsList - `amex` (boolean, optional) — When `true`, American Express is accepted. - `applePay` (boolean, optional) — When `true`, Apple Pay is accepted. - `discover` (boolean, optional) — When `true`, Discover is accepted. - `eCheck` (boolean, optional) — When `true`, ACH is accepted. - `mastercard` (boolean, optional) — When `true`, Mastercard is accepted. - `visa` (boolean, optional) — When `true`, Visa is accepted. ### MethodElementSettings Settings for wallet payment methods. - `applePay` (MethodElementSettingsApplePay, optional) ### FileContent Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB. - `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB. - `filename` (string, optional) — The name of the attached file. - `ftype` (enum, optional) — The MIME type of the file (if content is provided) - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt` - `furl` (string, optional) — Optional url provided to show or download the file remotely ### MethodElementSettingsApplePay - `buttonStyle` (enum, optional, default: black) — The Apple Pay button style. See [Apple Pay Button Style](/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-style) for more information. - Allowed values: `black`, `white-outline`, `white` - `buttonType` (enum, optional, default: pay) — The text on Apple Pay button. See [Apple Pay Button Type](/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-type) for more information. - Allowed values: `plain`, `buy`, `donate`, `check-out`, `book`, `continue`, `top-up`, `order`, `rent`, `support`, `contribute`, `tip`, `pay` - `language` (enum, optional, default: en-US) — The Apple Pay button locale. See [Apple Pay Button Language](/developer-guides/hosted-payment-page-apple-pay#param-applepay-language) for more information. - Allowed values: `en-US`, `ar-AB`, `ca-ES`, `zh-CN`, `zh-HK`, `zh-TW`, `hr-HR`, `cs-CZ`, `da-DK`, `de-DE`, `nl-NL`, `en-AU`, `en-GB`, `fi-FI`, `fr-CA`, `fr-FR`, `el-GR`, `he-IL`, `hi-IN`, `hu-HU`, `id-ID`, `it-IT`, `ja-JP`, `ko-KR`, `ms-MY`, `nb-NO`, `pl-PL`, `pt-BR`, `pt-PT`, `ro-RO`, `ru-RU`, `sk-SK`, `es-MX`, `es-ES`, `sv-SE`, `th-TH`, `tr-TR`, `uk-UA`, `vi-VN` ## Examples **Request** ```json { "notes": { "enabled": true, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" }, "paymentButton": { "enabled": true, "label": "Pay Now", "order": 0 } } ``` **Response** ```json { "isSuccess": true, "responseData": "332-c277b704-1301", "responseText": "Success" } ``` **SDK Code** ```python UpdatePayLink import requests url = "https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301" payload = { "notes": { "enabled": True, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" }, "paymentButton": { "enabled": True, "label": "Pay Now", "order": 0 } } headers = { "requestToken": "", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript UpdatePayLink const url = 'https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301'; const options = { method: 'PUT', headers: {requestToken: '', 'Content-Type': 'application/json'}, body: '{"notes":{"enabled":true,"header":"Additional Notes","order":0,"placeholder":"Enter any additional notes here","value":""},"paymentButton":{"enabled":true,"label":"Pay Now","order":0}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go UpdatePayLink package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301" payload := strings.NewReader("{\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n }\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("requestToken", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby UpdatePayLink require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n }\n}" response = http.request(request) puts response.read_body ``` ```java UpdatePayLink import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n }\n}") .asString(); ``` ```php UpdatePayLink request('PUT', 'https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301', [ 'body' => '{ "notes": { "enabled": true, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" }, "paymentButton": { "enabled": true, "label": "Pay Now", "order": 0 } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp UpdatePayLink using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301"); var request = new RestRequest(Method.PUT); request.AddHeader("requestToken", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift UpdatePayLink import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "notes": [ "enabled": true, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" ], "paymentButton": [ "enabled": true, "label": "Pay Now", "order": 0 ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentLink/update/332-c277b704-1301")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > If you're a software company, you're a payments company™