#wbrian_best-practices

1 messages ¡ Page 1 of 1 (latest)

keen fernBOT
#

👋 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/1333523313032429578

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

dusky scaffold
#

Hello, good question. There are a couple ways to do this, though our subscriptions do assume that there is some recurring price that is fixed in some way. Can you tell me a bit more about what you want one of these invoices to look like?

shell cloak
#

For example, we may have account that pays a fixed base rate, then some variable rate based on feature usage. These calculation may follow tier rules or some other wacky setup agreed to by contract that i can't change.

#

We also have accounts which are simply billed. These are company accounts that are purchasing onlined education courses for users under their company account. We then bill the company at the end of the month based on which courses were checkout out.

#

Our company sells online education both to individuals and to company accounts that manage their own learners.

#

Our current system allows us to simply charge their stored credit card (stored_card->Charge( 123.45, 'Monthly Services' )), while our existing billing and invoicing system handles the paperwork.

dusky scaffold
#

Gotcha, for that last part with charging the stored card. Does that mean that you are scheduling those payments? And if so do you want your system to still manage the scheduling or is that a thing you are looking to move on to Stripe?

#

The basic way that Stripe billing works is via Invoice objects which can either be generated one-off or automatically by our Subscription objects based on a regular cycle

shell cloak
#

We could probably go either way with that, but i'm trying to find the solution that will best fit existing functionality so as not to rock the boat too much

#

We have an internal billing system that handles frequency, amounts, labels, as well as the actual card charge if the customer has put a card on file. If the customer has not put a card on file, we send them their invoice and they may pay by ACH, check, or other

keen fernBOT
dusky scaffold
#

Good to know. And do you know what you definitely want Stripe to handle here? We have similar functionality to much of that, so depending on how much you want to happen on your side vs Stripe's you could accomplish this a few different ways with out APIs.
If your system still wants to handle scheduling and invoice creation and just wants to utilize Stripe to charge a certain amount on a saved payment method, you could use our flows that work directly with our PaymentIntents and SetupIntents APIs, which would let you save a payment method (with or without taking a payment upfront) and then charge that payment method later.
https://docs.stripe.com/payments/save-during-payment#charge-saved-payment-method
Offloading more on to us, we have our Invoices API where you create a bunch of invoice item objects for a customer, then create and finalize an invoice. Stripe would calculate the total amount, create a PDF, and can also do things like send emails to customers.
https://docs.stripe.com/invoicing/integration
And then there is our subscriptions API which is where you'd create subscriptions that define regular amounts that a customer should be charged and how often they should be charged like that. With that one you can create invoice items on the customer throughout the cycle and those would also be included on the next invoice generated by the subscription.
https://docs.stripe.com/billing/subscriptions/overview