#daniel-archer_best-practices
1 messages ยท Page 1 of 1 (latest)
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.
- daniel-archer_api, 13 hours ago, 4 messages
๐ 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/1276235361026048112
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
The doc you linked shows how you can save payment methods for later usage.
But I'm not clear on what you mean by billing them in a single transaction.
Can you specify the billing periods/subscriptions you are interested in?
Hi, thanks for helping.
Yes, we have 30 day and 90 day recurring prices, as well as one_time prices. We'd like to be able to use a SetupIntent to capture the charge for all the initial plans in total, and then convert those items into Subscriptions.
Setup Intents do not capture funds, period.
And you cannot mix & match billing cylces into the same Subscription.
You can bill one-off items along with recurring items on a single Subscription
But that still leaves the 30 & 90 day billing cylces as separate subscriptions, with their own Invoices
Ok, so what would you recommend for the initial purchase? Would we create a SetupIntent, then create individual Subscriptions that get paid from the saved payment method?
I just want to make sure I'm clear by what you mean as the "Initial purchase". But first I will spell out what would happen using Setup Intents.
- Use a setup intent to save a Payment Method to a Customer
- Update the Customer to set this payment method as the default for Subscriptions/Invoices
- Create 30 day Sub with the one-off invoice items added - first invoice paid automatically
- Create 90 day sub - first invoice paid automatically
In this flow the customer would see 2 separate charges and receive 2 invoices. I'm guessing you want a single amount though.
Yes, that flow makes sense. Ideally, this would land in a single charge and the subscriptions are setup for recurring billing past that.
Unfortuntaley that last bit is the tough part. That flow would result in ongoing 30 day and 90 day billing cylces that charge the customer using the default payment method.
However, getting the first payment to occur all-together is the tricky part.
Yes, the first payment is tricky for us.
One way I could think of doing this would be to make both subscriptions, generate the invoices but not charge them, then make a separate Payment Intent for the total of both Invoices, and mark the actual Invoices as paid_out_of_band.
But this is tricky (the first Invoice of a Subscription finalizes immediately and attempts to charge the Customer) and it breaks the connection between the first payment and the Subscriptions which can make reporting very difficult.
What if we created the Subscriptions with an initial trial period?
Not great for reporting, but we could reconcile it against the initial payment
The trial period would create Invoices for $0 for both subscriptions
Could we start the Subscriptions with a billing anchor date in the future?
You would still want to use a trial period since, in that case, it would generate a prorated Invoice for the period between when you create the Subscription and when the billing cycle starts.
However, Subscription Schedules does allow for starting subscriptions in the future.
What's the status of the subscription in the interim, if we used Subscription Schedules?
The Subscription does not start, it does not exist until the start_date is set. So that might not be what you are looking for either
I'm trying this from the dashboard and it looks like I can choose a billing anchor date up to 30 days in the future for a 30 day subscription
And then when I create it, the Subscription is in an active state and no invoice is generated yet
This feels like the way to go - will billing anchor date
The Dashboard creates a Subscription Schedule but I do encourage you to use Test mode (both through the Dashboard and in the API) to test out and validate different approaches to make sure they fit your use case.
I would also add a Test Clock so you could quickly advance time and see how the billing cycle starts, what the state of the Invoice is, and all those details