Cancel an Add-On
/api/subscriptions/{subscription_id}/addons/{addon_id}/cancel/
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/addons/{addon_id}/cancel/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'
lotus.cancel_addon(
subscription_id='sub_e953bfbf42a442ca90079c8f1656d306',
addon_id='addon_5af61a194ca144478fb2721dd34c9049',
flat_fee_behavior='charge_prorated',
invoicing_behavior='invoice_now'
)
Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
The ID of the addon within the subscription update.
The ID of the subscription to update.
Body
When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged.
refund
- Refundcharge_prorated
- Proratecharge_full
- Charge Full
refund
, charge_prorated
, charge_full
, null
Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now.
add_to_next_invoice
- Add to Next Invoiceinvoice_now
- Invoice Now
add_to_next_invoice
, invoice_now
If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full.
bill_full
- Bill Fullbill_none
- Bill None
bill_full
, bill_none
Response
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/addons/{addon_id}/cancel/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'