Skip to main content

Send Invoice E-mail

POST/rest/invoices/:invoice_number/send_email

Triggers either the initial invoice e-mail or a reminder e-mail to the customer associated with the invoice. The send is synchronous — the response only returns once SMTP has accepted (or rejected) the message — and the send is recorded in the dashboard's e-mail log for that invoice.

This endpoint is the same path the dashboard's "Send invoice e-mail" modal uses under the hood, so messages triggered via API and via the dashboard are indistinguishable to the recipient.

Request

invoice_numberStringrequired
Append invoice number to /rest/invoices/#invoice_number/send_email
email_typeStringrequired
One of "initial" (the full "your invoice is ready" message) or "reminder" (a follow-up nudge with the same payment link). Anything else is rejected with 422.
localeString
Optional one-shot language override for this send. One of "en", "de", "pt". When omitted or blank, the customer's e-mail is rendered in the invoice's effective_locale (per-invoice locale → channel default → "en"). Invalid values are rejected with 422. Does not change the invoice's stored locale.
Example Request
POST /rest/invoices/INV-2024-001/send_email
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"email_type": "reminder",
"locale": "de"
}

Response — 200 OK

messageString
"E-mail has been sent."
errorString
null on success
email_typeString
The type that was sent — echoes back what you requested
recipientString
The e-mail address the message was delivered to (the invoice's email)
localeString
The language the message was rendered in — your locale override if you provided one, otherwise the invoice's effective_locale
Example Response (200)
{
"message": "E-mail has been sent.",
"error": null,
"email_type": "reminder",
"recipient": "dev@betterpayment.de",
"locale": "de"
}

Error responses

StatusWhenBody
404Invoice not found for the authenticated merchant{ "message": "Invoice not found.", "error": "Invoice not found." }
422Missing or invalid email_type{ "message": "Invalid email_type.", "error": "Invalid email_type. Must be one of: initial, reminder." }
422locale provided but outside the whitelist{ "message": "Invalid locale.", "error": "Invalid locale. Must be one of: en, de, pt." }
422Invoice has no e-mail address on file{ "message": "Cannot send: invoice has no e-mail address.", "error": "Invoice has no e-mail address." }
422Invoice is inactive{ "message": "Cannot send: invoice is inactive.", "error": "Invoice is inactive." }
422SMTP / template rendering failure{ "message": "E-mail could not be sent.", "error": "<underlying error message>" }
Idempotency

This endpoint is not idempotent — each call sends an e-mail and writes an entry to the invoice's e-mail log. If you script automated reminders, throttle on your side; the API will happily send the same reminder twice.