#ironbeard_api

1 messages ยท Page 1 of 1 (latest)

north muskBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

calm oar
#

(previously I could just get the PI id from latest_invoice.payment_intent

supple sierra
calm oar
#

Gotcha! So if someone uses a PromotionCode / Coupon that results in no payment necessary, will latest_invoice.payments.data be empty?

#

or will latest_invoice.payments be Falsey?

supple sierra
#

Since no PaymentIntent is created, latest_invoice.payments will be empty ๐Ÿ™‚

calm oar
#

And when I confirm the PaymentIntent, is there a way to expand the related Invoice to be included in the response?

supple sierra
calm oar
#

Yes, but the latest_invoice will have a different status (open) than after I confirm the PaymentIntent, right? I know I can wait for webhooks to send the invoice_updated event, but I was hoping to just grab the latest one at the same time as confirming

#

I suppose I could retrieve the invoice using latest_invoice, but was just hoping to reduce API calls

supple sierra
#

Ah I see, unfortunately you'll need to listen for the event or make an extra call since the Invoice isn't directly linked to the PaymentIntent anymore ๐Ÿ™

calm oar
#

Gotcha, thanks ๐Ÿ™‚ BTW, is there a way to only listen for invoice events that aren't associated with subscription creation? e.g. I only want webhooks if a subscription is being renewed etc. Or do I just filter that on my end?

supple sierra
calm oar
#

Great, thanks ๐Ÿ™‚