#ansalam-d_api
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/1326088032461393920
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! invoice_now only generates a final invoice for any un-invoiced metered usage and new/pending proration invoice items. There doesn't seem to be anything pending for sub_1QeKxyI3bA2wn9Gq7FVWqbRb.
[0] https://docs.stripe.com/api/subscriptions/cancel#cancel_subscription-invoice_now
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
could you please elaborate the above one ?
The price (price_1Pp3KyI3bA2wn9Gq0Xru8q26) used for the subscription (sub_1QeKxyI3bA2wn9Gq7FVWqbRb) is for $0. The first invoice of $0 is also paid. So there are no new / pending prorated invoice items for this subscription. Hence, no invoice was created.
I want to cancel subscription and invoice the user for the usage of our service till the point of cancellation. We usually fill the invoice thru APIs.
How do I implement this ??
Can I check what do you mean by "fill the invoice thru APIs"?
A draft invoice is created at the end of billing cycle by stripe and we add/update items to the invoice by API.
Did you attempt to add/update the invoice for sub_1QeKxyI3bA2wn9Gq7FVWqbRb before cancelling?
no I didn't do any of that.. Should I be doing that ??
like create a draft invoice and update the invoice and then cancel it ??
Can I get a better understanding of how you charge your customers? You create a subscription for a $0 price. You then add / update the items when a draft invoice is create during each billing cycle?
yes..
there ???
yes. What specific problem aer you facing right now?
I cancelled the subscription with invoice_now set to true via API to see if any invoice is created.. But it didn't as explained by previous mod in this thread.. So my use case is this
How do I implement this ??```
can you report the invoice item first , and then call the delete API?