Skip to main content
GET
/
v1
/
prices
/
{id}
Retrieve a Price
curl --request GET \
  --url https://api.leanrails.com/v1/prices/{id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "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>"
}

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 Price ID (price_ prefix).

Query Parameters

expand[]
enum<string>

Expand related objects inline (e.g. expand[]=product).

Available options:
product

Response

The Price.

id
string
required
Example:

"price_xxx"

object
enum<string>
required
Available options:
price
active
boolean
required

Whether the price is currently active.

product
string
required

The ID of the product this price belongs to, or the expanded Product object.

Example:

"prod_xxx"

currency
string
required

Three-letter ISO currency code.

Example:

"usd"

type
enum<string>
required

Whether the price is for a one-time purchase or a recurring subscription.

Available options:
one_time,
recurring
billing_scheme
enum<string>
required

Describes how to compute the price per period.

Available options:
per_unit,
tiered
tax_behavior
enum<string>
required

Whether the price is tax-inclusive or tax-exclusive.

Available options:
inclusive,
exclusive,
unspecified
metadata
object
required

Set of key-value pairs for storing additional information.

livemode
boolean
required
Example:

false

created
integer
required

Unix timestamp.

Example:

1234567890

unit_amount
integer | null

Amount in smallest currency unit (e.g. cents).

Example:

2000

unit_amount_decimal
string | null

Amount in smallest currency unit as a decimal string.

custom_unit_amount
object

Settings for customer-specified amounts.

recurring
object

Recurring billing details. Present when type is recurring.

tiers_mode
enum<string> | null

How tiers are applied. Present when billing_scheme is tiered.

Available options:
graduated,
volume
tiers
object[] | null

Pricing tiers. Present when billing_scheme is tiered.

transform_quantity
object

Apply a transformation to the reported usage or set quantity.

lookup_key
string | null

A lookup key to quickly find this price (max 200 characters).

nickname
string | null

A brief human-readable label for the price.