Skip to content

feat(api): Add charge and fixed charge endpoints documentation#472

Open
rsempe wants to merge 6 commits intomainfrom
charge-endpoints
Open

feat(api): Add charge and fixed charge endpoints documentation#472
rsempe wants to merge 6 commits intomainfrom
charge-endpoints

Conversation

@rsempe
Copy link
Contributor

@rsempe rsempe commented Dec 31, 2025

New REST endpoints were added for managing charges and fixed charges nested under plans in the API.

Add OpenAPI documentation for charge and fixed charge endpoints:

  • GET/POST /plans/{code}/charges
  • GET/PUT/DELETE /plans/{code}/charges/{charge_code}
  • GET/POST /plans/{code}/fixed_charges
  • GET/PUT/DELETE /plans/{code}/fixed_charges/{fixed_charge_code}

Add new schemas: Charge, ChargeInput, ChargeCreateInput, ChargeUpdateInput, ChargesPaginated, FixedCharge, FixedChargeObject, FixedChargeInput, FixedChargeCreateInput, FixedChargeUpdateInput, FixedChargesPaginated, FixedChargeModelEnum.

Update ChargeObject to include code and parent_id fields.

example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
add_on_code:
type: string
description: Unique code identifying an add-on. Either add_on_id or add_on_code is required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be described using allOf and oneOf:

required:
  - required_attr_1
  - required_attr_2
  - oneOf:
    - add_on_id
    - add_on_code

New REST endpoints were added for managing charges and fixed charges
nested under plans in the API.

Add OpenAPI documentation for charge and fixed charge endpoints:
- GET/POST /plans/{code}/charges
- GET/PUT/DELETE /plans/{code}/charges/{charge_code}
- GET/POST /plans/{code}/fixed_charges
- GET/PUT/DELETE /plans/{code}/fixed_charges/{fixed_charge_code}

Add new schemas: Charge, ChargeInput, ChargeCreateInput, ChargeUpdateInput,
ChargesPaginated, FixedCharge, FixedChargeObject, FixedChargeInput,
FixedChargeCreateInput, FixedChargeUpdateInput, FixedChargesPaginated,
FixedChargeModelEnum.

Update ChargeObject to include code and parent_id fields.
This adds OpenAPI documentation for the new subscription-level charge
override endpoints that allow customizing charges on a per-subscription
basis without affecting the original plan.

Add three new endpoints:
- GET /subscriptions/{external_id}/charges - List effective charges
- GET /subscriptions/{external_id}/charges/{charge_code} - Get a charge
- PUT /subscriptions/{external_id}/charges/{charge_code} - Override charge
Add OpenAPI documentation for new subscription fixed charge endpoints:
- GET /subscriptions/{external_id}/fixed_charges - List all fixed charges
- GET /subscriptions/{external_id}/fixed_charges/{code} - Retrieve a fixed charge
- PUT /subscriptions/{external_id}/fixed_charges/{code} - Override a fixed charge
Add OpenAPI documentation for subscription charge filter endpoints:
- GET/POST /subscriptions/{external_id}/charges/{charge_code}/filters
- GET/PUT/DELETE /subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
… endpoints

The API now supports `cascade_updates` on independent charge and fixed charge
update/destroy endpoints, in addition to the existing support on charge filters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants