POST /api/invoices creates an invoice record, generates a PDF, provisions a USDC deposit address on Base, and — by default — emails the invoice to your vendor immediately. The response includes everything you need to track payment: a hosted invoice URL, a PDF download link, and an optional webhook secret if you provided a webhook_url.
Request
cURL
Request fields
Your email address as the billing merchant. Appears in the invoice record.
Your business name. Written to the invoice at creation time and never updated — see immutable fields.
Your business address. Printed on the generated PDF invoice.
The email address where Kibble sends the invoice. This is your customer or the party you are billing.
The vendor’s display name, shown on the invoice PDF and hosted page.
The vendor’s mailing address. Optional; included on the PDF if provided.
One to 30 line items that make up the invoice total. Each item is an object with the following fields:
The payment due date in
YYYY-MM-DD format. Used to compute the overdue flag on the invoice.The invoice issue date in
YYYY-MM-DD format. Defaults to today’s date if omitted.Optional free-text notes printed at the bottom of the invoice, such as payment terms (
"Net 30").How Kibble provisions the USDC deposit address. Use
"privy" for a Kibble-managed wallet or "byo" to supply your own wallet address.Your USDC wallet address on Base. Required when
wallet_type is "byo".A URL that Kibble calls with a signed POST request when the invoice is paid, partially paid, or overpaid. See webhooks.
When
true, Kibble emails the vendor immediately after the invoice is created. Set to false to create a draft invoice without sending the email.Response
A successful request returns HTTP201 with the following body:
The UUID for this invoice. Use it in all subsequent API calls.
A human-readable invoice number (e.g.,
INV-0001). Written once at creation and never changed.Short identifier used in the hosted invoice URL.
The URL of the hosted invoice page at
https://pay.kibble.sh/i/{slug}. Share this with your vendor or embed it in your own UI.Direct URL to download the invoice PDF. See download the PDF below.
The USDC wallet address on Base where the vendor sends payment.
The sum of all line items, in USDC (e.g.,
"1500.00").ISO 8601 timestamp of when the vendor email was sent.
null if the invoice is still a draft.The HMAC secret used to verify incoming webhook payloads. Only present when
webhook_url was provided. Store this value securely — it is not returned again.Create a draft without sending
Setsend_now: false to create the invoice without emailing the vendor. The invoice will have status draft until you send it.
cURL
cURL
POST /api/invoices/{id}/send is not idempotent — each call sends a new email to the vendor. Use it deliberately.Download the PDF
The invoice PDF is generated server-side and available immediately after creation.cURL
pdf_url field in the create response.