Pending invoice items
Add one-off charges to a subscription and collect them at renewal or on demand.
Pending invoice items (also called floating items) let you add one-off charges to a subscription. By default, these charges are collected on the next renewal invoice. You can also bill them immediately without waiting for renewal. This is useful for usage-based charges, setup fees, or any ad-hoc billing.
How it works
When you create an invoice item with a subscription_id, the item is stored as a “floating” item:
- The item is created with
invoice_id = null(not yet attached to an invoice) - The item is linked to the subscription via
subscription_id - At the next renewal, PaymentKit automatically sweeps all floating items into the renewal invoice
- The customer is charged for the subscription’s recurring items plus all pending one-off charges
Create a pending invoice item
Add a one-off charge to a subscription using the invoice items endpoint.
With a catalog price
Use a catalog price when you want consistent product naming and reporting:
API
Python SDK
With a custom amount
Create an amount-only item when you don’t need a catalog price. The currency is automatically derived from the subscription:
API
Python SDK
Currency handling: When creating an amount-only item (no price_id), the currency is automatically set to match the subscription’s currency. When using a price_id, the price’s currency must match the subscription’s currency.
View pending charges
Preview the upcoming invoice
Use the subscription preview endpoint to see all pending charges that will be collected at renewal:
Each pending (floating) item is returned as its own line item in the upcoming_invoice.items array, listed alongside the subscription’s recurring items — so you can see exactly what will be charged, not just the aggregate total. Every pending item includes its description, quantity, and amount, is denominated in the subscription’s currency, and carries a proration flag indicating whether it was generated by a mid-cycle change.
Itemizing pending charges in the preview does not change any totals: upcoming_invoice.subtotal, total, and related amounts already account for these items exactly once.
List pending items for a subscription
Use the invoice items list endpoint with status=floating to get all pending (unbilled) charges for a subscription. Floating items are those not yet swept onto an invoice:
API
Python SDK
The response is paginated — matching items are returned in the items array alongside total and has_more. You can also filter by customer_id, or pass status=attached to list items already swept onto an invoice. Omit status to return both.
Global search now indexes invoice items. Paste an item’s ii_ id into the dashboard search bar (or scope a search with the ii prefix) to jump straight to a pending item.
Validation rules
Renewal behavior
When a subscription renews:
- PaymentKit creates a draft renewal invoice
- All floating items for the subscription are attached to this invoice
- The invoice is finalized and payment is collected
- The floating items now have
invoice_idset to the renewal invoice
If the renewal invoice is voided (e.g., due to mid-cycle changes), floating items return to their unbilled state (invoice_id = null) and will be swept into the replacement invoice.
Bill pending items on demand
Bill accumulated charges immediately without waiting for the next renewal. The bill-pending-items endpoint sweeps all floating items for a customer into standalone invoices, finalizes them, and attempts collection.
Create an off-cycle invoice
API
Python SDK
Response:
The response contains one invoice per currency. If the customer has no pending items, the invoices array is empty.
Filter which items to bill
By default, all floating items for the customer are swept. Use filters to narrow the scope.
Bill specific items
Pass item_ids to sweep only specific floating items:
When item_ids is provided, other filters (subscription_id, currency) are ignored.
Bill items from a specific subscription
Bill items in a specific currency
Request fields
Response fields
Behavior
Idempotency: Without an Idempotency-Key header, duplicate requests create duplicate invoices. Always include an idempotency key for production use.
Use cases
Pending items do not affect subscription state. Pending charges are passive — they don’t trigger pause, cancel, or dunning logic. They are simply swept into the renewal invoice when it’s created.