#mangle8582
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mangle8582, 6 hours ago, 20 messages
- mangle-subscription-previewchanges, 17 hours ago, 116 messages
- mangle-subscription-refund, 1 day ago, 92 messages
- mangle8582, 2 days ago, 77 messages
- mangle8582, 5 days ago, 36 messages
Can I create a subscription that starts at the end of monthly while keeping Monthly removed or something? And not use Stripe Schedules?
What's the easiest way to achieve this?
Are you getting errors when you attempt t update the subscription? Do you have a request ID I can take a look at?
The subscription is managed by the subscription schedule sub_sched_1OD9P0DmVlmqORBIIntZni3g, and updating any cancelation behavior directly is not allowed. Please update the schedule instead.
Personally, i don't wanna use Stripe Schedules, but i thought they mix with normal subscription update and creation.
If there is a way to achieve Upgrade to Yearly and that Yearly so start at the end of current Monthly plan it could be nice
?
I'm looking - sorry the channel is a bit busy and I'm talking to multiple people
No worries
Starting with your first question on cancelling the subscription - instead of cancelling the subscription directly all you'd have to do is update the end_behavior of the schedule to be cancel in stead of release. That will automatically cancel the subscription + schedule after the schedule is done with all of it's phases
Yea but in that case i will need to transition fully to Stripe Schedules
Right now i have subscription.create /update/cancel
If you want to model updating to a different price at the end of the current price then really your only option is to use schedules
const newSubscription = await stripe.subscriptions.create({
customer: currentSubscription?.customer_id,
items: [{
price
}],
billing_cycle_anchor: subscription.current_period_end
});
Would i have a chance to do it without Stripe Schedules like this?
To have 2 subscriptions, one active Monthly and one pending on Yearly
I understand, would i receive clientSecret from schedules then? to send it back to frontend to i can pay with stripe elements?
If i replace subscriptions.create?
Yeah, if you create the schedule with a startd_date of now you should get back a subscription. You can grab the Subscription, and finalize it's latest_invoice to get a Payment Intent
Alternatively, you could keep your Subscriptoin creation code the same, and once the Subscription has been paid for you can create a Schedule from it
What about clientSecret? They finalize the invoice by paying in Stripe Elements from Client Side
I'm not doing anything manually right now
await stripe.confirmCardPayment(clientSecret
By doing this on frontend i receive payment intent and user pays for subscription if card is ok
Paying in stripe elements doesn't finalize the Invoice. The Invoice is finalized as soon as the subscription is created
Okay, that's fine, i create subscription and send the clientSecret back to frontend to pay, can i do that with Stripe Schedules as well?
Also, do i have somewhere in Dashboard where to manage the Stripe Schedules? I didn't found anything
With Subscription Schedules you'd do what I mentioned before - after creating the schedule you'd get back a Subscriptoin. You need to grab the latest_invoice of the Subscription and finalize it so that the Invoice has a Payment Intent you can use to complete payment
Yea but i can't do anything with payment intent or finalize invoice, ReactJS Stripe Client requires clientSecret
- I create Subscription
- After Subscription is created i take clientSecret and pass it to frontend
- Frontend uses Stripe Client with clientSecret to pay after user adds the card
- Everything else with invoice happens and invoice.paid triggers and then i add to database
What can i do with Subscription and finalizing the invoice, if i don't have a clientSecret to pass to frontend
getting the Subscription after creating the subscriptoin schedule and finalizing the invoice are all things you would do in step 1 (BEFORE you even get back to your frontend)
It's all things you would do server-side
Ok that's good, and then? In the response i get clientSecret so i can send it to frontend?
Yeah, once you finalize the Invoice it'll have a Payment Intent w/ a client_secret you can send back to your backend
Perfect, so i should stick up to Stripe Schedules to achieve that
By creating another subscription with Subscription.create and keeping it Pending it could lead to bugs i suppose
Stripe Schedules can avoid that i suppose
Yeah, I wouldn't recommend keeping two subscriptions at once - it'll be unnecessarilly complicated for you to manage
Sounds good, i'll switch everything to Stripe Schedules then, Thank you for helping