#taviksha-akar_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/1281226060901384295
๐ 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.
- taviksha-akar_api, 27 minutes ago, 12 messages
- taviksha-akar_api, 1 day ago, 22 messages
- taviksha-akar_api, 2 days ago, 16 messages
Hi, let me help you with this.
Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
The Invoice ID is usually available under latest_invoice: https://docs.stripe.com/api/subscriptions/object#subscription_object-latest_invoice
The update should attempt to pay the Invoice immediately...
I would need to look at an example to be able to tell
https://dashboard.stripe.com/test/subscriptions/sub_1Puw2GIE5Vvk0efGgnzix1lZ
This is one of the subscription. I have updated the subscription using update api then invoice has been created -
https://dashboard.stripe.com/test/invoices/in_1PveVMIE5Vvk0efGaUF40WXG
So how can i get this invoice when I have updated subscription. I need to get this invoice at the same time when subscription update so that I can use to further.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Here this invoice is created with draft status
hello are you checking this
Yes, I am, please give me some time.
You are actually updating a Subscription Schedule here, which is not exactly the same. What are you trying to achieve exactly?
when updating a Subscription Schedule, it is creating a draft invoice, so firstly I want to make the status to paid and not draft and secondly when this invoice is created how can i get this invoice when subsciption is updated so that i can send this invoice to customer mail and do other events on it.
I understand that. I am more curious about why do you want to create an Invoice when you update the Schedule (not the Subscription). What's your use case?
Also, if you want it to be "paid" automatically, why would you need send it to the customer then?
When updating schedule it I am increasing quantity or price of the product then customer should be charges for it. That's why I am creating invoice.
And I want to send it to the customer to show the customer what changes have been made to the schedule and why extra charge has been taken. The invoice is not only used to send mail to customer but also for my internal process like I want to store that invoice in my database also.
I see. The Invoice will usually finalize in an hour after the draft was created, and if a Payment Method is attached, a payment attempt will be made.
By "get this invoice" you mean the Invoice PDF?
Can be be paid automatically without wait for an hour?
No the invoice object.
๐ stepping in
When you update the Subscription Schedule you want to also expand the subscription.latest_invoice
That is the way to see the data of the generated Invoice
In terms of paying immediately without waiting, you would then call the /pay endpoint to do this: https://docs.stripe.com/api/invoices/pay
I said that above:
When you update the Subscription Schedule you want to also expand the subscription.latest_invoice
If you aren't familiar with expansion then take a read through https://docs.stripe.com/expand
Yes you said is above but I have asked different thing. I have asked if I updated a subscription and not scheduled subscription
Ah sorry, but same idea. You just expand latest_invoice
Ok thank you.
But here I have one more case, the scheduled subscription is not yet active and I don't have subscription Id so how can i use this subscription.latest_invoice as i cannot retrieve the subscription as I have only subscription scheduled id
Then there is no Invoice to retrieve
So I don't really understand your question
Prior you were talking about updating a Subscription Schedule for a Subscription that was already active, no?
And forcing a new Invoice to be generated when you did so
Yes this is another scenario. The other schnario is I hava a scheduled subscription and I have taken first invoice using prebilling. Then if I want to update the subscription.