#abuznego_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/1221931511436283944
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
For more context, I was trying to use proration_behavior as always_invoice but that does not allow us to add tax lines to the invoice since it comes in with status as paid right away.
Hi there! I recommend testing this out to land at the right behavior. You likely want create_prorations though note that even using this value may sometimes invoice immediately depending on a few things: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment
this will still trigger the invoice.created event?
It should, yes
Just tested and it didn't. It just added the proration amount to the next bill when billing period ends. @paper hedge
Can you share the invoice ID and/or subscription ID?
sub_1Oow8IF5n5KjLa7RNFFZfDya
taking a look on our end, thank you for your patience.
thanks!
Are you looking for the invoice.created event for this update request, https://dashboard.stripe.com/test/logs/req_P08ZXeaZMY6Vgw create an invoice for the prorations?
mmm i can't see that log
That is from the above subscription
Ah, that is because you're just creation proration, https://dashboard.stripe.com/test/logs/req_yJ2GC4VoSqSoT7 and not invoicing for it right away.
You could only get invoice.created is you specific to create an invoice for the prorations
how would I create an invoice just for those prorations?
What do you mean by that?
If I call the API to create an invoice for the customer, will it create it just for the proration charge lines?
You can cofnirm this behavior here: in_1OyKLXF5n5KjLa7RtalUATuL, yes in this case
It didn't work. It just created an empty invoice when I didn't include any params and just called API to create invoice for customer. What I was expecting was that it would include the pending invoice items
It seems like you're doing something else now. When yoiu make the call to create an invoice, https://docs.stripe.com/api/invoices/create#create_invoice-pending_invoice_items_behavior you can specifcy if you want to include or exclude the pending invoice item.
ah! I was missing that option. ok I think that works.
Great!
thank you! @tough pumice @paper hedge