#hollym
1 messages ยท Page 1 of 1 (latest)
Hi ๐ there is not prebuilt functionality that allows for prepaying for Subscriptions, if you would like to see behavior like that you will need to build it.
There are a couple options for handling this though.
You could look into leveraging customer balances:
https://stripe.com/docs/billing/customer/balance
With that approach you could add to the Customer's balance when they pay you outside of the Subscription, and then any Invoices finalized after that will pull from the Customer's credit balance first. A potential problem with this flow, is that you can't control which Invoice the balance gets applied to, so if another Invoice gets created before the one you don't want to charge it will start eating into the customer's balance.
Hmmm I don't quite understand how that would work though because we want them to still pay for the subscription in stripe
You would need to handle the payment as a one-off, one-time payment.
so we want to charge them today for 1/1/24 within stripe -- but the charge would have to be in stripe against that sub in order to create a credit balance for 1/1/24
got it - thank you
If you're going to process the payment separately though, you'll want to make sure the Subscription isn't going to automatically charge the Customer again when it renews resulting in them double paying (this is less of a concern if you are sending out invoices instead of using charge_automatically).
we're using charge_automatically :/
so we would either have to discount the subscription or create a credit balance right before the subscription is set to be charged, correct
?
Yup, you'll want to make sure the amount for that billing period is zero. Coupons, a trial period, a price with an amount of zero, or adjusting the Customer's credit balance are all approaches you could use for that.
But thinking through this again, I think creating an Invoice Item may work well. With those I'm pretty sure you can create an Invoice Item for a negative amount to offset the typical price of the Subscription, and you can use the subscription field to tie the Invoice Item to a specific Subscription so you don't have to worry about other Subscriptions consuming it.
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
oh that's interesting and could work
but would the invoice item have to be created right before the billing takes place? or can the invoice item be tied to the subscription at any time?
As long as no other Invoices are going to be created for the Subscription before the one you want to apply the Invoice Item to, it's safe to create it any time. The next Invoice for the Subscription will pull in the pending Invoice Item, so that's what you'll have to watch out for with that option.
I'm also going to make sure I capture your feedback that you'd like the ability to charge customers for a Subscription period that hasn't started yet, so the appropriate team can review that.
thank you!
ok that makes sense
is tying the invoice item to the subscription only available through the API or can stripe dashboard users also action the same thing?
In the dashbaord, I see a Subscription field in the Invoice Item creation modal that allows you to associate it with an existing Subscription (the product my test customer is subscribed to is called "Please buy this" ๐ which is why you see that in the Subscription dropdown).
Yup!
that was very helpful. will see if any of those options work. thank you!
Any time, happy to help!