POST /api/invoices to create a USDC invoice. Kibble generates a line-item breakdown, calculates the total, renders a PDF, provisions a unique deposit address on Base, and — by default — emails the vendor a link to the hosted invoice page at https://pay.kibble.sh/i/{slug}. Optionally, you can suppress the email with send_now: false and trigger it later using POST /api/invoices/{id}/send.
Request
Body parameters
Merchant
Your email address as the billing merchant. Kibble uses this to identify your account and provision your managed wallet when
wallet_type is "privy".Your business name as it appears on the invoice.
Your business address as it appears on the invoice. This value is captured at creation time and cannot be changed after the invoice is created.
Vendor
The vendor’s email address. Kibble sends the invoice to this address (unless
send_now is false).The vendor’s name as it appears on the invoice.
The vendor’s address. Optional — displayed on the invoice if provided.
Line items
An array of between 1 and 30 line items. Each item contributes to the invoice total.
Dates
The invoice issue date in
YYYY-MM-DD format. Defaults to today if omitted.The payment due date in
YYYY-MM-DD format. Kibble uses this to compute the overdue field.Wallet
How Kibble resolves your receiving wallet. Use
"privy" for a Kibble-managed wallet or "byo" to supply your own address.Required when
wallet_type is "byo". Must be a valid EVM address in checksum format.Options
Optional free-text notes displayed at the bottom of the invoice (e.g.
"Net 30").A publicly reachable URL that Kibble will POST to when the invoice reaches
paid, partial, or excess status. The request is signed with an HMAC secret — see Webhooks for verification details.Set to
false to create the invoice without emailing the vendor. Use POST /api/invoices/{id}/send to send the email when you are ready.Example request
Response
A successful request returns201 Created with the following fields.
The UUID for this invoice. Use it in all subsequent API calls that reference this invoice.
A human-readable invoice identifier (e.g.
"INV-0001"). Increments automatically for each new invoice.The short identifier used in the hosted invoice URL.
The hosted invoice page URL. Send this to your vendor so they can review the invoice and pay.
The URL to download the invoice as a PDF. See Download invoice PDF.
The on-chain USDC deposit address on Base where the vendor should send payment.
The sum of all line item totals, in USDC (e.g.
"1500.00").ISO 8601 timestamp of when the vendor email was sent.
null if send_now was false.The HMAC secret used to sign webhook requests. Only present when you provided a
webhook_url. Store this securely — you need it to verify incoming webhook signatures.Example response
201
webhook_secret is returned only once, at creation time. If you lose it, you will need to create a new invoice with a fresh webhook_url to get a new secret.Errors
| Status | Cause |
|---|---|
400 | One or more fields failed validation. The response body contains field-level error details. |
500 | Kibble could not provision your wallet or save the invoice to the database. |