Skip to main content
PUT
/
subscriptions
/
lineitems
/
{id}
Update subscription line item
curl --request PUT \
  --url https://api.cloud.flexprice.io/v1/subscriptions/lineitems/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "amount": 123,
  "billing_model": "FLAT_FEE",
  "effective_from": "<string>",
  "metadata": {},
  "tier_mode": "VOLUME",
  "tiers": [
    {
      "flat_amount": "<string>",
      "unit_amount": "<string>",
      "up_to": 123
    }
  ],
  "transform_quantity": {
    "divide_by": 123,
    "round": "<string>"
  }
}'
{
  "billing_period": "MONTHLY",
  "created_at": "<string>",
  "created_by": "<string>",
  "currency": "<string>",
  "customer_id": "<string>",
  "display_name": "<string>",
  "end_date": "<string>",
  "entity_id": "<string>",
  "entity_type": "plan",
  "environment_id": "<string>",
  "id": "<string>",
  "invoice_cadence": "ARREAR",
  "metadata": {},
  "meter_display_name": "<string>",
  "meter_id": "<string>",
  "plan_display_name": "<string>",
  "price_id": "<string>",
  "price_type": "USAGE",
  "price_unit": "<string>",
  "price_unit_id": "<string>",
  "quantity": 123,
  "start_date": "<string>",
  "status": "published",
  "subscription_id": "<string>",
  "tenant_id": "<string>",
  "trial_period": 123,
  "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

Line Item ID

Body

application/json

Update Line Item Request

amount
number

Amount is the new price amount that overrides the original price

billing_model
enum<string>
Available options:
FLAT_FEE,
PACKAGE,
TIERED
effective_from
string

EffectiveFrom for the existing line item (if not provided, defaults to now)

metadata
object

Metadata for the new line item

tier_mode
enum<string>
Available options:
VOLUME,
SLAB
tiers
object[]

Tiers determines the pricing tiers for this line item

transform_quantity
object

Response

OK

billing_period
enum<string>
Available options:
MONTHLY,
ANNUAL,
WEEKLY,
DAILY,
QUARTERLY,
HALF_YEARLY
created_at
string
created_by
string
currency
string
customer_id
string
display_name
string
end_date
string
entity_id
string
entity_type
enum<string>
Available options:
plan,
addon
environment_id
string
id
string
invoice_cadence
enum<string>
Available options:
ARREAR,
ADVANCE
metadata
object
meter_display_name
string
meter_id
string
plan_display_name
string
price_id
string
price_type
enum<string>
Available options:
USAGE,
FIXED
price_unit
string
price_unit_id
string
quantity
number
start_date
string
status
enum<string>
Available options:
published,
deleted,
archived
subscription_id
string
tenant_id
string
trial_period
integer
updated_at
string
updated_by
string
I