Create Subscription
/subscriptions
Create Subscription
Body Parameters
rate_card_id: string
The ID of the rate card to use for the subscription.
subject_id: string
The ID or external ID of the subject to create the subscription for.
metadata: optional map[string]
Additional metadata about the subscription. You may use this to store any custom data about the subscription.
subscription_timeline_id: optional string
The ID of the subscription timeline to use for the subscription.
Returns
Create Subscription
curl https://api.uselark.ai/subscriptions \
-H 'Content-Type: application/json' \
-H "X-API-Key: $LARK_API_KEY" \
-d '{
"rate_card_id": "rc_AJWMxR81jxoRlli6p13uf3JB",
"subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE"
}'
{
"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"
}
}