Send a Payment Link
Learn how to use the Payabli API to send a payment link to a customer via email or SMS
This guide explains how to send a payment link to a customer using the Payabli API. You can send payment links to customers via email or SMS (if pay by SMS is enabled in your account).
Before you get started, you need the payLinkId
value returned in the response when you created the payment link and the customer email address.
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.
Build the request
First, choose an endpoint. If you’re testing, use the Sandbox endpoint. for your target environment.
Authenticate
Authenticate by sending your API token in the request header with the key requestToken
:
--header 'requestToken: API TOKEN'
Path parameter
For complete details about available parameters, see the API reference for this endpoint.
This request has a required path parameter, payLinkId
.
The ID for the payment link to send.
Body parameter
This request has a required request body.
The channel to use to send the paylink. Allowed values are “email” and “sms”. Pay by SMS is an add-on feature that must be configured by the Payabli team. If this feature isn’t enabled on your account, you will get an error when channel
is “sms”.
When true
, attaches a PDF version of the invoice to the email. Applies only when channel
is “email”.
List of additional email addresses you want to send the paylink to, formatted as an array. Paylinks and opt-in requests are sent to the customer email address (for email) or phone number on file (for SMS), and this field is ignored when channel
is “sms”.
Example requests
Tab between the code examples to see both an SMS and email channel example request.
Example response
A successful request returns a 200 response with a JSON body.
Was this page helpful?