Skip to main content

Create PayPal Pay Link

POST 

/api/sales-orders/:salesOrderId/paypal-payment-links

Creates a PayPal pay link for a sales order and, optionally, emails it to the customer.

Authentication: Requires Bearer token with permission to manage sales order payments.

An order has at most one active pay link: creating a new one cancels the previous active link.

Body fields:

  • amount (number, required) — at least 0.01 and no more than the order's amount 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 order's customer email.

The link is always created. If it cannot be emailed (no address, or the template is turned off), email_error explains why and emailed_to is null.

Returns 409 when PayPal is not available on this account and 422 when the PayPal account is not connected or the amount is invalid.

Not yet available to API tokens

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

Request​

Responses​

Created

Response Headers
    Content-Type