#silverry_best-practices
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1265188507786412096
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- silverry_best-practices, 19 hours ago, 5 messages
- silverry_best-practices, 20 hours ago, 12 messages
- silverry_best-practices, 23 hours ago, 43 messages
- silverry_best-practices, 6 days ago, 10 messages
Hi there, can you tell me what you want to achieve with billing portal? Is it about allowing your customer to self-help on subscription/payment method update?
hello, It’s like this: we hope to develop a web-based SaaS service where users can subscribe to or change plans. We want to be able to call Stripe’s payment page when changing plans and prompt for information such as the price difference and the effective time of the plan. How can we achieve this?
Ok, so you question is how to programmatically create a billing portal session so that you can share its url to your customer?
yes, create a stripe-host page so the customer can pay the bill
Got it, this doc will help you https://docs.stripe.com/customer-management/integrate-customer-portal
Is this feature supported for upgrades? For example, I have two plans, one is $30 and the other is $100. If a user is subscribed to the $30 plan and now wants to upgrade to the $100 plan, I would need to charge an additional $70. I hope that the left side of the page can remind the user that they are upgrading their plan, and the right side provides payment-related information. Is this something that can be done?
We do not wish to use the Customer Portal's subscription change plan directly because we want to implement a system where the plan downgrade takes effect next month, while the upgrade can take effect immediately. However, it seems that the Customer Portal currently does not support this, so we would like to develop the logic for subscription plan changes ourselves, but still use Stripe's payment page. Is this achievable?
No, subscription downgrade through billing portal is immediate. In that case you need to build your own UI and logic to manage a deferred downgrade.
So if we want to develop it ourselves, we need to develop the relevant subscription logic on our own website, but we still need to call Stripe for payment. Can I understand this as needing to call other services provided by Stripe? such as:https://docs.stripe.com/payments/checkout
What payment do you need to collect?
For example, if a user subscribes to our plan, they will be charged $30 per month. Or if a user upgrades their plan, they will need to pay $70 at that time, and then be charged $100 per month thereafter.
OK, so you can set proration_behavior to always_invoice if you want an immediate payment https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment
And Stripe will use the subscription's default_payment_method, or the customer's invoice_settings.default_payment_method to pay this invoice.
We expect to be able to call up such a page when changing the subscription plan as well. The left side of the page can remind users of the plan change and calculate the corresponding price and tax rate. Is there any documentation for reference?
You can use the upcoming invoice API https://docs.stripe.com/api/invoices/upcoming to preview the invoice and render it to your customer.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So, by using this interface, I can set up the desired page, and it will be accessible on a domain hosted by Stripe. Is that correct?
No, the API just returns you the data and you need to implement your own UI to present the invoice data
Is there a way for me to directly use a page hosted by Stripe? Similar to this:https://checkout.stripe.com/c/pay/cs_live_b1J1zDeiVBTykFkquDVomRCZqE8KGYVMji4TrCyIAVY5BZVrOOVZFsArxt#fidkdWxOYHwnPyd1blppbHNgWkZCdjV9fzBGc1JOQEFWVjVSXHZ9QDJqdycpJ2hsYXYnP34nYnBsYSc%2FJ2c0PGRkNjY2KD02NDwoMWQyNCg9MTY1KDExNTUxNDFgZ2E2YGQ0PGYwPCcpJ2hwbGEnPydhMjE0ZzwzZihjYTJhKDFgZDQoZ2c2YChkZmczZjdnNTczMWc3ZDIyZDInKSd2bGEnPyc3Y2djM2E2YyhgMmc0KDE1N2EoPDI2MShnYWE8NTI0MzcwZmBkMmM0YTEneCknZ2BxZHYnP15YKSdpZHxqcHFRfHVgJz8naHBpcWxabHFgaCcpJ3dgY2B3d2B3SndsYmxrJz8nbXFxdXY%2FKipkdXUrd3BrcmR8aGkrZmpoJ3gl
You mean embed a billing portal page your webpage? No.
No, it's about directly redirecting from our website to a page hosted by Stripe, where we can configure some of the content on the Stripe-hosted page and allow users to complete the payment.
What content do you want to configure?
Primarily, on the left side of the page, if the user is subscribing for the first time, it should display the subscription content as normal. If the user is upgrading, it should show that the user is in the process of upgrading.And the prices will differ depending on the different states.
No, there's no such custoization option for billing portal.