Start Subscription Timeline
subscription_timelines.start(strsubscription_timeline_id, SubscriptionTimelineStartParams**kwargs) -> SubscriptionTimelineStartResponse
/subscription-timelines/{subscription_timeline_id}/start
Start Subscription Timeline
Parameters
subscription_timeline_id: str
effective_at: Optional[Union[str, datetime]]
When the subscription should become active. If not provided, the current date and time will be used.
formatdate-time
Returns
Start Subscription Timeline
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.subscription_timelines.start(
subscription_timeline_id="subscription_timeline_id",
checkout_callback_urls={
"cancelled_url": "https://example.com/callback",
"success_url": "https://example.com/callback",
},
)
print(response.result)
{
"result": {
"action": {
"checkout_url": "checkout_url",
"requires_action_type": "checkout"
},
"result_type": "requires_action"
}
}
Returns Examples
{
"result": {
"action": {
"checkout_url": "checkout_url",
"requires_action_type": "checkout"
},
"result_type": "requires_action"
}
}