Change Subscription Rate Card
subscriptions.change_rate_card(strsubscription_id, SubscriptionChangeRateCardParams**kwargs) -> SubscriptionChangeRateCardResponse
/subscriptions/{subscription_id}/change-rate-card
Change Subscription Rate Card
Parameters
subscription_id: str
rate_card_id: str
The ID of the rate card to change the subscription to.
Returns
Change Subscription Rate Card
import os
from lark import Lark
client = Lark(
api_key=os.environ.get("LARK_API_KEY"), # This is the default and can be omitted
)
response = client.subscriptions.change_rate_card(
subscription_id="subscription_id",
rate_card_id="rc_jQK2n0wutCj6bBcAIrL6o07g",
checkout_callback_urls={
"cancelled_url": "https://example.com/try-again",
"success_url": "https://example.com/completed",
},
upgrade_behavior="prorate",
)
print(response.result)
{
"result": {
"action": {
"checkout_url": "https://checkout.uselark.ai/...",
"type": "checkout"
},
"type": "requires_action"
}
}
Returns Examples
{
"result": {
"action": {
"checkout_url": "https://checkout.uselark.ai/...",
"type": "checkout"
},
"type": "requires_action"
}
}