Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/resources/subscription_fixed_charge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ get:
summary: Retrieve a fixed charge for a subscription
description: |-
This endpoint retrieves a specific effective fixed charge for a subscription.
If the subscription has a plan override with a fixed charge override, the overridden fixed charge is returned.
The `units` reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.
operationId: findSubscriptionFixedCharge
parameters:
- $ref: "../parameters/subscription_status.yaml"
Expand All @@ -29,9 +29,9 @@ put:
parameters:
- $ref: "../parameters/subscription_status.yaml"
description: |-
This endpoint creates or updates a fixed charge override for a specific subscription.
If the subscription does not have a plan override yet, one will be created automatically.
The fixed charge override allows customizing specific fixed charge properties (invoice_display_name, units, properties, taxes) without affecting the original plan fixed charge.
This endpoint creates or updates a fixed charge override for a subscription, without affecting the original plan fixed charge.
When the body contains only `units` (and optionally `apply_units_immediately`), the change is recorded as a per-subscription unit override. When the body also sets `invoice_display_name`, `properties`, or `tax_codes`, it is applied as a full plan override for the subscription instead.
With `apply_units_immediately: true` on a pay-in-advance fixed charge the change is billed mid-period; otherwise it takes effect at the next billing period.
This is a premium feature.
operationId: overrideSubscriptionFixedCharge
requestBody:
Expand Down
2 changes: 1 addition & 1 deletion src/resources/subscription_fixed_charges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ get:
summary: List all fixed charges for a subscription
description: |-
This endpoint retrieves all effective fixed charges for a specific subscription.
If the subscription has plan overrides with fixed charge overrides, the overridden fixed charges are returned.
The `units` of each fixed charge reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.
operationId: findAllSubscriptionFixedCharges
parameters:
- $ref: "../parameters/page.yaml"
Expand Down
5 changes: 4 additions & 1 deletion src/schemas/FixedChargeObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ properties:
description: List of all thresholds utilized for calculating the fixed charge.
units:
type: number
description: The number of units for the fixed charge.
description: |-
The number of units for the fixed charge.

When retrieved through a subscription-scoped endpoint (e.g. `GET /subscriptions/{external_id}/fixed_charges`), this reflects the per-subscription unit override when one exists, and falls back to the plan-level units otherwise. Plan-scoped endpoints always return the plan-level units.
example: 1
lago_parent_id:
type:
Expand Down
3 changes: 2 additions & 1 deletion src/schemas/PlanOverridesObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ properties:
example: "0.5"
fixed_charges:
type: array
description: Additional fixed charges for this plan.
description: |-
Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.
items:
type: object
required:
Expand Down
1 change: 1 addition & 0 deletions src/schemas/SubscriptionCreateInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ properties:
description: The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
plan_overrides:
$ref: "../schemas/PlanOverridesObject.yaml"
description: Overrides applied to the plan for this subscription. A units-only `fixed_charges` override is recorded as a per-subscription unit override without creating a plan override; any other override creates a plan override for the subscription. See `fixed_charges` for the exact rule.
invoice_custom_section:
$ref: "./InvoiceCustomSectionInput.yaml"
payment_method:
Expand Down
1 change: 1 addition & 0 deletions src/schemas/SubscriptionUpdateInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ properties:
description: The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
plan_overrides:
$ref: "../schemas/PlanOverridesObject.yaml"
description: Overrides applied to the plan for this subscription. A units-only `fixed_charges` override is recorded as a per-subscription unit override without creating a plan override; any other override creates a plan override for the subscription. See `fixed_charges` for the exact rule.
invoice_custom_section:
$ref: "./InvoiceCustomSectionInput.yaml"
payment_method:
Expand Down
Loading