POST /subscriptions/subscribe
Generates subscription for customer and returns a link to checkout session where user can review payment details, provides payment information, and purchase a subscription. Body params -
Returns
checkoutLink url with checkout form.
Stripe call snippet -
More information about stripe checkout object - link
POST /subscriptions/cancel-subscription
Cancels prolongation of a customer’s subscription. The customer will not be charged again for the subscription. Stripe call snippet -
More information about subscription update - link
POST /subscriptions/upgrade
Changes customer’s subscription plan (billing period or subscription plan) Body params -
Stripe call snippet -
More information about subscription update - link
GET /subscriptions/current
Returns detailes subscription information along with pending invoice Stripe call snippet -
More information about products - link
More information about invoices - link
GET /subscriptions/preview-upgrade
Returns invoice with billing information of subscription upgrade/downgrade Query params -
Returns invoice with payment details
Code snippet -
In case the customer chooses free plan, we need to send a custom price object to stripe with unit_amount set to 0 in order to receive invoice with empty products and information about a refund for canceled subscription
Price data parameters -
More information about previewing upcoming invoices - link
