Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

A merchant secret key (sk_…) sent as Authorization: Bearer <key>.

Headers

Idempotency-Key
string

A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.

Maximum string length: 255

Body

application/json
customer
string
required

Customer id (cus_…).

description
string
required
quantity
integer
required
Required range: x >= 1
unit_amount
integer
required

Per-unit price in minor units.

currency
string
required

Three-letter ISO currency code.

price
string | null

Optional price id (price_…) for catalog reference.

metadata
object

Response

The created invoice item.

id
string
required
object
enum<string>
required
Available options:
invoice_item
customer
string
required
description
string
required
quantity
integer
required
unit_amount
integer
required
amount
integer
required

Total amount in minor units.

currency
string
required
invoice
string | null
required

The invoice this item was drained onto, or null while pending.

pending
boolean
required
metadata
object
required
created_at
integer
required

Unix epoch seconds.

updated_at
integer
required
price
string | null