Preview plan estimate

Preview financial estimate for a plan without creating database records.

This endpoint converts a plan with its products into a contract structure and calls the billables service to calculate cost estimates.

Logic:

  1. End date is calculated from start_date + plan.duration if not provided
  2. If trial_config is present, a trial phase is created first
  3. All products use the plan's duration (single phase for all products)
  4. Billables service calculates invoice estimates (dry run)

Trial discount handling:

  • Percentage discounts override product pricing discounts (if in applies_to_pricings)
  • Fixed discounts are added as features pricing at phase level
Path Params
uuid
required
Body Params
date
required

Contract start date

Contract end date (optional - calculated from plan duration if not provided)

Customer UUID (optional - random if not provided)

Contract name (optional - defaults to plan name)

Contract description

Responses

404

Plan not found

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json