# Create payment link from bill POST https://api-sandbox.payabli.com/api/PaymentLink/bill/{billId} Content-Type: application/json Generates a payment link for a bill from the bill ID. Reference: https://docs.payabli.com/developers/api-reference/paymentlink/generate-payment-link-from-bill ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Generate payment link from Bill version: endpoint_paymentLink.AddPayLinkFromBill paths: /PaymentLink/bill/{billId}: post: operationId: add-pay-link-from-bill summary: Generate payment link from Bill description: 'Generates a payment link for a bill from the bill ID. ' tags: - - subpackage_paymentLink parameters: - name: billId in: path description: The Payabli ID for the bill. required: true schema: type: integer - name: amountFixed in: query description: >- Indicates whether customer can modify the payment amount. A value of `true` means the amount isn't modifiable, a value `false` means the payor can modify the amount to pay. required: false schema: type: boolean default: true - name: mail2 in: query description: >- List of recipient email addresses. When there is more than one, separate them by a semicolon (;). required: false schema: type: string - name: requestToken in: header required: true schema: type: string - name: idempotencyKey in: header required: false schema: $ref: '#/components/schemas/type_:IdempotencyKey' responses: '200': description: Success content: application/json: schema: $ref: >- #/components/schemas/type_paymentLink:PayabliApiResponsePaymentLinks '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/type_paymentLink:PaymentPageRequestBody' components: schemas: type_:IdempotencyKey: type: string type_:Enabled: type: boolean type_:Order: type: integer 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 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' type_:InvoiceElement: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' invoiceLink: $ref: '#/components/schemas/type_:LabelElement' description: Link to invoice order: $ref: '#/components/schemas/type_:Order' viewInvoiceDetails: $ref: '#/components/schemas/type_:LabelElement' description: Link to view invoice details type_:Element: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' order: $ref: '#/components/schemas/type_:Order' 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 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' type_:MethodsList: type: object properties: amex: type: boolean description: When `true`, American Express is accepted. applePay: type: boolean description: When `true`, Apple Pay is accepted. googlePay: type: boolean description: When `true`, Google Pay is accepted. discover: type: boolean description: When `true`, Discover is accepted. eCheck: type: boolean description: When `true`, ACH is accepted. mastercard: type: boolean description: When `true`, Mastercard is accepted. visa: type: boolean description: When `true`, Visa is accepted. type_:MethodElementSettingsApplePayButtonStyle: type: string enum: - value: black - value: white-outline - value: white default: black type_:MethodElementSettingsApplePayButtonType: type: string enum: - value: plain - value: buy - value: donate - value: check-out - value: book - value: continue - value: top-up - value: order - value: rent - value: support - value: contribute - value: tip - value: pay default: pay type_:MethodElementSettingsApplePayLanguage: type: string enum: - value: en-US - value: ar-AB - value: ca-ES - value: zh-CN - value: zh-HK - value: zh-TW - value: hr-HR - value: cs-CZ - value: da-DK - value: de-DE - value: nl-NL - value: en-AU - value: en-GB - value: fi-FI - value: fr-CA - value: fr-FR - value: el-GR - value: he-IL - value: hi-IN - value: hu-HU - value: id-ID - value: it-IT - value: ja-JP - value: ko-KR - value: ms-MY - value: nb-NO - value: pl-PL - value: pt-BR - value: pt-PT - value: ro-RO - value: ru-RU - value: sk-SK - value: es-MX - value: es-ES - value: sv-SE - value: th-TH - value: tr-TR - value: uk-UA - value: vi-VN default: en-US type_:MethodElementSettingsApplePay: type: object properties: buttonStyle: $ref: '#/components/schemas/type_:MethodElementSettingsApplePayButtonStyle' description: >- The Apple Pay button style. See [Apple Pay Button Style](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-style) for more information. buttonType: $ref: '#/components/schemas/type_:MethodElementSettingsApplePayButtonType' description: >- The text on Apple Pay button. See [Apple Pay Button Type](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-type) for more information. language: $ref: '#/components/schemas/type_:MethodElementSettingsApplePayLanguage' description: >- The Apple Pay button locale. See [Apple Pay Button Language](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-language) for more information. type_:MethodElementSettings: type: object properties: applePay: $ref: '#/components/schemas/type_:MethodElementSettingsApplePay' type_:MethodElement: type: object properties: allMethodsChecked: type: boolean description: Flag indicating if all allowed payment methods will be pre-selected. enabled: $ref: '#/components/schemas/type_:Enabled' header: type: string description: Header text for section methods: $ref: '#/components/schemas/type_:MethodsList' order: $ref: '#/components/schemas/type_:Order' settings: $ref: '#/components/schemas/type_:MethodElementSettings' description: Settings for wallet payment methods. type_:PayorFields: type: object properties: display: type: boolean description: Flag indicating if the input field will show in container fixed: type: boolean description: Flag indicating if the value in input field is read-only or not. identifier: type: boolean description: Flag indicating if the input field is a customer identifier label: type: string description: Label to display for field name: type: string description: >- Name of field to show. Should be one of the standard customer fields or a custom field name order: $ref: '#/components/schemas/type_:Order' required: type: boolean description: Flag indicating if the input field is required for validation validation: type: string description: |- Type of validation to apply to the input field Accepted values: - alpha for alphabetical - numbers for numeric - text for alphanumeric - email for masked email address input - phone for US phone numbers value: type: string description: Pre-populated value for field width: type: integer description: >- Numeric value indicating the size of input relative to the container. Accepted values: - 4 = 1/3 - 6 = 1/2 - 8 = 2/3 - 12 = 3/3 type_:PayorElement: type: object properties: enabled: $ref: '#/components/schemas/type_:Enabled' fields: type: array items: $ref: '#/components/schemas/type_:PayorFields' description: Array of Customer/Payor fields to show in section header: type: string description: Custom header text for section order: $ref: '#/components/schemas/type_:Order' 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' type_:FileContentFtype: type: string enum: - value: pdf - value: doc - value: docx - value: jpg - value: jpeg - value: png - value: gif - value: txt 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 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 type_paymentLink:PaymentPageRequestBody: type: object properties: contactUs: $ref: '#/components/schemas/type_:ContactElement' description: ContactUs section of payment link page invoices: $ref: '#/components/schemas/type_:InvoiceElement' description: Invoices 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_:MethodElement' description: Payment methods section of payment link page payor: $ref: '#/components/schemas/type_:PayorElement' description: Customer/Payor section of payment link page review: $ref: '#/components/schemas/type_:HeaderElement' description: Review section of payment link page settings: $ref: '#/components/schemas/type_:PagelinkSetting' description: Settings section of payment link page type_:IsSuccess: type: boolean type_:ResponseText: type: string 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 ``` ## SDK Code Examples ```python GeneratePaymentLink from payabli import ( ContactElement, Element, HeaderElement, LabelElement, MethodElement, MethodsList, NoteElement, PageElement, PagelinkSetting, PayorElement, PayorFields, payabli, ) client = payabli( api_key="YOUR_API_KEY", ) client.payment_link.add_pay_link_from_bill( bill_id=23548884, mail_2="jo@example.com; ceo@example.com", contact_us=ContactElement( email_label="Email", enabled=True, header="Contact Us", order=0, payment_icons=True, phone_label="Phone", ), logo=Element( enabled=True, order=0, ), message_before_paying=LabelElement( enabled=True, label="Please review your payment details", order=0, ), notes=NoteElement( enabled=True, header="Additional Notes", order=0, placeholder="Enter any additional notes here", value="", ), page=PageElement( description="Get paid securely", enabled=True, header="Payment Page", order=0, ), payment_button=LabelElement( enabled=True, label="Pay Now", order=0, ), payment_methods=MethodElement( all_methods_checked=True, enabled=True, header="Payment Methods", methods=MethodsList( amex=True, apple_pay=True, discover=True, e_check=True, mastercard=True, visa=True, ), order=0, ), payor=PayorElement( enabled=True, fields=[ PayorFields( display=True, fixed=True, identifier=True, label="Full Name", name="fullName", order=0, required=True, validation="alpha", value="", width=0, ) ], header="Payor Information", order=0, ), review=HeaderElement( enabled=True, header="Review Payment", order=0, ), settings=PagelinkSetting( color="#000000", language="en", ), ) ``` ```typescript GeneratePaymentLink import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.paymentLink.addPayLinkFromBill(23548884, { mail2: "jo@example.com; ceo@example.com", 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, enabled: true, header: "Payment Methods", methods: { amex: true, applePay: true, discover: true, eCheck: true, mastercard: true, visa: true }, order: 0 }, payor: { enabled: true, fields: [{ display: true, fixed: true, identifier: true, label: "Full Name", name: "fullName", order: 0, required: true, validation: "alpha", value: "", width: 0 }], header: "Payor Information", order: 0 }, review: { enabled: true, header: "Review Payment", order: 0 }, settings: { color: "#000000", language: "en" } } }); ``` ```go GeneratePaymentLink import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.PaymentLink.AddPayLinkFromBill( context.TODO(), 23548884, &sdkgo.PayLinkDataBill{ Mail2: sdkgo.String( "jo@example.com; ceo@example.com", ), Body: &sdkgo.PaymentPageRequestBody{ ContactUs: &sdkgo.ContactElement{ EmailLabel: sdkgo.String( "Email", ), Enabled: sdkgo.Bool( true, ), Header: sdkgo.String( "Contact Us", ), Order: sdkgo.Int( 0, ), PaymentIcons: sdkgo.Bool( true, ), PhoneLabel: sdkgo.String( "Phone", ), }, Logo: &sdkgo.Element{ Enabled: sdkgo.Bool( true, ), Order: sdkgo.Int( 0, ), }, MessageBeforePaying: &sdkgo.LabelElement{ Enabled: sdkgo.Bool( true, ), Label: sdkgo.String( "Please review your payment details", ), Order: sdkgo.Int( 0, ), }, Notes: &sdkgo.NoteElement{ Enabled: sdkgo.Bool( true, ), Header: sdkgo.String( "Additional Notes", ), Order: sdkgo.Int( 0, ), Placeholder: sdkgo.String( "Enter any additional notes here", ), Value: sdkgo.String( "", ), }, Page: &sdkgo.PageElement{ Description: sdkgo.String( "Get paid securely", ), Enabled: sdkgo.Bool( true, ), Header: sdkgo.String( "Payment Page", ), Order: sdkgo.Int( 0, ), }, PaymentButton: &sdkgo.LabelElement{ Enabled: sdkgo.Bool( true, ), Label: sdkgo.String( "Pay Now", ), Order: sdkgo.Int( 0, ), }, PaymentMethods: &sdkgo.MethodElement{ AllMethodsChecked: sdkgo.Bool( true, ), Enabled: sdkgo.Bool( true, ), Header: sdkgo.String( "Payment Methods", ), Methods: &sdkgo.MethodsList{ Amex: sdkgo.Bool( true, ), ApplePay: sdkgo.Bool( true, ), Discover: sdkgo.Bool( true, ), ECheck: sdkgo.Bool( true, ), Mastercard: sdkgo.Bool( true, ), Visa: sdkgo.Bool( true, ), }, Order: sdkgo.Int( 0, ), }, Payor: &sdkgo.PayorElement{ Enabled: sdkgo.Bool( true, ), Fields: []*sdkgo.PayorFields{ &sdkgo.PayorFields{ Display: sdkgo.Bool( true, ), Fixed: sdkgo.Bool( true, ), Identifier: sdkgo.Bool( true, ), Label: sdkgo.String( "Full Name", ), Name: sdkgo.String( "fullName", ), Order: sdkgo.Int( 0, ), Required: sdkgo.Bool( true, ), Validation: sdkgo.String( "alpha", ), Value: sdkgo.String( "", ), Width: sdkgo.Int( 0, ), }, }, Header: sdkgo.String( "Payor Information", ), Order: sdkgo.Int( 0, ), }, Review: &sdkgo.HeaderElement{ Enabled: sdkgo.Bool( true, ), Header: sdkgo.String( "Review Payment", ), Order: sdkgo.Int( 0, ), }, Settings: &sdkgo.PagelinkSetting{ Color: sdkgo.String( "#000000", ), Language: sdkgo.String( "en", ), }, }, }, ) ``` ```csharp GeneratePaymentLink using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.PaymentLink.AddPayLinkFromBillAsync( 23548884, new PayLinkDataBill { Mail2 = "jo@example.com; ceo@example.com", Body = new PaymentPageRequestBody { ContactUs = new ContactElement { EmailLabel = "Email", Enabled = true, Header = "Contact Us", Order = 0, PaymentIcons = true, PhoneLabel = "Phone", }, Logo = new Element { Enabled = true, Order = 0 }, MessageBeforePaying = new LabelElement { Enabled = true, Label = "Please review your payment details", Order = 0, }, Notes = new NoteElement { Enabled = true, Header = "Additional Notes", Order = 0, Placeholder = "Enter any additional notes here", Value = "", }, Page = new PageElement { Description = "Get paid securely", Enabled = true, Header = "Payment Page", Order = 0, }, PaymentButton = new LabelElement { Enabled = true, Label = "Pay Now", Order = 0, }, PaymentMethods = new MethodElement { AllMethodsChecked = true, Enabled = true, Header = "Payment Methods", Methods = new MethodsList { Amex = true, ApplePay = true, Discover = true, ECheck = true, Mastercard = true, Visa = true, }, Order = 0, }, Payor = new PayorElement { Enabled = true, Fields = new List() { new PayorFields { Display = true, Fixed = true, Identifier = true, Label = "Full Name", Name = "fullName", Order = 0, Required = true, Validation = "alpha", Value = "", Width = 0, }, }, Header = "Payor Information", Order = 0, }, Review = new HeaderElement { Enabled = true, Header = "Review Payment", Order = 0, }, Settings = new PagelinkSetting { Color = "#000000", Language = "en" }, }, } ); ``` ```ruby GeneratePaymentLink require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentLink/bill/23548884?mail2=jo%40example.com%3B+ceo%40example.com") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.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 \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"amex\": true,\n \"applePay\": true,\n \"discover\": true,\n \"eCheck\": true,\n \"mastercard\": true,\n \"visa\": true\n },\n \"order\": 0\n },\n \"payor\": {\n \"enabled\": true,\n \"fields\": [\n {\n \"display\": true,\n \"fixed\": true,\n \"identifier\": true,\n \"label\": \"Full Name\",\n \"name\": \"fullName\",\n \"order\": 0,\n \"required\": true,\n \"validation\": \"alpha\",\n \"value\": \"\",\n \"width\": 0\n }\n ],\n \"header\": \"Payor Information\",\n \"order\": 0\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 GeneratePaymentLink HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/PaymentLink/bill/23548884?mail2=jo%40example.com%3B+ceo%40example.com") .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 \"enabled\": true,\n \"header\": \"Payment Methods\",\n \"methods\": {\n \"amex\": true,\n \"applePay\": true,\n \"discover\": true,\n \"eCheck\": true,\n \"mastercard\": true,\n \"visa\": true\n },\n \"order\": 0\n },\n \"payor\": {\n \"enabled\": true,\n \"fields\": [\n {\n \"display\": true,\n \"fixed\": true,\n \"identifier\": true,\n \"label\": \"Full Name\",\n \"name\": \"fullName\",\n \"order\": 0,\n \"required\": true,\n \"validation\": \"alpha\",\n \"value\": \"\",\n \"width\": 0\n }\n ],\n \"header\": \"Payor Information\",\n \"order\": 0\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 GeneratePaymentLink request('POST', 'https://api-sandbox.payabli.com/api/PaymentLink/bill/23548884?mail2=jo%40example.com%3B+ceo%40example.com', [ '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, "enabled": true, "header": "Payment Methods", "methods": { "amex": true, "applePay": true, "discover": true, "eCheck": true, "mastercard": true, "visa": true }, "order": 0 }, "payor": { "enabled": true, "fields": [ { "display": true, "fixed": true, "identifier": true, "label": "Full Name", "name": "fullName", "order": 0, "required": true, "validation": "alpha", "value": "", "width": 0 } ], "header": "Payor Information", "order": 0 }, "review": { "enabled": true, "header": "Review Payment", "order": 0 }, "settings": { "color": "#000000", "language": "en" } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift GeneratePaymentLink 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, "enabled": true, "header": "Payment Methods", "methods": [ "amex": true, "applePay": true, "discover": true, "eCheck": true, "mastercard": true, "visa": true ], "order": 0 ], "payor": [ "enabled": true, "fields": [ [ "display": true, "fixed": true, "identifier": true, "label": "Full Name", "name": "fullName", "order": 0, "required": true, "validation": "alpha", "value": "", "width": 0 ] ], "header": "Payor Information", "order": 0 ], "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/bill/23548884?mail2=jo%40example.com%3B+ceo%40example.com")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```