Skip to content

Simulate plan pricing

POST
/v1/plans/{plan_id}/simulate

Simulate pricing for a plan given a number of usage units.

plan_id
required
Plan Id
string format: uuid
PlanSimulateRequest

Request body for pricing simulation.

object
units
required
Units

Number of usage units to simulate

number

Successful Response

PlanSimulateResponse

Response for pricing simulation.

object
plan_id
required
Plan Id
string format: uuid
base_amount_cents
required
Base Amount Cents
integer
currency
required
Currency
string
charges
required
Charges
Array<object>
ChargeSimulationResult

Result of simulating a single charge.

object
charge_id
required
Charge Id
string format: uuid
billable_metric_id
required
Billable Metric Id
string format: uuid
charge_model
required
ChargeModel
string
Allowed values: standard graduated volume package percentage graduated_percentage custom dynamic
units
required
Units
number
amount_cents
required
Amount Cents
integer
properties
required
Properties
object
key
additional properties
any
total_amount_cents
required
Total Amount Cents
integer

Unauthorized – invalid or missing API key

Plan not found

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object