LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/plans" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"plan": {
"name": "Premium",
"code": "premium",
"interval": "monthly",
"description": "Premium plan for SMB customers",
"amount_cents": 50000,
"amount_currency": "USD",
"trial_period": 3.0,
"pay_in_advance": true,
"bill_charges_monthly": true,
"tax_codes": ["french_standard_vat"],
"charges": [
{
"billable_metric_id": "__BILLABLE_METRIC_ID__",
"charge_model": "graduated",
"pay_in_advance": false,
"invoiceable": true,
"min_amount_cents": 0,
"tax_codes": ["french_standard_vat"],
"properties": {
"graduated_ranges": [
{
"to_value": 10,
"from_value": 0,
"flat_amount": "0",
"per_unit_amount": "0.001"
},
{
"to_value": null,
"from_value": 11,
"flat_amount": "0",
"per_unit_amount": "0.0005"
}
]
}
}
]
}
}'