#coding-lover_code
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/1359447243220062210
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
adding stripe related fields in mongoose schema
I think i only need customer id and subscription id in schema because all other fields i also fetch from stripe
You can also list Customer's Subscriptions via Stripe API, you don't necessarily need to save it in your own database: https://docs.stripe.com/api/subscriptions/list#list_subscriptions-customer
In my case there is single monthly and yearly plan, I want to ask for example subscription fees is 10$ per month and after some months i changed it to 20$ per month, In case of existing customers when there subscriptions renew does stripe charge 20$ or 10$?
and I'm building custom subscriptions plans page does I need stripe hosted checkout page?
i changed it to 20$ per month
What did you change exactly?
No, you can build a Subscription integration in many ways: https://docs.stripe.com/billing/subscriptions/build-subscriptions
in future i will change it to 20$
So I'm thinking I need to go with stripe elements instead of checkout
So you created a new Price for $20 and updated the Subscription Items for the new Price on existing Subscriptions?
yes also with lookup key
When you change the Price object to a new one, you should make sure you update all of the existing Subscriptions, and also create new Subscriptions with the new Price ID.
I want existing users pay old price and new users pay new price
Then you just need to create new Subscriptions with the new Price, and not update existing Subscriptions.
ok
does it is possible to make one time payment also when user subscribe to subscription?
I want to charge for onetime payment and for subscription in one go
Yes, you can use add_invoice_items when creating the Subscription to add one-time Prices to the first Invoice: https://docs.stripe.com/api/subscriptions/create#create_subscription-add_invoice_items
i want to charge initially not when subscription renews
Yes, this is what it will do.