#litterboks_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/1231873363794984960
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- litterboks_best-practices, 2 days ago, 28 messages
- litterboks_best-practices, 5 days ago, 37 messages
If the customer does not pay before the cycle ends in the worst case i sit on a domain for a year
Subscriptions invoices are prepaid (unless you are using metered usage billing), so your customer has already paid for the entire year.
Yes, and they get a full year. However before the next year starts i need the invoice to already be paid early.
If the invoice is sent on the day the subscription runs out its already too late
Customer subscribes on 1st of February 2024
I register a domain on 1st of February 2024
Customer has the domain until 1st of Feb 2025
On January 15th i want to send out the invoice so i definitiely know that the customer needs the domain another year
Got it, on 15 Jan you can use the invoices API to create an ad-hoc invoice, set https://docs.stripe.com/api/invoices/create#create_invoice-pending_invoice_items_behavior to include so that the pending invoice items that subscription has already created for this customer will be included in the ad-hoc invoice.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So the pending items exist already at this point of time?
they wouldn't in general; if you have a normal recurring subscription and you create an Invoice, nothing happens since there's nothing to Invoice. What jack means is like when the customer registers a new domain during an existing period you can add an item for that and invoice it at some point.
The other option is resetting the billing cycle anchor https://docs.stripe.com/billing/subscriptions/billing-cycle#reset-the-billing-cycle-to-the-current-time to force a payment.
Ultimately unfortuantely "just generate the next invoice early" is a common feature request but is badly supported in the Subscriptions API today , all the approaches have downsides