Take payments
Harbour Invoice
Invoices your customers pay online: create, send, get paid, and hear about it.
Harbour Invoice is an app the business switches on in Apps. The business sends invoices its customers pay online. Every payment goes through Harbour Checkout into the business's own provider account, and is recorded against the invoice automatically.
The life of an invoice
| Status | Means |
|---|---|
draft | Being written. No number, nothing to pay, can be changed or deleted. |
issued | Has its number and can be paid. Emailed to the customer if asked. |
viewed | The customer opened the link. |
partly_paid | Some of it is paid (when the business allows part payment), or a refund opened it again. |
paid | Paid in full. |
overdue | The due date passed with money still owed. |
void | Cancelled while unpaid. The number is never used again. |
Live invoices are numbered INV-0001, INV-0002 and on, with no gaps. Test invoices are numbered
TEST-…, so trying things never uses up live numbers. A paid invoice is not voided: refund the payment
from Transactions, and the invoice records the refund and opens again.
In the dashboard
Writing an invoice works like other accounting tools:
- Customers. Type in the customer field to find a saved customer; choosing one fills their email, phone and payment terms. Someone new can be added from the invoice without leaving it, and anyone invoiced by email is saved to Customers automatically. Paid StoreFront and Tickets orders add their buyers too.
- Items. Type on a line to find a saved item (Harbour Invoice items first, then StoreFront products); choosing one fills the description, rate and unit. Anything typed can be saved as a new item from the line. Items are kept in Invoices, Items.
- Payment terms. Due on receipt, Net 7, 15, 30, 45 or 60 set the due date. A customer's own terms are used when they are chosen.
- Payments received another way. The owner or finance can record a bank transfer, cash, POS or cheque payment against an issued invoice, so it shows as paid and reminders stop. A payment recorded by mistake can be removed; payments made online through Harbour are refunded from Transactions instead.
- Duplicate. Any invoice can be copied into a new draft with the same customer and lines.
- Recurring invoices. For rent, retainers, subscriptions or school fees: choose every week, month, quarter or year (or every few of them), a first date, and an end (never, after a number of invoices, or on a date). Each morning Harbour makes the invoice that is due and emails it, or leaves a draft to check. A schedule that starts on the 31st invoices on the last day of shorter months. It can be paused, resumed or stopped, and started from any invoice with Make recurring.
- Ticket purchases. Every Harbour Tickets order gets its own invoice, paid when the order is paid.
Create and send one
const res = await fetch('https://api.harbour.africa/v1/invoices', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.HARBOUR_SECRET_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'order-1043-invoice',
},
body: JSON.stringify({
customer: { name: 'Funke Adeyemi', email: 'funke@example.ng' },
lines: [
{ description: 'Aso-ebi fabric, 12 yards', quantity: '12', unit_amount_minor: 250000 },
{ description: 'Delivery', unit_amount_minor: 150000 },
],
tax: { label: 'VAT', rate_percent: '7.5' },
due_date: '2026-12-01',
send: true, // issue it and email the customer now
}),
});
const invoice = await res.json();
invoice.number; // "INV-0042"
invoice.amount_due_minor; // 3386250
invoice.url; // "https://pay.harbour.africa/i/it_…": the customer's link
curl -s -X POST https://api.harbour.africa/v1/invoices \
Leave out send to create a draft, and issue it later with POST /v1/invoices/{id}/issue.
Pass customer.id to invoice a saved customer; otherwise the customer is matched or saved by email.
Optional fields: reference, terms_days (used for the due date when due_date is
left out), and per line unit and item_id (a saved item).
Amounts are minor units, quantities may have up to three decimals, and tax is applied to the subtotal less any
discount, rounded to the minor unit. The invoice takes the key's mode.
The invoice object
{
"object": "invoice",
"id": "iv_01k5…",
"number": "INV-0042",
"status": "issued", // draft | issued | viewed | partly_paid | paid | overdue | void
"mode": "live",
"currency": "NGN",
"customer": { "id": "cus_01k5…", "name": "Funke Adeyemi", "email": "funke@example.ng", "phone": null },
"reference": "PO-2291", // the customer's order number, if any
"terms_days": 15, // payment terms the due date came from; null for the default
"lines": [{ "description": "Aso-ebi fabric", "quantity": "12", "unit": "yard", "unit_amount_minor": 250000, "amount_minor": 3000000 }],
"subtotal_minor": 3150000,
"discount_minor": 0,
"tax": { "label": "VAT", "rate_percent": "7.5", "amount_minor": 236250 },
"total_minor": 3386250,
"paid_minor": 0,
"refunded_minor": 0,
"amount_due_minor": 3386250,
"allow_part_payment": false,
"issue_date": "2026-11-11",
"due_date": "2026-12-01",
"url": "https://pay.harbour.africa/i/it_…",
"pdf_url": "https://pay.harbour.africa/i/it_…/pdf"
}
Knowing it was paid
Harbour sends invoice.paid when an invoice is paid in full, online or by a payment the business
recorded, with the invoice as data. Each
payment also raises the usual charge.succeeded, whose transaction carries the invoice number as its
merchant_reference. invoice.issued, invoice.overdue and invoice.voided
follow the rest of its life. See the events.
On your website
Put a "Pay this invoice" panel on your own site with the Harbour script. It shows what is due and opens the invoice's page to pay. In live mode it only loads on the websites listed on your key.
<script src="https://pay.harbour.africa/v1/harbour.js" data-key="hb_pk_live_…" async></script>
<div data-harbour="invoice" data-invoice="iv_01k5…">
<a href="https://pay.harbour.africa/i/it_…">Pay invoice INV-0042</a>
</div>
Reminders
Unless the business turns them off for an invoice, Harbour emails the customer three days before the due date, on the day, and a week after. Each reminder goes once, and only while the invoice still has money owed.