InvoiceItem
Invoice Items represent the component lines of an invoice. When you create an invoice item with an invoice field, it is attached to the specified invoice and included as an invoice line item within invoice.lines.
Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined with a subscription. Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
Related guides: Integrate with the Invoicing API, Subscription Invoices.
Summary
Functions
Create an invoice item
Delete an invoice item
List all invoice items
Retrieve an invoice item
Update an invoice item
Functions
@spec create(Stripe.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Create an invoice item
Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
@spec delete(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Delete an invoice item
Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.
@spec list(Stripe.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
List all invoice items
Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Retrieve an invoice item
Retrieves the invoice item with the given ID.
@spec update(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Update an invoice item
Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.