#atsuo-konishi_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/1316694788577431616
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! I think that's perfectly possible yes, it's just not something with any native representation in Stripe itself. From the API/product perspective you just have a single Customer object with a single PaymentMethod and Subscription. It would be your own system and logic that sets up the concept of multiple users being associated with that Customer object and one of them being the 'main purchaser' and logic that chooses what amount to set up for the subscription including any discount.
Thank you very much.
I just have a further request and would like to discuss it with you.
In this system, we would like the contract between the student and the tutor to be in the form that the student has classes every week on x days of the week.
This would mean that the number of lessons would vary from month to month (some months have 4 lessons and some months have 5 lessons, no matter what day of the week it is).
In other words, the monthly fee would be different (cheaper in months with 4 classes and more expensive in months with 5 classes).
Is it possible to implement such a pay-as-you-go subscription and cooperative purchasing at the same time?
well you can for example have the subscription using a 'base' Price for any amount(and that amount can be $0 if you want total flexibility), and manually add invoice items for extra amounts at any point during the billing period, to be pulled into the next recurring payment. That might be an option.
https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items
By “manually add invoice items for extra amounts,” do you mean that it may be difficult to fully automate this process?
I am also concerned about the compatibility of joint purchases and subscriptions.
I apologize for the abstract nature of this question, but I wonder if you can provide some answers.
well the automation would be in your own system. When your own business logic indicates that there need to be 5 lessons instead of 4 this month, your code calls the Stripe API to add an extra InvoiceItem , for example.
Thank you very much! I will investigate based on the information you provided. If possible, based on what you just told us, can you tell us what type of stripe API you are likely to use?
I'm not sure what you mean by "what type of Stripe API".
I mean Billing API ,Subscription API etc for example
it would be all of those, the /v1/subscriptions API, the /v1/invoice_items API, it's best to work from the examples in the documentation as every integration will be using multiple different endpoints and API namespaces.