Payment Reminders
Payment Reminders
Send payment reminders for overdue customer invoices and review manual and automatic email history.
Send payment reminder
/payment-reminders/sendSend one manual payment reminder email for all overdue unpaid invoices belonging to the selected customer in the active entity.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Customer id to send one payment reminder for. All overdue unpaid invoices for the customer are included.
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.paymentReminders.sendPaymentReminder({
customer_id: "cust_123",
language: "en-US"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"message_id": "msg_123",
"status": "sent",
"to": "customer@example.com",
"subject": "Reminder for 2 overdue invoices",
"overdue_invoice_count": 2,
"invoice_ids": [
"inv_123",
"inv_456"
]
}List payment reminder history
/payment-remindersList one record per reminder email attempt in the selected entity, ordered newest first (creation time, then id). Includes manual and automatic attempts recorded since reminder history was introduced. Older invoice activities are not reconstructed into email records. Customer and invoice values are snapshots and survive later edits or deletion. Uses the standard entity read permission and cursor pagination.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.
Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
Inclusive earliest creation instant.
Exclusive latest creation instant.
Possible values: "manual", "automatic"
Possible values: "pending", "sent", "unknown", "skipped"
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.paymentReminders.list({
limit: 20,
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
Pagination metadata including cursors and result counts
{
"data": [
{
"id": "rem_123",
"entity_id": "ent_123",
"trigger": "manual",
"status": "sent",
"to": "customer@example.com",
"subject": "Payment reminder",
"body_text": "Please review invoice INV-001.",
"customers": [
{
"id": "cus_123",
"name": "Example customer"
}
],
"invoices": [
{
"id": "inv_123",
"number": "INV-001"
}
],
"message_id": "msg_123",
"created_at": "2026-09-23T10:00:00.000Z",
"sent_at": "2026-09-23T10:00:01.000Z"
}
],
"pagination": {
"total": 1,
"next_cursor": null,
"prev_cursor": null,
"has_more": false
}
}