#litterboks_best-practices

1 messages ¡ Page 1 of 1 (latest)

fathom oliveBOT
#

👋 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.

trim parrotBOT
#

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.

old garnet
#

If the customer does not pay before the cycle ends in the worst case i sit on a domain for a year

glad sand
#

Subscriptions invoices are prepaid (unless you are using metered usage billing), so your customer has already paid for the entire year.

old garnet
#

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

glad sand
#

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.

trim parrotBOT
old garnet
#

So the pending items exist already at this point of time?

shadow pecan
#

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