A valid request URL is required to generate request examples{
"id": "<string>",
"object": "invoice_item",
"customer": "<string>",
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"amount": 123,
"currency": "<string>",
"invoice": "<string>",
"pending": true,
"metadata": {},
"created_at": 123,
"updated_at": 123,
"price": "<string>"
}{
"error": {
"code": "INVALID_DATA",
"message": "invalid currency"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "PRICE_NOT_FOUND",
"message": "price not found"
}
}{
"error": {
"code": "CUSTOMER_ALREADY_DELETED",
"message": "customer is deleted"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Create an invoice item
Records a pending charge for a customer. It remains pending until an invoice for that customer is created, which drains it onto the invoice.
A valid request URL is required to generate request examples{
"id": "<string>",
"object": "invoice_item",
"customer": "<string>",
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"amount": 123,
"currency": "<string>",
"invoice": "<string>",
"pending": true,
"metadata": {},
"created_at": 123,
"updated_at": 123,
"price": "<string>"
}{
"error": {
"code": "INVALID_DATA",
"message": "invalid currency"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "PRICE_NOT_FOUND",
"message": "price not found"
}
}{
"error": {
"code": "CUSTOMER_ALREADY_DELETED",
"message": "customer is deleted"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
Merchant ID when an authorized Platform acts for a connected Merchant. Omit when authenticating directly as that Merchant.
^mer_[0-9A-Za-z]{14}$A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Body
Customer id (cus_…).
The item's label, shown on the invoice line it becomes.
The number of units. At least 1.
x >= 1Per-unit price in minor units.
Three-letter ISO currency code.
Optional price id (price_…) for catalog reference.
Custom key-value pairs for your use.
Show child attributes
Show child attributes
Response
The created invoice item.
Unique identifier for the invoice item (ii_…).
invoice_item ID of the customer the item is billed to (cus_…).
The item's label, shown on the invoice line it becomes.
The number of units.
Per-unit price in minor units.
Total amount in minor units.
Three-letter ISO currency code.
The invoice this item was drained onto, or null while pending.
true while the item is not yet on an invoice (invoice is null), and false once it has been added to one.
Custom key-value pairs for your use.
Show child attributes
Show child attributes
Unix epoch seconds.
Unix epoch seconds when the invoice item was last updated.
The catalog price (price_…) the item was derived from. Null when the item was created without one.

