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.
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 whenemail_customeris 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
- 201
- 401
- 403
- 404
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.