Create a plan
Creates a new plan with its full pricing template — name, currency, contract configuration, and the items (standalone priced products and/or bundles) that subscriptions will inherit. Optional fields cover plan-level discount, spend thresholds, price escalation, entitlements, tags, and invoice/email behavior.
curl --request POST \
--url https://api.alguna.io/plans \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"name": "Enterprise Plan",
"additional_terms": "<string>",
"auto_activate": false,
"auto_renew": true,
"contract_duration": 12,
"contract_period_type": "fixed",
"description": "Full-featured enterprise plan",
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"entitlements": [
{
"entitlement_key": "api_access",
"mode": "static",
"type": "boolean",
"allocation": {
"amount": "100000",
"credit_type": "monetary",
"rollover_enabled": true,
"rollover_max_periods": 3
},
"timing": {
"recurrence": "recurring",
"interval": "monthly"
},
"value": "true"
}
],
"invoice_settings": {
"auto_issue_invoices": true,
"auto_pay_invoices": false,
"invoice_footer_text": "Questions? support@example.com",
"invoice_memo_template": "Thanks for your business",
"send_activation_email": true,
"send_invoices_to_customer": true,
"send_receipts_to_customer": true
},
"items": [
{
"bundle_description": "Premium support and SSO",
"bundle_id": "bun_abc123",
"items": [
{
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": false,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"name": "Enterprise Add-ons",
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": false,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"payment_terms": "net_30",
"price_escalation": {
"enabled": true,
"interval_months": 12,
"type": "percentage",
"escalate_metered_unit_rates": false,
"percentage": "5.00"
},
"renewal_duration": 12,
"tags": [
"tag_abc123"
],
"trial_period_days": 14
}
'import requests
url = "https://api.alguna.io/plans"
payload = {
"currency": "USD",
"name": "Enterprise Plan",
"additional_terms": "<string>",
"auto_activate": False,
"auto_renew": True,
"contract_duration": 12,
"contract_period_type": "fixed",
"description": "Full-featured enterprise plan",
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"entitlements": [
{
"entitlement_key": "api_access",
"mode": "static",
"type": "boolean",
"allocation": {
"amount": "100000",
"credit_type": "monetary",
"rollover_enabled": True,
"rollover_max_periods": 3
},
"timing": {
"recurrence": "recurring",
"interval": "monthly"
},
"value": "true"
}
],
"invoice_settings": {
"auto_issue_invoices": True,
"auto_pay_invoices": False,
"invoice_footer_text": "Questions? support@example.com",
"invoice_memo_template": "Thanks for your business",
"send_activation_email": True,
"send_invoices_to_customer": True,
"send_receipts_to_customer": True
},
"items": [
{
"bundle_description": "Premium support and SSO",
"bundle_id": "bun_abc123",
"items": [
{
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": False,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"name": "Enterprise Add-ons",
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": False,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"payment_terms": "net_30",
"price_escalation": {
"enabled": True,
"interval_months": 12,
"type": "percentage",
"escalate_metered_unit_rates": False,
"percentage": "5.00"
},
"renewal_duration": 12,
"tags": ["tag_abc123"],
"trial_period_days": 14
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
currency: 'USD',
name: 'Enterprise Plan',
additional_terms: '<string>',
auto_activate: false,
auto_renew: true,
contract_duration: 12,
contract_period_type: 'fixed',
description: 'Full-featured enterprise plan',
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
entitlements: [
{
entitlement_key: 'api_access',
mode: 'static',
type: 'boolean',
allocation: {
amount: '100000',
credit_type: 'monetary',
rollover_enabled: true,
rollover_max_periods: 3
},
timing: {recurrence: 'recurring', interval: 'monthly'},
value: 'true'
}
],
invoice_settings: {
auto_issue_invoices: true,
auto_pay_invoices: false,
invoice_footer_text: 'Questions? support@example.com',
invoice_memo_template: 'Thanks for your business',
send_activation_email: true,
send_invoices_to_customer: true,
send_receipts_to_customer: true
},
items: [
{
bundle_description: 'Premium support and SSO',
bundle_id: 'bun_abc123',
items: [
{
price: {
billing_direction: 'arrears',
fee_type: 'fixed',
type: 'fixed',
billing_frequency: 'recurring',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
charge_on_contract_start: false,
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
display_order: 1,
expression_pricing_model: {
charges: [
{
billing_direction: 'arrears',
description: 'API usage charge',
quantity_expression: 'usage.api_calls',
unit_price_expression: '0.01'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
metric_ids: ['<string>'],
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: 'monthly',
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
trial_period_days: 30,
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
product_id: 'prod_abc123'
}
],
name: 'Enterprise Add-ons',
price: {
billing_direction: 'arrears',
fee_type: 'fixed',
type: 'fixed',
billing_frequency: 'recurring',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
charge_on_contract_start: false,
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
display_order: 1,
expression_pricing_model: {
charges: [
{
billing_direction: 'arrears',
description: 'API usage charge',
quantity_expression: 'usage.api_calls',
unit_price_expression: '0.01'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
metric_ids: ['<string>'],
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: 'monthly',
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
trial_period_days: 30,
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
product_id: 'prod_abc123'
}
],
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
payment_terms: 'net_30',
price_escalation: {
enabled: true,
interval_months: 12,
type: 'percentage',
escalate_metered_unit_rates: false,
percentage: '5.00'
},
renewal_duration: 12,
tags: ['tag_abc123'],
trial_period_days: 14
})
};
fetch('https://api.alguna.io/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2026-04-01T10:00:00Z",
"currency": "USD",
"id": "pln_01H1VECT",
"name": "Enterprise Plan",
"updated_at": "2026-04-01T12:30:00Z",
"description": "Full-featured enterprise plan"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
255"ik_a1b2c3d4e5f6"
Body
ISO 4217 currency code
"USD"
Plan name
"Enterprise Plan"
Markdown additional terms appended to the contract
Auto-activate subscriptions created from this plan
false
Whether the plan auto-renews
true
Contract duration in months
12
Contract period type
fixed, monthly_rolling "fixed"
Plan description
"Full-featured enterprise plan"
Plan-level discount applied across the price set
Show child attributes
Show child attributes
Entitlement configs to provision with the plan
Show child attributes
Show child attributes
Invoice/email behavior overrides for the plan
Show child attributes
Show child attributes
Items that make up the plan's pricing template. Each item is either a standalone product (product_id + price) or a bundle (bundle_id + name + items).
Show child attributes
Show child attributes
Maximum spend per period
Show child attributes
Show child attributes
Minimum spend per period
Show child attributes
Show child attributes
Invoice payment terms
"net_30"
Price escalation config
Show child attributes
Show child attributes
Renewal duration in months
12
Renewal period type
fixed, monthly_rolling Tag IDs to associate with the plan
["tag_abc123"]
Trial period in days
14
Response
Success
Timestamp when the plan was created
"2026-04-01T10:00:00Z"
The currency in which the plan is billed
"USD"
Unique identifier for the plan
"pln_01H1VECT"
The name of the plan
"Enterprise Plan"
Timestamp when the plan was last updated
"2026-04-01T12:30:00Z"
A brief description of the plan
"Full-featured enterprise plan"
curl --request POST \
--url https://api.alguna.io/plans \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"name": "Enterprise Plan",
"additional_terms": "<string>",
"auto_activate": false,
"auto_renew": true,
"contract_duration": 12,
"contract_period_type": "fixed",
"description": "Full-featured enterprise plan",
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"entitlements": [
{
"entitlement_key": "api_access",
"mode": "static",
"type": "boolean",
"allocation": {
"amount": "100000",
"credit_type": "monetary",
"rollover_enabled": true,
"rollover_max_periods": 3
},
"timing": {
"recurrence": "recurring",
"interval": "monthly"
},
"value": "true"
}
],
"invoice_settings": {
"auto_issue_invoices": true,
"auto_pay_invoices": false,
"invoice_footer_text": "Questions? support@example.com",
"invoice_memo_template": "Thanks for your business",
"send_activation_email": true,
"send_invoices_to_customer": true,
"send_receipts_to_customer": true
},
"items": [
{
"bundle_description": "Premium support and SSO",
"bundle_id": "bun_abc123",
"items": [
{
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": false,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"name": "Enterprise Add-ons",
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": false,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"payment_terms": "net_30",
"price_escalation": {
"enabled": true,
"interval_months": 12,
"type": "percentage",
"escalate_metered_unit_rates": false,
"percentage": "5.00"
},
"renewal_duration": 12,
"tags": [
"tag_abc123"
],
"trial_period_days": 14
}
'import requests
url = "https://api.alguna.io/plans"
payload = {
"currency": "USD",
"name": "Enterprise Plan",
"additional_terms": "<string>",
"auto_activate": False,
"auto_renew": True,
"contract_duration": 12,
"contract_period_type": "fixed",
"description": "Full-featured enterprise plan",
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"entitlements": [
{
"entitlement_key": "api_access",
"mode": "static",
"type": "boolean",
"allocation": {
"amount": "100000",
"credit_type": "monetary",
"rollover_enabled": True,
"rollover_max_periods": 3
},
"timing": {
"recurrence": "recurring",
"interval": "monthly"
},
"value": "true"
}
],
"invoice_settings": {
"auto_issue_invoices": True,
"auto_pay_invoices": False,
"invoice_footer_text": "Questions? support@example.com",
"invoice_memo_template": "Thanks for your business",
"send_activation_email": True,
"send_invoices_to_customer": True,
"send_receipts_to_customer": True
},
"items": [
{
"bundle_description": "Premium support and SSO",
"bundle_id": "bun_abc123",
"items": [
{
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": False,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"name": "Enterprise Add-ons",
"price": {
"billing_direction": "arrears",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"charge_on_contract_start": False,
"discount": {
"amount": "10",
"duration_type": "fixed",
"type": "percentage",
"duration_unit": "months",
"duration_value": 6
},
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "500.00",
"units": 1
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "monthly",
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"percentage": "2.5"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02",
"unit_price": "5.00"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": { "price_per_unit": "0.05" },
"volume_percentage_pricing_model": {
"percentage": "2.0",
"price_per_unit": "0.05",
"fixed_fee": "5.00"
}
},
"product_id": "prod_abc123"
}
],
"maximum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"minimum_spend": {
"amount": "500.00",
"period": "monthly",
"billing_direction": "arrears"
},
"payment_terms": "net_30",
"price_escalation": {
"enabled": True,
"interval_months": 12,
"type": "percentage",
"escalate_metered_unit_rates": False,
"percentage": "5.00"
},
"renewal_duration": 12,
"tags": ["tag_abc123"],
"trial_period_days": 14
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
currency: 'USD',
name: 'Enterprise Plan',
additional_terms: '<string>',
auto_activate: false,
auto_renew: true,
contract_duration: 12,
contract_period_type: 'fixed',
description: 'Full-featured enterprise plan',
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
entitlements: [
{
entitlement_key: 'api_access',
mode: 'static',
type: 'boolean',
allocation: {
amount: '100000',
credit_type: 'monetary',
rollover_enabled: true,
rollover_max_periods: 3
},
timing: {recurrence: 'recurring', interval: 'monthly'},
value: 'true'
}
],
invoice_settings: {
auto_issue_invoices: true,
auto_pay_invoices: false,
invoice_footer_text: 'Questions? support@example.com',
invoice_memo_template: 'Thanks for your business',
send_activation_email: true,
send_invoices_to_customer: true,
send_receipts_to_customer: true
},
items: [
{
bundle_description: 'Premium support and SSO',
bundle_id: 'bun_abc123',
items: [
{
price: {
billing_direction: 'arrears',
fee_type: 'fixed',
type: 'fixed',
billing_frequency: 'recurring',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
charge_on_contract_start: false,
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
display_order: 1,
expression_pricing_model: {
charges: [
{
billing_direction: 'arrears',
description: 'API usage charge',
quantity_expression: 'usage.api_calls',
unit_price_expression: '0.01'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
metric_ids: ['<string>'],
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: 'monthly',
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
trial_period_days: 30,
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
product_id: 'prod_abc123'
}
],
name: 'Enterprise Add-ons',
price: {
billing_direction: 'arrears',
fee_type: 'fixed',
type: 'fixed',
billing_frequency: 'recurring',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
charge_on_contract_start: false,
discount: {
amount: '10',
duration_type: 'fixed',
type: 'percentage',
duration_unit: 'months',
duration_value: 6
},
display_order: 1,
expression_pricing_model: {
charges: [
{
billing_direction: 'arrears',
description: 'API usage charge',
quantity_expression: 'usage.api_calls',
unit_price_expression: '0.01'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '500.00', units: 1},
graduated_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
metric_ids: ['<string>'],
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: 'monthly',
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 50000,
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [{min_units: 0, fixed_fee: '10.00', max_units: 10000, percentage: '2.5'}]
},
tiered_pricing_model: {
tiers: [
{
min_units: 0,
fixed_fee: '10.00',
max_units: 10000,
price_per_unit: '0.02',
unit_price: '5.00'
}
],
units: 10
},
trial_period_days: 30,
unit_pricing_model: {price_per_unit: '0.05'},
volume_percentage_pricing_model: {percentage: '2.0', price_per_unit: '0.05', fixed_fee: '5.00'}
},
product_id: 'prod_abc123'
}
],
maximum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
minimum_spend: {amount: '500.00', period: 'monthly', billing_direction: 'arrears'},
payment_terms: 'net_30',
price_escalation: {
enabled: true,
interval_months: 12,
type: 'percentage',
escalate_metered_unit_rates: false,
percentage: '5.00'
},
renewal_duration: 12,
tags: ['tag_abc123'],
trial_period_days: 14
})
};
fetch('https://api.alguna.io/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2026-04-01T10:00:00Z",
"currency": "USD",
"id": "pln_01H1VECT",
"name": "Enterprise Plan",
"updated_at": "2026-04-01T12:30:00Z",
"description": "Full-featured enterprise plan"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}