#ozolan - billing portal and webhook
1 messages · Page 1 of 1 (latest)
Hi @cold onyx, thank you for your help. I am trying to implement stripe into my SaaS product and I'm using the Billing Portal to manage customer plans. If I have two plans, Basic and Pro Plan and some customer downgrade from Pro to Basic, the billing portal automatically updates information to Basic but I really wanted to show something like: Pro until X day and then automatically renews to Basic.
Is this possible ?
Pro until X day and then automatically renews to Basic
It sounds like you want to schedule a future change on the subscription
Is that right?
The Portal doesn't support scheduled changes currently, though you can do so with subscription schedules via the API:
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#downgrading-subscriptions
Yes, something like that. But I am using the inbuilt billing portal
Sure, but scheduled future changes are not currently supported in the Portal
The portal provides features that allow your customers to:
Update subscriptions.
Cancel subscriptions.
Pause subscriptions.
Resume subscriptions.
View their active subscriptions.
View their current and past invoice history, and download invoices.
Update payment methods.
Update billing information, including their tax IDs.
Ok, I think I will need to implement that functionality myself. Thank you. Can I ask one other question about webhooks please?
I'm currently using customer.subscription.created and customer.subscription.updated to handle my customers subscriptions. When subscriptions are paid every month, which webhooks should I listen?
Should it be invoice.payment_succeeded?
invoice.paid is the better event to use
Because if for example your customer has some credit an invoice might not involve a new payment, but will always produce invoice.paid once successfully paid, even if out of their balance
Perfect, didn't know about that. I will use invoice.paid to listen to new payments. Should I also wait for invoice.paid on customer subscription created? Or customer.subscription.created only happens when the payments was processed?
That depends on your integration pattern, you can create subscriptions without invoices being paid, eg by following our suggested pattern with payment_behavior=default_incomplete
Do you know what is the common case for SaaS products ? Maybe should I accept the customer and then watch for the payment ?
I saw this example from github and it seems they only handle invoice.payment_succeeded to keep the database updated
hello! catching up here
you can use invoice.payment_succeeded or invoice.paid and use billing_reason on the Invoice for whether it was a new Sub or a recurring Invoice: https://stripe.com/docs/api/invoices/object?lang=curl#invoice_object-billing_reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hello hmunoz ! Are invoice webhooks instant like customer.subscription or they are delayed? My question is because I want my customers to start using the app right after introducing card details
My question is because I want my customers to start using the app right after introducing card details
they are near instant really, test them out in test mode, live mode would be faster than test mode due to priorityu of webhooks
Perfect, I will test them. Thank you so much for your help. Awesome support