#Yul
1 messages ยท Page 1 of 1 (latest)
Hi there
Hi
If a Sub has been moved to a status of canceled then it can't be un-canceled and a new one needs to be created
okay, ty for that
In terms of renewing the Sub before it is moved to canceled, if the most recent Invoice is successfully paid then the Sub will move back to active
See: https://stripe.com/docs/billing/subscriptions/overview#unpaid-subscriptions for talking about unpaid Subscriptions
So... If the sub is not canceled then I should try to update it
Is that what you're saying?
Well you don't really need to update it, you just pay the invoice
I'm talking about API...
Unless you want to change the Price
But yeah, I wouldn't create a new one unless the Sub is canceled.
Does this code:
$session = $stripe->checkout->sessions->create([
'customer' => $cus_id,
'success_url' => 'https://example.com/',
'cancel_url' => 'https://example.com/',
'mode' => 'subscription',
'line_items' => [[
'price' => $priceId,
// For metered billing, do not pass quantity
'quantity' => 1,
]],
]);
handle the subscription upgrade?
A Checkout Session will always create a new Subscription
okay..
You use https://stripe.com/docs/api/subscriptions/update if you want to update an existing Sub
But this code updates the sub immedeitely?
Yes
And he needs to pay before that
What are you trying to update exactly?
Like if all you want is the Subscription to move to active then you don't need to update it at all
It will automatically move to active once the most recent Invoice is paid
I want to upgrade it for someone from silver to gold
user already has silver but he wants to upgrade to gold...
Oh okay then yeah that would involve changing the Price
So yes that is the right endpoint
Immediate payment
Stripe immediately attempts payment for these subscription changes:
okay I see this..
Yep
But how do I redirect him to payment?
As I understood correctly he will pay just extra, not the full price..
Well that depends. Is the customer on your site when this update occurs?
yeah
Gotcha I got to step away but my colleague will hop on and can talk to you about how to do that
ok
What's the point to use the same method..
but I have his cus_ID
Hi there ๐ taking over.
So if you're doing an upgrade/downgrade of a Subscription, you should already have a payment method on file for that Customer correct?
Nah, I'm not saving it. The only things I'm saving are: sub_ID and cus_ID
on my end
Things are in the development stage.. ๐
Wait, so you're going to manually recollect payment details everytime the Subscription comes due? Or are you going to email them an Invoice?
customers pay with cc..
click buy -> go to the payment page -> enter CC -> redirect to merchant
I don't even know whats the policy on sub upgrades.. Is it full or only extra? Subs are going to pay yearly
I have no idea what that question means. I would recommend building out the simpler parts of this integration first to familiarize yourself with how this stuff works before asking questions about advanced billing scenarios.
For example my sub is on silver subscription and pays 50 eur / month and he wants to upgrade it to gold which is 100 eur / month. How do I do that?
He payed with a CC and I would like him to pay extra immediately
Have you built the regular subscription flow yet?
ye
Can you send me an example of a test mode subscription ID that you created so I can see how it's being done so far?
Also, refer to these docs on how to do upgrades/downgrades: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
Well I'm refering but I want him to pay the extra first, then update the subscription
sub_1MeLe1HbqfWKlyWy3apBlXCH
I dont actually know, maybe upgrade for free and pay more on next cycle is the default way..
I mean, if you create prorations and choose invoice_immediately when you update the Subscription, you can create a charge for the proration. But I have no idea if that's what you're asking about
Is it possible to charge the customer immediately after sub upgrade and if he doesn't pay the no upgrade? Same as on new subscription?
No. The upgrade will still happen, but the Invoice will have status: "requires_payment_method" so you would then do whatever action you normally would when a payment fails
So you're saying I should check on my end not only the expiry date, but also the payment method in order to check if the subscription is active?
No that's not what I said at all. I'm saying you would handle the failed payment like you handle your other failed payments
The key here is that the payment will be charged automatically like on sub renew... This I was thinking wrong.
You said you were not going to have a Payment Method on file to charge automatically. So now you are?
Isn't that what Stripe do?
Yup
Are you saying that I need to charge subscribers manually from my end on each billing cycle?
Thank god. You got me scared there
The answers to these questions are readily available in our docs, and your questions are consistently ambiguous. You should already know how Payment Methods are handled before you ask about advanced billing scenarios. Please read our docs before asking additional questions. We cannot walk you through every single step of the process.
yeah