# Update Pay Out payment link content PATCH https://api-sandbox.payabli.com/api/PaymentLink/updateOut/{paylinkId} Content-Type: application/json Updates the payment page content for a Pay Out payment link. Use this to change the branding, messaging, payment methods offered, or other page configuration. Reference: https://docs.payabli.com/developers/api-reference/paymentlink/update-payout-payment-link-content ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: payabliApi version: 1.0.0 paths: /PaymentLink/updateOut/{paylinkId}: patch: operationId: update-pay-link-out-from-id summary: Update Pay Out payment link content description: >- Updates the payment page content for a Pay Out payment link. Use this to change the branding, messaging, payment methods offered, or other page configuration. tags: - subpackage_paymentLink parameters: - name: paylinkId in: path description: ID for the payment link. required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: >- #/components/schemas/type_paymentLink:PayabliApiResponsePaymentLinks '400': description: Bad request/ invalid data content: application/json: schema: description: Any type '401': description: Unauthorized request. content: application/json: schema: description: Any type '500': description: Internal API Error content: application/json: schema: description: Any type '503': description: Database connection error content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/type_paymentLink:PaymentPageRequestBodyOut' servers: - url: https://api-sandbox.payabli.com/api - url: https://api.payabli.com/api components: schemas: type_:Enabled: type: boolean description: Toggles whether the section or element is enabled. title: Enabled type_:Order: type: integer description: Order of element or section in container. title: Order type_:ContactElement: type: object properties: emailLabel: type: string description: Custom content for email enabled: $ref: '#/components/schemas/type_:Enabled' header: type: string description: Header text for section order: $ref: '#/components/schemas/type_:Order' paymentIcons: type: boolean description: Flag indicating if icons for accepted card brands will be shown phoneLabel: type: string description: Custom content for phone number title: ContactElement type_:Element: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' order: $ref: '#/components/schemas/type_:Order' title: Element type_:LabelElement: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' label: type: string description: Label to display for section or element order: $ref: '#/components/schemas/type_:Order' title: LabelElement type_:NoteElement: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' header: type: string description: Header text for section order: $ref: '#/components/schemas/type_:Order' placeholder: type: string description: Placeholder text for input field value: type: string description: Pre-populated value for input field title: NoteElement type_:PageElement: type: object properties: description: type: string description: Page description in header enabled: $ref: '#/components/schemas/type_:Enabled' header: type: string description: Page header order: $ref: '#/components/schemas/type_:Order' title: PageElement type___moneyOutTypes__:MethodsListOut: type: object properties: ach: type: boolean description: When `true`, ACH bank transfer is offered as a payout method. check: type: boolean description: When `true`, physical check is offered as a payout method. vcard: type: boolean description: When `true`, virtual card (vCard) is offered as a payout method. description: >- Payment methods available for Pay Out payment links. Controls which payout options are offered to the vendor. title: MethodsListOut type___moneyOutTypes__:MethodElementOut: type: object properties: allMethodsChecked: type: boolean description: Flag indicating if all allowed payment methods will be pre-selected. allowMultipleMethods: type: boolean description: >- When `true`, the vendor can select from multiple payment methods. When `false`, only the default method is shown. defaultMethod: type: string description: >- The default payment method to highlight on the payment link page. For example, `"vcard"`, `"ach"`, or `"check"`. enabled: type: boolean description: >- When `true`, the payment methods section is displayed on the payment link page. header: type: string description: Header text for the payment methods section. methods: $ref: '#/components/schemas/type___moneyOutTypes__:MethodsListOut' order: type: integer description: Display order of the payment methods section on the page. showPreviewVirtualCard: type: boolean description: >- When `true`, a preview of the virtual card is shown on the payment link page. description: Configuration for payment method selection on Pay Out payment links. title: MethodElementOut type_:HeaderElement: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' header: type: string description: Header text for section order: $ref: '#/components/schemas/type_:Order' title: HeaderElement type_:FileContentFtype: type: string enum: - pdf - doc - docx - jpg - jpeg - png - gif - txt description: The MIME type of the file (if content is provided) title: FileContentFtype type_:FileContent: type: object properties: fContent: type: string description: >- Content of file, Base64-encoded. Ignored if furl is specified. Max upload size is 30 MB. filename: type: string description: The name of the attached file. ftype: $ref: '#/components/schemas/type_:FileContentFtype' description: The MIME type of the file (if content is provided) furl: type: string description: Optional URL provided to show or download the file remotely description: Contains details about a file. Max upload size is 30 MB. title: FileContent type_:PagelinkSetting: type: object properties: color: type: string description: 'An HTML color code in format #RRGGBB' customCssUrl: type: string description: Complete URL to a custom CSS file to be loaded with the page language: type: string description: Two-letter code following ISO 639-1 pageLogo: $ref: '#/components/schemas/type_:FileContent' description: Object containing logo file to upload/ use in page redirectAfterApprove: type: boolean description: >- Flag indicating if the capability for redirection in the page will be activated redirectAfterApproveUrl: type: string description: Complete URL where the page will be redirected after completion title: PagelinkSetting type_paymentLink:PaymentPageRequestBodyOut: type: object properties: contactUs: $ref: '#/components/schemas/type_:ContactElement' description: ContactUs section of payment link page. logo: $ref: '#/components/schemas/type_:Element' description: Logo section of payment link page. messageBeforePaying: $ref: '#/components/schemas/type_:LabelElement' description: Message section of payment link page. notes: $ref: '#/components/schemas/type_:NoteElement' description: Notes section of payment link page. page: $ref: '#/components/schemas/type_:PageElement' description: Page header section of payment link page. paymentButton: $ref: '#/components/schemas/type_:LabelElement' description: Payment button section of payment link page. paymentMethods: $ref: '#/components/schemas/type___moneyOutTypes__:MethodElementOut' description: >- Payment methods section of payment link page. Use this to configure which payout methods (ACH, vCard, check) are offered to the vendor. review: $ref: '#/components/schemas/type_:HeaderElement' description: Review section of payment link page. bills: $ref: '#/components/schemas/type_:Element' description: Bills section of payment link page. settings: $ref: '#/components/schemas/type_:PagelinkSetting' description: Settings section of payment link page. description: >- Configuration for the Pay Out payment link page. Controls branding, messaging, vendor fields, and which payout methods are offered to the vendor. title: PaymentPageRequestBodyOut type_:IsSuccess: type: boolean description: >- Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. title: IsSuccess type_:ResponseText: type: string description: 'Response text for operation: ''Success'' or ''Declined''.' title: ResponseText type_paymentLink:PayabliApiResponsePaymentLinks: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseData: type: string description: >- If `isSuccess` = true, this contains the payment link identifier. If `isSuccess` = false, this contains the reason of the error. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - isSuccess - responseText title: PayabliApiResponsePaymentLinks type_:Responsedata: type: object additionalProperties: description: Any type description: The object containing the response data. title: Responsedata type_:PayabliApiResponse: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseData: $ref: '#/components/schemas/type_:Responsedata' responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText title: PayabliApiResponse securitySchemes: ApiKeyAuth: type: apiKey in: header name: requestToken ``` ## SDK Code Examples ```python UpdatePayLinkOutFull import requests url = "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234" payload = { "contactUs": { "emailLabel": "Email", "enabled": True, "header": "Contact Us", "order": 0, "paymentIcons": True, "phoneLabel": "Phone" }, "logo": { "enabled": True, "order": 0 }, "messageBeforePaying": { "enabled": True, "label": "Please review your payment details", "order": 0 }, "notes": { "enabled": True, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" }, "page": { "description": "Get paid securely", "enabled": True, "header": "Payment Page", "order": 0 }, "paymentButton": { "enabled": True, "label": "Pay Now", "order": 0 }, "paymentMethods": { "allMethodsChecked": True, "allowMultipleMethods": True, "defaultMethod": "vcard", "enabled": True, "header": "Payment Methods", "methods": { "ach": True, "check": True, "vcard": True }, "order": 0, "showPreviewVirtualCard": True }, "review": { "enabled": True, "header": "Review Payment", "order": 0 }, "settings": { "color": "#000000", "language": "en" } } headers = { "requestToken": "", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript UpdatePayLinkOutFull const url = 'https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234'; const options = { method: 'PATCH', headers: {requestToken: '', 'Content-Type': 'application/json'}, body: '{"contactUs":{"emailLabel":"Email","enabled":true,"header":"Contact Us","order":0,"paymentIcons":true,"phoneLabel":"Phone"},"logo":{"enabled":true,"order":0},"messageBeforePaying":{"enabled":true,"label":"Please review your payment details","order":0},"notes":{"enabled":true,"header":"Additional Notes","order":0,"placeholder":"Enter any additional notes here","value":""},"page":{"description":"Get paid securely","enabled":true,"header":"Payment Page","order":0},"paymentButton":{"enabled":true,"label":"Pay Now","order":0},"paymentMethods":{"allMethodsChecked":true,"allowMultipleMethods":true,"defaultMethod":"vcard","enabled":true,"header":"Payment Methods","methods":{"ach":true,"check":true,"vcard":true},"order":0,"showPreviewVirtualCard":true},"review":{"enabled":true,"header":"Review Payment","order":0},"settings":{"color":"#000000","language":"en"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go UpdatePayLinkOutFull package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234" payload := strings.NewReader("{\n \"contactUs\": {\n \"emailLabel\": \"Email\",\n \"enabled\": true,\n \"header\": \"Contact Us\",\n \"order\": 0,\n \"paymentIcons\": true,\n \"phoneLabel\": \"Phone\"\n },\n \"logo\": {\n \"enabled\": true,\n \"order\": 0\n },\n \"messageBeforePaying\": {\n \"enabled\": true,\n \"label\": \"Please review your payment details\",\n \"order\": 0\n },\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"page\": {\n \"description\": \"Get paid securely\",\n \"enabled\": true,\n \"header\": \"Payment Page\",\n \"order\": 0\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": true,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": true,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n },\n \"review\": {\n \"enabled\": true,\n \"header\": \"Review Payment\",\n \"order\": 0\n },\n \"settings\": {\n \"color\": \"#000000\",\n \"language\": \"en\"\n }\n}") req, _ := http.NewRequest("PATCH", 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 UpdatePayLinkOutFull require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"contactUs\": {\n \"emailLabel\": \"Email\",\n \"enabled\": true,\n \"header\": \"Contact Us\",\n \"order\": 0,\n \"paymentIcons\": true,\n \"phoneLabel\": \"Phone\"\n },\n \"logo\": {\n \"enabled\": true,\n \"order\": 0\n },\n \"messageBeforePaying\": {\n \"enabled\": true,\n \"label\": \"Please review your payment details\",\n \"order\": 0\n },\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"page\": {\n \"description\": \"Get paid securely\",\n \"enabled\": true,\n \"header\": \"Payment Page\",\n \"order\": 0\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": true,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": true,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n },\n \"review\": {\n \"enabled\": true,\n \"header\": \"Review Payment\",\n \"order\": 0\n },\n \"settings\": {\n \"color\": \"#000000\",\n \"language\": \"en\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java UpdatePayLinkOutFull import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"contactUs\": {\n \"emailLabel\": \"Email\",\n \"enabled\": true,\n \"header\": \"Contact Us\",\n \"order\": 0,\n \"paymentIcons\": true,\n \"phoneLabel\": \"Phone\"\n },\n \"logo\": {\n \"enabled\": true,\n \"order\": 0\n },\n \"messageBeforePaying\": {\n \"enabled\": true,\n \"label\": \"Please review your payment details\",\n \"order\": 0\n },\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"page\": {\n \"description\": \"Get paid securely\",\n \"enabled\": true,\n \"header\": \"Payment Page\",\n \"order\": 0\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": true,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": true,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n },\n \"review\": {\n \"enabled\": true,\n \"header\": \"Review Payment\",\n \"order\": 0\n },\n \"settings\": {\n \"color\": \"#000000\",\n \"language\": \"en\"\n }\n}") .asString(); ``` ```php UpdatePayLinkOutFull request('PATCH', 'https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234', [ 'body' => '{ "contactUs": { "emailLabel": "Email", "enabled": true, "header": "Contact Us", "order": 0, "paymentIcons": true, "phoneLabel": "Phone" }, "logo": { "enabled": true, "order": 0 }, "messageBeforePaying": { "enabled": true, "label": "Please review your payment details", "order": 0 }, "notes": { "enabled": true, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" }, "page": { "description": "Get paid securely", "enabled": true, "header": "Payment Page", "order": 0 }, "paymentButton": { "enabled": true, "label": "Pay Now", "order": 0 }, "paymentMethods": { "allMethodsChecked": true, "allowMultipleMethods": true, "defaultMethod": "vcard", "enabled": true, "header": "Payment Methods", "methods": { "ach": true, "check": true, "vcard": true }, "order": 0, "showPreviewVirtualCard": true }, "review": { "enabled": true, "header": "Review Payment", "order": 0 }, "settings": { "color": "#000000", "language": "en" } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp UpdatePayLinkOutFull using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234"); var request = new RestRequest(Method.PATCH); request.AddHeader("requestToken", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"contactUs\": {\n \"emailLabel\": \"Email\",\n \"enabled\": true,\n \"header\": \"Contact Us\",\n \"order\": 0,\n \"paymentIcons\": true,\n \"phoneLabel\": \"Phone\"\n },\n \"logo\": {\n \"enabled\": true,\n \"order\": 0\n },\n \"messageBeforePaying\": {\n \"enabled\": true,\n \"label\": \"Please review your payment details\",\n \"order\": 0\n },\n \"notes\": {\n \"enabled\": true,\n \"header\": \"Additional Notes\",\n \"order\": 0,\n \"placeholder\": \"Enter any additional notes here\",\n \"value\": \"\"\n },\n \"page\": {\n \"description\": \"Get paid securely\",\n \"enabled\": true,\n \"header\": \"Payment Page\",\n \"order\": 0\n },\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Pay Now\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": true,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": true,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n },\n \"review\": {\n \"enabled\": true,\n \"header\": \"Review Payment\",\n \"order\": 0\n },\n \"settings\": {\n \"color\": \"#000000\",\n \"language\": \"en\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift UpdatePayLinkOutFull import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "contactUs": [ "emailLabel": "Email", "enabled": true, "header": "Contact Us", "order": 0, "paymentIcons": true, "phoneLabel": "Phone" ], "logo": [ "enabled": true, "order": 0 ], "messageBeforePaying": [ "enabled": true, "label": "Please review your payment details", "order": 0 ], "notes": [ "enabled": true, "header": "Additional Notes", "order": 0, "placeholder": "Enter any additional notes here", "value": "" ], "page": [ "description": "Get paid securely", "enabled": true, "header": "Payment Page", "order": 0 ], "paymentButton": [ "enabled": true, "label": "Pay Now", "order": 0 ], "paymentMethods": [ "allMethodsChecked": true, "allowMultipleMethods": true, "defaultMethod": "vcard", "enabled": true, "header": "Payment Methods", "methods": [ "ach": true, "check": true, "vcard": true ], "order": 0, "showPreviewVirtualCard": true ], "review": [ "enabled": true, "header": "Review Payment", "order": 0 ], "settings": [ "color": "#000000", "language": "en" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ``` ```python ChangeOfferedMethods import requests url = "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234" payload = { "paymentButton": { "enabled": True, "label": "Choose Payment Method", "order": 0 }, "paymentMethods": { "allMethodsChecked": False, "allowMultipleMethods": True, "defaultMethod": "vcard", "enabled": True, "header": "Payment Methods", "methods": { "ach": True, "check": False, "vcard": True }, "order": 0, "showPreviewVirtualCard": True } } headers = { "requestToken": "", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript ChangeOfferedMethods const url = 'https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234'; const options = { method: 'PATCH', headers: {requestToken: '', 'Content-Type': 'application/json'}, body: '{"paymentButton":{"enabled":true,"label":"Choose Payment Method","order":0},"paymentMethods":{"allMethodsChecked":false,"allowMultipleMethods":true,"defaultMethod":"vcard","enabled":true,"header":"Payment Methods","methods":{"ach":true,"check":false,"vcard":true},"order":0,"showPreviewVirtualCard":true}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go ChangeOfferedMethods package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234" payload := strings.NewReader("{\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Choose Payment Method\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": false,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": false,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n }\n}") req, _ := http.NewRequest("PATCH", 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 ChangeOfferedMethods require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Choose Payment Method\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": false,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": false,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n }\n}" response = http.request(request) puts response.read_body ``` ```java ChangeOfferedMethods import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Choose Payment Method\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": false,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": false,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n }\n}") .asString(); ``` ```php ChangeOfferedMethods request('PATCH', 'https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234', [ 'body' => '{ "paymentButton": { "enabled": true, "label": "Choose Payment Method", "order": 0 }, "paymentMethods": { "allMethodsChecked": false, "allowMultipleMethods": true, "defaultMethod": "vcard", "enabled": true, "header": "Payment Methods", "methods": { "ach": true, "check": false, "vcard": true }, "order": 0, "showPreviewVirtualCard": true } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp ChangeOfferedMethods using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234"); var request = new RestRequest(Method.PATCH); request.AddHeader("requestToken", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"paymentButton\": {\n \"enabled\": true,\n \"label\": \"Choose Payment Method\",\n \"order\": 0\n },\n \"paymentMethods\": {\n \"allMethodsChecked\": false,\n \"allowMultipleMethods\": true,\n \"defaultMethod\": \"vcard\",\n \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"ach\": true,\n \"check\": false,\n \"vcard\": true\n },\n \"order\": 0,\n \"showPreviewVirtualCard\": true\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift ChangeOfferedMethods import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentButton": [ "enabled": true, "label": "Choose Payment Method", "order": 0 ], "paymentMethods": [ "allMethodsChecked": false, "allowMultipleMethods": true, "defaultMethod": "vcard", "enabled": true, "header": "Payment Methods", "methods": [ "ach": true, "check": false, "vcard": true ], "order": 0, "showPreviewVirtualCard": true ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentLink/updateOut/2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```