Invoices
The document to be charged, from draft to paid. finalize seals the draft, pay records settlement, void cancels it, and instalments live under installments.
| Command | HTTP | Description |
|---|---|---|
invoices list | GET /v1/invoices | List invoices |
invoices create | POST /v1/invoices | Create an invoice |
invoices get | GET /v1/invoices/{id} | Get an invoice |
invoices update | PATCH /v1/invoices/{id} | Update an invoice |
invoices delete | DELETE /v1/invoices/{id} | Delete an invoice |
invoices apply-credits | POST /v1/invoices/{id}/apply-credits | Apply credits to an invoice |
invoices finalize | POST /v1/invoices/{id}/finalize | Finalize an invoice |
invoices issue-nfe | POST /v1/invoices/{id}/issue-nfe | Issue an NF-e for an invoice |
invoices pay | POST /v1/invoices/{id}/pay | Pay an invoice |
invoices payment-methods | GET /v1/invoices/{id}/payment-methods | List available payment methods |
invoices pdf | GET /v1/invoices/{id}/pdf | Download the invoice PDF |
invoices remove-credits | POST /v1/invoices/{id}/remove-credits | Remove applied credits |
invoices send-reminder | POST /v1/invoices/{id}/send-reminder | Send a billing reminder |
invoices undo-payment | POST /v1/invoices/{id}/undo-payment | Undo the invoice's payment |
invoices void | POST /v1/invoices/{id}/void | Void an invoice |
invoices installments get | GET /v1/invoices/{id}/installments | List the invoice's instalments |
invoices installments create | POST /v1/invoices/{id}/installments | Create/update an instalment plan |
invoices installments mark-paid | POST /v1/invoices/{id}/installments/{installmentId}/mark-paid | Mark an instalment as paid |
invoices installments pay | POST /v1/invoices/{id}/installments/{installmentId}/pay | Pay an instalment |
invoices pending-nfe list | GET /v1/invoices/pending-nfe | List invoices with a pending NF-e |
invoices pending-payment list | GET /v1/invoices/pending-payment | List invoices with a pending payment |
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List invoices
kobana billing invoices list \
--fields "id,public_id,external_id,number,billing_account_id"
# Get an invoice
kobana billing invoices get --params '{"id": "INVOICE_ID"}'
# Create an invoice
kobana billing invoices create \
--json '{"billing_account_id": "BILLING_ACCOUNT_ID", "line_items": []}'
# Update an invoice
kobana billing invoices update \
--params '{"id": "INVOICE_ID"}' \
--json '{"external_id": "EXTERNAL_ID", "company_id": "COMPANY_ID", "collection_method": "charge_automatically"}'
# Apply credits to an invoice
kobana billing invoices apply-credits \
--params '{"id": "INVOICE_ID"}' \
--json '{"credit_ids": []}'
# Delete an invoice
kobana billing invoices delete --params '{"id": "INVOICE_ID"}' --dry-run
Next steps
- Payments
- Schema introspection — every parameter this resource accepts.