feat(api): Add charge and fixed charge endpoints documentation#472
Open
feat(api): Add charge and fixed charge endpoints documentation#472
Conversation
groyoh
approved these changes
Dec 31, 2025
| 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. |
Contributor
There was a problem hiding this comment.
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.
419d528 to
f44d2ee
Compare
781ab4a to
35d10df
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}/chargesGET/PUT/DELETE /plans/{code}/charges/{charge_code}GET/POST /plans/{code}/fixed_chargesGET/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
codeandparent_idfields.