Subscriptions
Update a subscription
Subscriptions
Update a subscription
Cancel auto-renew or change the end date of a subscription.
POST
/api/subscriptions/{subscription_id}/update/
X-API-KEY*
Authorization*
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/update/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'
lotus.update_subscription(
subscription_id='sub_a623349004cd4947aca1851c64aa6fbd',
turn_off_auto_renew=True
)
lotus.update_subscription(
subscription_id='sub_a623349004cd4947aca1851c64aa6fbd',
end_date='2022-02-23 03:30:00+00:00',
)
Authorizations
Authorization[header]required
string
Token-based authentication with required prefix "Token"
Path Parameters
subscription_idrequired
string
The ID of the subscription to update.
Body
end_date
string
Change the end date for the subscription.
metadata
object
Update the metadata for the subscription.
turn_off_auto_renew
boolean
Turn off auto renew for the subscription
Response
addonsrequired
array
auto_renewrequired
boolean
Whether the subscription automatically renews. Defaults to true.
billing_planrequired
object
customerrequired
object
end_daterequired
string
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
fully_billedrequired
boolean
is_newrequired
boolean
Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.
metadatarequired
object
start_daterequired
string
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
subscription_filtersrequired
array
subscription_idrequired
string
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/update/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'