Skip to main content
GET
/
v1
/
checkout_sessions
/
{id}
/
line_items
List line items for a Checkout Session
curl --request GET \
  --url https://api.leanrails.com/v1/checkout_sessions/{id}/line_items \
  --header 'Authorization: Basic <encoded-value>'
{
  "object": "list",
  "data": [
    {
      "id": "csli_xxx",
      "object": "item",
      "price": "price_xxx",
      "quantity": 2,
      "amount_subtotal": 123,
      "amount_total": 123,
      "currency": "usd",
      "description": "<string>"
    }
  ],
  "has_more": true,
  "url": "/v1/checkout_sessions/cs_xxx/line_items",
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

X-API-Version
string

Override the API version for this request.

Path Parameters

id
string
required

The Checkout Session ID.

Query Parameters

limit
integer
default:10

Number of objects to return (1-100).

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination. The ID of the last object in the previous page.

ending_before
string

Cursor for backward pagination. The ID of the first object in the previous page.

Response

A list of line items for the Checkout Session.

object
enum<string>
required
Available options:
list
data
object[]
required
has_more
boolean
required
url
string
required
Example:

"/v1/checkout_sessions/cs_xxx/line_items"

next_cursor
string | null