Use Payabli’s payment link functions to generate customized payment links from invoices and send them directly to customers for payment. Use payment links to create payment requests with your accepted payment methods, branding, and invoice details without having to build or host your own payment pages. Payment links look great in email and on mobile by default, so you can focus on getting paid.

Considerations

Keep these considerations in mind when working with payment links:

  • You can create payment links for invoices created via the API.
  • If you create and send an invoice from PartnerHub or PayHub, a payment link is automatically created for the invoice.
  • You can send payment links via email or SMS (if SMS is enabled for your account).
  • A payment link’s URL structure follows a specific pattern: base URL + entrypoint identifier + payment link ID.

Send a POST request to /api/PaymentLink/{idInvoice} to create a payment link for an invoice. See the API reference for full documentation.

This example creates a payment link for the invoice with ID 329 and includes custom branding and payment options.

Generate payment link example
curl --request POST \
     --url 'https://api-sandbox.payabli.com/api/PaymentLink/329?mail2=admin%2540example.com&amountFixed=true' \
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --header 'requestToken: <API TOKEN>' \
     --data '
{
  "logo": {
    "enabled": false
  },
  "page": {
    "enabled": true,
    "header": "My header",
    "description": "this is a header"
  },
  "paymentMethods": {
    "methods": {
      "visa": true,
      "mastercard": true,
      "applePay": true,
      "eCheck": true
    },
    "enabled": true
  },
  "notes": {
    "enabled": true,
    "header": "Notes",
    "placeholder": "Placeholder",
    "value": "This is a pre-populated note"
  },
  "messageBeforePaying": {
    "enabled": true,
    "label": "Message before paying"
  },
  "paymentButton": {
    "enabled": true,
    "label": "MY PAYMENT BUTTON LABEL"
  },
  "review": {
    "enabled": true,
    "header": "Review header"
  },
  "contactUs": {
    "enabled": true,
    "header": "Contact us Header",
    "emailLabel": "Custom Email Content",
    "phoneLabel": "Custom Phone label",
    "paymentIcons": false
  },
  "settings": {
    "redirectAfterApprove": false
  }
}
'

Send a POST request to /api/PaymentLink/push/{payLinkId} to deliver a payment link to a customer via email or SMS. See the API reference for full documentation.

Pay by SMS is an add-on feature. Before you can start sending payment links by SMS, the Payabli team must configure SMS sending for your organization. Contact us for more information.

This example sends a payment link via email to the customer and an additional recipient, with a PDF invoice attached. If SMS is enabled, you can also send payment links via SMS.

curl --request POST \
  --url https://api-sandbox.payabli.com/api/PaymentLink/push/332-c277b704-1301 \
  --header 'Content-Type: application/json' \
  --header 'requestToken: API TOKEN' \
  --data '{
  "channel": "email",
  "attachFile": true,
  "additionalEmails": [
    "accounting@email.com"
  ]
}'

Send a GET request to /api/PaymentLink/{payLinkId} to retrieve information about a specific payment link. See the API reference for full documentation.

This example retrieves details for the payment link with ID 332-c277b704-1301.

Get payment link example
curl --request GET \
 --url https://api-sandbox.payabli.com/api/PaymentLink/332-c277b704-1301 \
 --header 'requestToken: <api-key>'

Send a PUT request to /api/PaymentLink/{payLinkId} to modify an existing payment link’s details. See the API reference for full documentation.

This example updates the payment link with ID 332-c277b704-1301 with new payment button text and notes.

Update payment link example
curl --request PUT \
  --url https://api-sandbox.payabli.com/api/PaymentLink/332-c277b704-1301 \
  --header 'Content-Type: application/json' \
  --header 'requestToken: <api-key>' \
  --data '{
  "paymentButton": {
    "enabled": true,
    "label": "PAY NOW"
  },
  "notes": {
    "enabled": true,
    "header": "Additional Information",
    "value": "Please include your invoice number with payment"
  }
}'

Response format

Most payment link operations return a standardized response format, where responseData contains the ID.

{
  "responseText": "Success",
  "responseData": "332-c277b704-1301",
  "pageidentifier": null,
  "isSuccess": true
}

The GET operations return either the details of a specific payment link or a list of payment links. See the endpoint references for detailed response examples.

Was this page helpful?