Skip to main content

Create PayPal Pay Link for Sales Invoice

POST 

/api/sales-invoices/:salesInvoiceId/paypal-payment-links

Creates a PayPal pay link that collects one sales invoice and, optionally, emails it to the customer. The payment is recorded on the invoice's sales order and allocated to this invoice when it clears. For an order invoice (kind order_mirror) the link is created on its sales order, exactly as Create PayPal Pay Link does.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Authentication: Requires Bearer token with permission to manage sales invoice payments. Returns 404 when the invoice does not exist.

Body fields (same as Create PayPal Pay Link):

  • amount (number, required) — at least 0.01 and no more than the invoice's balance due.
  • integration_instance_id (integer, required) — the connected PayPal account to collect into.
  • expires_in_days (integer, optional, 1–365, default 30).
  • email_customer (boolean, optional) — email the new link using the editable "PayPal Payment Request" email template.
  • recipient_email (string, optional) — address to email; defaults to the customer's email.
  • cc (array of strings, optional, max 10) — extra addresses to copy when email_customer is true.

The link is always created. If it cannot be emailed, email_error explains why and emailed_to is null.

Returns 409 when PayPal is not available on this account. Returns 422 when: the invoice is not issued (sales_invoice error); the PayPal account is not connected; a PayPal payment on the invoice is still clearing; PayPal doesn't accept the invoice's currency; the amount has decimals in a whole-amount currency (HUF, JPY, TWD); or the amount exceeds the amount due.

Rate limited: 30 requests/minute.

Request​

Responses​

Created

Response Headers
    Content-Type