StrimzStrimz
Guides

Send an invoice

Line items, an emailed Pay link, paid through hosted checkout.

A Strimz invoice is a payment session with line items, a customer email, and a due date. Strimz emails the customer the line items with a Pay button that opens the hosted checkout, and backs the whole thing with a normal PaymentSession. Your existing webhooks fire exactly as they do for any other session.

Create

const invoice = await strimz.invoices.create({
  customerName: 'Acme Inc.',
  customerEmail: 'ap@acme.com',
  currency: 'USDC',
  lineItems: [
    { description: 'Hosting', quantity: 1, unitAmount: '50000000' }, // 50 USDC
    { description: 'Support', quantity: 2, unitAmount: '10000000' }, // 10 USDC × 2
  ],
  note: 'Net 14',
  dueInDays: 14,
})

The number is a per-merchant sequence (<year>-<NNNN>, for example 2026-0001). The sessionId is a real PaymentSession, and the customer pays it like any other one-shot session. There is no public invoice page or PDF link; you can download a PDF from the invoice in your dashboard.

Send

await strimz.invoices.send(invoice.id)

This emails the customer at customerEmail with the invoice number, note, line items and total, and a Pay button that links to the hosted checkout page.

If customerEmail is null, send() returns a 403. Invoices without an email can be paid via direct link, but Strimz won't deliver them for you.

Lifecycle

draft  →  sent  →  paid
              ↘   overdue

An hourly scheduler job flips sent invoices past dueAt to overdue and fires invoice.overdue. Use this webhook to chase the customer. The AutoPay Agent doesn't follow up on overdue invoices. Any invoice that isn't paid can be voided.

Void

await strimz.invoices.void(invoice.id)

Sets the invoice's status to void and cancels the backing payment session. You can't void an invoice that's already paid. That requires a refund instead.

On this page