#taviksha-akar_api

1 messages ยท Page 1 of 1 (latest)

coral tangleBOT
#

๐Ÿ‘‹ 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.

sterile meteor
#

Hi, let me help you with this.

#

The update should attempt to pay the Invoice immediately...

#

I would need to look at an example to be able to tell

grave bobcat
#

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.

#

Here this invoice is created with draft status

#

hello are you checking this

sterile meteor
#

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?

grave bobcat
#

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.

sterile meteor
#

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?

grave bobcat
#

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.

coral tangleBOT
sterile meteor
#

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?

grave bobcat
grave bobcat
shy vortex
#

๐Ÿ‘‹ 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

grave bobcat
#

OK thanks

#

and if I update subscription then how I will get the invoice?

shy vortex
#

I said that above:

When you update the Subscription Schedule you want to also expand the subscription.latest_invoice

grave bobcat
shy vortex
#

Ah sorry, but same idea. You just expand latest_invoice

grave bobcat
#

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

shy vortex
#

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

grave bobcat
#

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.