Create an invoice
Generate one-off invoices for custom charges, or understand how subscription invoices are created automatically.
One-off invoices
Create a standalone invoice for a customer that is not tied to a subscription. Use one-off invoices for custom charges, consulting fees, setup fees, or any non-recurring billing.
Dashboard
API
Python SDK
- Go to Billing > Invoices in the sidebar
- Click Create Invoice
- Select a customer
- Set the currency and issued date
- Add line items with descriptions, quantities, and amounts
- Click Create
The invoice is created in Draft state. Finalize it to begin collection.
Line item fields
Use price_id to reference a catalog price, or provide amount/unit_amount for ad-hoc charges.
Subscription invoices
Subscription invoices are generated automatically by the billing lifecycle. You do not need to create them manually.
PaymentKit generates invoices at these points:
Each invoice contains line items built from the subscription’s active items at the time of generation.
Invoice lifecycle
Every invoice follows this state flow:
Transitions
Finalize an invoice
Finalizing moves a draft invoice to Open state, locks all amounts, and optionally triggers PDF generation and email delivery.
API
Python SDK
Collect payment
Attempt to collect payment on an open invoice:
The response includes the payment outcome:
If the invoice is still in Draft state, the collect endpoint finalizes it before attempting payment.
For subscription invoices, payment collection is handled automatically by the lifecycle engine. Use the collect endpoint for manual invoices or to retry a failed payment.