Create an invoice
Create the invoice
Send a
POST request with your company details, customer details, and at least one line item. You can include line items inline at creation time or add them individually afterward.Internal title for the invoice (e.g. “Q1 Retainer”).
ISO 4217 currency code, exactly 3 characters (e.g.
NGN, USD).Your company name as it will appear on the invoice.
Your company billing email address.
ISO 8601 date-time. Defaults to now if omitted.
ISO 8601 date-time for when payment is due.
Full name of the customer being billed.
Customer’s email address. Required to send the invoice by email.
Street address of the customer.
City.
State or province.
Country.
Postal/ZIP code.
Invoice-level tax mode:
none, percentage, or fixed. When set to anything other than none, this overrides any line-item tax settings.Tax value. For
percentage, supply a percent (e.g. 7.5 for 7.5%). For fixed, supply a flat currency amount applied per line item.Invoice-level discount mode:
none, percentage, or fixed. Overrides line-item discounts when set.Discount value, interpreted according to
discountType.Flat shipping fee added to the invoice total.
Free-text notes printed at the bottom of the invoice.
Arbitrary key-value pairs stored on the invoice. Not shown to customers.
URL that Hyparrow POSTs to when a checkout-link payment changes status (
completed, pending, or failed).Array of line items. At least one is required.
Response
Add line items (optional)
Add line items after creation with
POST /api/v1/invoices/:invoiceId/line-items.Description of the product or service.
Number of units. Must be greater than 0.
Price per unit. Must be greater than 0.
ID of an existing product. When provided,
description and unitPrice are auto-populated from the product. You may still override unitPrice explicitly.Line-item tax mode:
none, percentage, or fixed. Only used when the invoice-level taxType is none.Line-item tax value.
Line-item discount mode:
none, percentage, or fixed. Only used when the invoice-level discountType is none.Line-item discount value.
cURL
Generate a virtual account
Create a short-lived virtual account that your customer pays into. Hyparrow automatically marks the invoice as paid when the exact amount clears.
VA lifetime in minutes. Must be exactly
10, 15, or 30.cURL
Response
Download PDF
Returns a PDF binary withContent-Type: application/pdf.
cURL
Send by email
Emails the invoice PDF to the customer address on record. The email includes a checkout link.cURL
Response
The invoice must have a
customerEmail set. Requests without one return a 400 error.Public checkout
Give customers a hosted payment page — no authentication required on their side.checkoutCallbackUrl you set on the invoice (if any).
List invoices
cURL
| Query parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 20 | Results per page |
status | string | — | Filter by invoice status |
