This endpoint is deprecated. Use Send Payment Link instead.

This guide explains how to email a payment link to a customer via the Payabli API. Before you get started, you need the payLinkId value returned in the response when you created the payment link and the customer email address.

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.

Query parameter

This request has query parameters.

mail2
string
required

List of recipient email addresses. When there is more than one, separate them by a semicolon (;).

attachfile
boolean

When true, attaches a PDF version of the invoice to the email.

Example request

This example sends the payment link with the id 332-1e1e57af-7fd3-4264-803f-df40c277b704-1301 and emails it to admin@example.com, and attaches a PDF version of the invoice.

curl --request GET \
     --url 'https://api-sandbox.payabli.com/api/PaymentLink/send/332-1e1e57af-7fd3-4264-803f-df40c277b704-1301?mail2=admin%example.com&attachfile=true' \
     --header 'accept: application/json' \
     --header 'requestToken: <API TOKEN>'

Example response

A successful request returns a 200 response with a JSON body.

Success response
{
  "responseText": "Success",
  "isSuccess": true,
  "responseData": "332-1e1e57af-7fd3-4264-803f-df40c277b704-1301"
}

Visit the API reference for the endpoint used in this guide:

Was this page helpful?