Skip to main content

Request Customer Payment

POST 

/api/customers/:customer/request-payment

Emails the customer an account-level payment request for their outstanding balance, and records the send in the communications log. To request payment for a single order instead, use the request-payment action on that sales order (Orders collection).

The recipient defaults to the customer's billing email, falling back to their primary email; pass recipient to override. subject and body are optional templates; these placeholders are replaced before sending: {customer_name}, {total_due} (the customer's outstanding balance, formatted with currency), {days_overdue} (days since the oldest overdue due date), and {payment_instructions} (the account's configured payment instructions). When omitted, a default subject and body are used.

Set attach_statement to true to attach the customer's current open-item statement as a PDF.

Returns the logged communication entry.

Body parameters (all optional):

  • recipient (string, email): Override the destination email address.
  • subject (string, max 255): Email subject template.
  • body (string, max 10000): Email body template.
  • attach_statement (boolean): Attach the open-item statement PDF. Default false.

Errors:

  • 422 when no recipient email can be resolved (the customer has no billing or primary email and no recipient was supplied).

Authentication: Requires Bearer token (PAT). Requires permission customers.send_communications and a token with the orders scope. Rate limited to 60 requests per minute.

Request

Responses

OK

Response Headers
    Content-Type