Skip to navigation

Add Line Item

View as Markdown

Add a line item to a checkout session.

Works for both User and API Key authentication. Account access is automatically validated via endpoint dependency.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

external_idstringRequired
account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
price_idstringRequired
Price Identifier
quantityintegerOptional>=1Defaults to 1
Quantity of items
descriptionstring or nullOptional
Line item description

Response

Successful Response
idstring
Unique line item identifier
product_idstring
Product Identifier
price_idstring
Price Identifier
quantityinteger>=1
Quantity of items
created_atdatetime
When the line item was created
updated_atdatetime
When the line item was last updated
descriptionstring or nullOptional
Line item description

Errors

422
Unprocessable Entity Error