GET
/
prices
/
{id}
Get a price by ID
curl --request GET \
  --url https://api.cloud.flexprice.io/v1/prices/{id} \
  --header 'x-api-key: <api-key>'
{
  "amount": 123,
  "billing_cadence": "RECURRING",
  "billing_model": "FLAT_FEE",
  "billing_period": "MONTHLY",
  "billing_period_count": 123,
  "conversion_rate": 123,
  "created_at": "<string>",
  "created_by": "<string>",
  "currency": "<string>",
  "description": "<string>",
  "display_amount": "<string>",
  "display_price_unit_amount": "<string>",
  "end_date": "<string>",
  "entity_id": "<string>",
  "entity_type": "PLAN",
  "environment_id": "<string>",
  "id": "<string>",
  "invoice_cadence": "ARREAR",
  "lookup_key": "<string>",
  "metadata": {},
  "meter": {
    "aggregation": {
      "bucket_size": "MINUTE",
      "field": "<string>",
      "multiplier": 123,
      "type": "COUNT"
    },
    "created_at": "2024-03-20T15:04:05Z",
    "event_name": "api_request",
    "filters": [
      {
        "key": "<string>",
        "values": [
          "<string>"
        ]
      }
    ],
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "API Usage Meter",
    "reset_usage": "BILLING_PERIOD",
    "status": "published",
    "tenant_id": "tenant123",
    "updated_at": "2024-03-20T15:04:05Z"
  },
  "meter_id": "<string>",
  "parent_price_id": "<string>",
  "plan_id": "<string>",
  "price_unit": "<string>",
  "price_unit_amount": 123,
  "price_unit_id": "<string>",
  "price_unit_tiers": [
    {
      "flat_amount": 123,
      "unit_amount": 123,
      "up_to": 123
    }
  ],
  "price_unit_type": "FIAT",
  "pricing_unit": {
    "base_currency": "<string>",
    "code": "<string>",
    "conversion_rate": 123,
    "created_at": "<string>",
    "created_by": "<string>",
    "environment_id": "<string>",
    "id": "<string>",
    "name": "<string>",
    "precision": 123,
    "status": "published",
    "symbol": "<string>",
    "tenant_id": "<string>",
    "updated_at": "<string>",
    "updated_by": "<string>"
  },
  "start_date": "<string>",
  "status": "published",
  "tenant_id": "<string>",
  "tier_mode": "VOLUME",
  "tiers": [
    {
      "flat_amount": 123,
      "unit_amount": 123,
      "up_to": 123
    }
  ],
  "transform_quantity": {
    "divide_by": 123,
    "round": "<string>"
  },
  "trial_period": 123,
  "type": "USAGE",
  "updated_at": "<string>",
  "updated_by": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Path Parameters

id
string
required

Price ID

Response

OK

amount
number

Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50

billing_cadence
enum<string>
Available options:
RECURRING,
ONETIME
billing_model
enum<string>
Available options:
FLAT_FEE,
PACKAGE,
TIERED
billing_period
enum<string>
Available options:
MONTHLY,
ANNUAL,
WEEKLY,
DAILY,
QUARTERLY,
HALF_YEARLY
billing_period_count
integer

BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12

conversion_rate
number

ConversionRate is the rate of the price unit to the base currency For BTC: 1 BTC = 100000000 USD

created_at
string
created_by
string
currency
string

Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp

description
string

Description of the price

display_amount
string

DisplayAmount is the formatted amount with currency symbol For USD: $12.50

display_price_unit_amount
string

DisplayPriceUnitAmount is the formatted amount with price unit symbol For BTC: 0.00000001 BTC

end_date
string

EndDate is the end date of the price

entity_id
string

EntityID holds the value of the "entity_id" field.

entity_type
enum<string>
Available options:
PLAN,
SUBSCRIPTION,
ADDON,
PRICE
environment_id
string

EnvironmentID is the environment identifier for the price

id
string

ID uuid identifier for the price

invoice_cadence
enum<string>
Available options:
ARREAR,
ADVANCE
lookup_key
string

LookupKey used for looking up the price in the database

metadata
object
meter
object
meter_id
string

MeterID is the id of the meter for usage based pricing

parent_price_id
string

ParentPriceID references the parent price (only set when scope is SUBSCRIPTION)

plan_id
string

TODO: Remove this once we have a proper price entity type

price_unit
string

PriceUnit 3 digit ISO currency code in lowercase ex btc For BTC: btc

price_unit_amount
number

PriceUnitAmount is the amount stored in price unit For BTC: 0.00000001 means 0.00000001 BTC

price_unit_id
string

PriceUnitID is the id of the price unit

price_unit_tiers
object[]

PriceUnitTiers are the tiers for the price unit

price_unit_type
enum<string>
Available options:
FIAT,
CUSTOM
pricing_unit
object
start_date
string

StartDate is the start date of the price

status
enum<string>
Available options:
published,
deleted,
archived
tenant_id
string
tier_mode
enum<string>
Available options:
VOLUME,
SLAB
tiers
object[]
transform_quantity
object
trial_period
integer

TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)

type
enum<string>
Available options:
USAGE,
FIXED
updated_at
string
updated_by
string