stripity_stripe v1.6.0 Stripe.InvoiceItems

The API for tacking on charges to subscriptions. See Stripe docs for more details.

Summary

Functions

Creates an InvoiceItem for a Customer/Subscription

Removes an invoice item from the upcoming invoice. Removing an invoice item is only possible before the invoice it’s attached to is closed

Returns a list of InvoiceItems

Retrieves the invoice item with the given ID

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

Functions

create(params)

Creates an InvoiceItem for a Customer/Subscription

delete(id)

Removes an invoice item from the upcoming invoice. Removing an invoice item is only possible before the invoice it’s attached to is closed.

Arguments

  • id - String - (required) - The ID of the desired invoice item.

Returns

An object with the deleted invoice item’s ID and a deleted flag upon success. This call returns an error otherwise, such as when the invoice item has already been deleted.

list()

Returns a list of InvoiceItems

retrieve(id)

Retrieves the invoice item with the given ID.

Arguments

  • id - String - (required) - The ID of the desired invoice item.

Returns

Returns an invoice item if a valid invoice item ID was provided. Returns an error otherwise.

update(params)

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.

Arguments

  • amount - Integer - (required) - The integer amount in cents of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer’s account, pass a negative amount.
  • description - String - (optional), default is null - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
  • metadata - Keyword - (optional), default is [] - A set of key/value pairs that you can attach to an invoice item object. It can be useful for storing additional information about the invoice item in a structured format.

Returns

The updated invoice item object is returned upon success. Otherwise, this call returns an error.