Skip to main content
GET
/
v1
/
prices
List Prices
curl --request GET \
  --url https://api.leanrails.com/v1/prices \
  --header 'Authorization: Basic <encoded-value>'
{
  "object": "list",
  "data": [
    {
      "id": "price_xxx",
      "object": "price",
      "active": true,
      "product": "prod_xxx",
      "currency": "usd",
      "type": "one_time",
      "billing_scheme": "per_unit",
      "tax_behavior": "inclusive",
      "metadata": {},
      "livemode": false,
      "created": 1234567890,
      "unit_amount": 2000,
      "unit_amount_decimal": "<string>",
      "custom_unit_amount": {
        "enabled": true,
        "minimum": 1,
        "maximum": 2,
        "preset": 1
      },
      "recurring": {
        "interval": "day",
        "interval_count": 183,
        "usage_type": "licensed"
      },
      "tiers_mode": "graduated",
      "tiers": [
        {
          "up_to": 123,
          "flat_amount": 123,
          "flat_amount_decimal": "<string>",
          "unit_amount": 123,
          "unit_amount_decimal": "<string>"
        }
      ],
      "transform_quantity": {
        "divide_by": 2,
        "round": "up"
      },
      "lookup_key": "<string>",
      "nickname": "<string>"
    }
  ],
  "has_more": true,
  "url": "/v1/prices",
  "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.

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.

active
boolean

Filter by active status.

product
string

Filter by product ID.

Pattern: ^prod_
type
enum<string>

Filter by price type.

Available options:
one_time,
recurring
currency
string

Filter by three-letter ISO currency code.

Required string length: 3

Response

A list of Prices.

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

"/v1/prices"

next_cursor
string | null