#shubhamjha
1 messages · Page 1 of 1 (latest)
You can add additional data for your own reference in metadata field when creating Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata
no i want my own expiry date of a subscription on stripe
next upcoming incoice is paid with my expiry date not 30 days i want to give my own date in it
Checkout Session creation is for signing up the subscription only, and the subscription will only be created if the payment is made.
next upcoming incoice is paid with my expiry date not 30 days i want to give my own date in it
Do you mean after the subscription is created, you want to place an expiry date for the next invoice?
yes
Unfortunately, there's no such expiry settings for the future invoices.
One way I can think of is to set up the payment retry schedule in https://dashboard.stripe.com/settings/billing/automatic
Then you configure to cancel the subscription if all retries fail
If you're referring to Checkout Session expires_at, it refers to the expiry of Checkout Session link, not subscription
For example, customer won't be able to access the link after the expires_at timestamp
Please note that expires_at in Checkout Session can only be anywhere from 30 minutes to 24 hours after Checkout Session creation
Reference: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-expires_at
oh
yr i want to need the expiry date of a subscription
can i add my own subscription expiry date
You have to implement on your own, not with Stripe.
For example, if the payment of a subscription is not made with X days, then you use Cancel Subscription API to cancel the payment: https://stripe.com/docs/api/subscriptions/cancel
no sapose i have subscribe some plan in privious days and that subscription is expired in 5 days , but i want to chnge my subscription but i want to use my privious expiry date '
how can i do it
When the subscription is expired in 5 days
What does this mean? Subscription created by Checkout Session doesn't have expiry by default. How did you set up the expiry?
can i cahnge the 30 days of expiry date of a plan to set my own no of days on buying new plan?
Let's step back a bit. When a customer subscribes with Checkout Session, the customer will be deducted automatically every cycle with the payment method saved during Checkout Session.
What do you mean buying new plan? Customer will be charged on his/her card every cycle
When/what scenario will this 30 days of expiry kick in?
Can I update the subscription end date of a subscription in stripe using node js
Yes, you can use subscription schedule API to schedule when the subscription will end. The steps will be:
- Create subscription schedule from existing subscription: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
- Update subscription schedule created in Step 1 to set the
end_date: https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-end_date