Computes the same delta as create-subscription-change without writing a new version. Use this to drive approval flows or show the customer what is about to change before committing. See the Updating a Subscription examples.
curl --request POST \
--url https://api.alguna.io/subscriptions/{id}/changes/preview \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"bundle_id": "bun_abc123",
"items": [
{
"new_price": {
"billing_direction": "arrears",
"billing_interval": "monthly",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"charge_on_contract_start": false,
"display_order": 1,
"metric_ids": [
"<string>"
],
"trial_period_days": 30
},
"product_id": "prod_abc123"
}
],
"product_id": "prod_abc123"
}
],
"description": "Q3 upgrade",
"draft": false,
"effective": "next_billing_period",
"plan_id": "pln_abc123",
"remove": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"source_version_id": "subv_abc123",
"update": [
{
"add_items": [
{
"new_price": {
"billing_direction": "arrears",
"billing_interval": "monthly",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"charge_on_contract_start": false,
"display_order": 1,
"metric_ids": [
"<string>"
],
"trial_period_days": 30
},
"product_id": "prod_abc123"
}
],
"adjust": {
"billing_direction": "arrears",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"charge_on_contract_start": false,
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
]
},
"fee_type": "fixed",
"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"
}
],
"units": 10
},
"metric_ids": [
"<string>"
],
"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"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02"
}
]
},
"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"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"fixed_fee": "5.00",
"percentage": "2.0",
"price_per_unit": "0.05"
}
},
"bundle_id": "bun_abc123",
"items": [
{
"product_id": "prod_abc123",
"adjust": {
"billing_direction": "arrears",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"charge_on_contract_start": false,
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
]
},
"fee_type": "fixed",
"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"
}
],
"units": 10
},
"metric_ids": [
"<string>"
],
"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"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02"
}
]
},
"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"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"fixed_fee": "5.00",
"percentage": "2.0",
"price_per_unit": "0.05"
}
}
}
],
"product_id": "prod_abc123",
"remove_items": [
{
"product_id": "prod_abc123"
}
]
}
]
}
'{
"changes_applied": {
"added": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"removed": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"updated": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
]
},
"source_version_id": "subv_abc123",
"effective_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
API key authentication. Pass your API key as a Bearer token.
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"
Unique identifier for the subscription
Products or bundles to add
Show child attributes
Human-readable audit note
"Q3 upgrade"
Create as draft (true) or auto-publish (false, default)
false
When the change takes effect. One of: 'immediate' (now), 'next_term_renewal' (contract end), 'next_billing_period' (start of the next invoicing cycle), an ISO 8601 date (YYYY-MM-DD), or an RFC3339 timestamp (e.g. 2027-01-01T14:30:00Z).
"next_billing_period"
Swap to a new plan (provides base item set)
"pln_abc123"
Products or bundles to remove
Show child attributes
Version to compute deltas against (default: current active)
"subv_abc123"
Products or bundles to modify
Show child attributes
curl --request POST \
--url https://api.alguna.io/subscriptions/{id}/changes/preview \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"bundle_id": "bun_abc123",
"items": [
{
"new_price": {
"billing_direction": "arrears",
"billing_interval": "monthly",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"charge_on_contract_start": false,
"display_order": 1,
"metric_ids": [
"<string>"
],
"trial_period_days": 30
},
"product_id": "prod_abc123"
}
],
"product_id": "prod_abc123"
}
],
"description": "Q3 upgrade",
"draft": false,
"effective": "next_billing_period",
"plan_id": "pln_abc123",
"remove": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"source_version_id": "subv_abc123",
"update": [
{
"add_items": [
{
"new_price": {
"billing_direction": "arrears",
"billing_interval": "monthly",
"fee_type": "fixed",
"type": "fixed",
"billing_frequency": "recurring",
"charge_on_contract_start": false,
"display_order": 1,
"metric_ids": [
"<string>"
],
"trial_period_days": 30
},
"product_id": "prod_abc123"
}
],
"adjust": {
"billing_direction": "arrears",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"charge_on_contract_start": false,
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
]
},
"fee_type": "fixed",
"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"
}
],
"units": 10
},
"metric_ids": [
"<string>"
],
"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"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02"
}
]
},
"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"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"fixed_fee": "5.00",
"percentage": "2.0",
"price_per_unit": "0.05"
}
},
"bundle_id": "bun_abc123",
"items": [
{
"product_id": "prod_abc123",
"adjust": {
"billing_direction": "arrears",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"charge_on_contract_start": false,
"display_order": 1,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "arrears",
"description": "API usage charge",
"quantity_expression": "usage.api_calls",
"unit_price_expression": "0.01"
}
]
},
"fee_type": "fixed",
"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"
}
],
"units": 10
},
"metric_ids": [
"<string>"
],
"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"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 50000,
"tiers": [
{
"min_units": 0,
"fixed_fee": "10.00",
"max_units": 10000,
"price_per_unit": "0.02"
}
]
},
"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"
}
],
"units": 10
},
"trial_period_days": 30,
"unit_pricing_model": {
"price_per_unit": "0.05"
},
"volume_percentage_pricing_model": {
"fixed_fee": "5.00",
"percentage": "2.0",
"price_per_unit": "0.05"
}
}
}
],
"product_id": "prod_abc123",
"remove_items": [
{
"product_id": "prod_abc123"
}
]
}
]
}
'{
"changes_applied": {
"added": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"removed": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
],
"updated": [
{
"bundle_id": "bun_abc123",
"product_id": "prod_abc123"
}
]
},
"source_version_id": "subv_abc123",
"effective_at": "2023-11-07T05:31:56Z"
}