#jz-1_api

1 messages ¡ Page 1 of 1 (latest)

magic timberBOT
#

👋 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/1427720334143914014

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

viscid flicker
#

hello! looking at this now

rigid rover
#

thank you!

viscid flicker
rigid rover
#

could you share how you found this from the request ID? we are unable to filter by invoice Id on the events tab of workbench

#

so we can only see this from logs + connected account id

viscid flicker
#

i found it using internal tooling, we have a tool that lets us see all related events from a given request ID. but give me a bit and i can try to find the quickest path for how you could find it

rigid rover
#

thank you!

#

or just events relevant to a stripe id would help too tbh

#

we can only filter by event id which feels bit useless since we dont know what it is

viscid flicker
#

ok, one way is starting from the invoice page and scrolling down to Events, and then this event shows as [redacted]'s invoice has changed

rigid rover
#

ah i see thank you so much!

#

is it safe to assume any sorts of changes that cause deltas in invoice status will emit an updated event?

viscid flicker
#

outside of that if you're looking directly at the events list i would just filter by invoice.updated and filter to roughly the time where you ran the API call, then look through those to find the right one

rigid rover
#

regardless of payment option

viscid flicker
#

it should yes! but i would always test in test mode just to be sure

rigid rover
#

got it thank you! one more question

#

is there additional context we can understand?

viscid flicker
#

hmm do you have an example where an invoice was "unpaid"?

rigid rover
#

i dont remember the exact scenario off the top of my head but i believe one of the following

  • payment failed
  • discount/refunds
viscid flicker
#

as of right now the biggest difference is just in the type of object you're listening to. technically an invoice can have multiple invoice_payments (for example if you're doing partial payments). but if you aren't doing partial payments then both of them should fire when an invoice is paid, so at that point it just depends on the object type of the snapshot you want to receive in your webhook

rigid rover
#

got it!

#

interesting ok we had thought we were listening to the wrong event since its unusual for a paid invoice to revert in status

viscid flicker
#

failed payments and refunds shouldn't "un-pay" an invoice - paid is a terminal state for invoices (docs). for failed payments you would receive invoice.payment_failed and for refunds the invoice itself would remain paid but we would create a separate refund object and corresponding refund.created event

rigid rover
#

ok let me see if i can find the exact example we encountered

#

we may have observed the wrong event possibly

viscid flicker
#

for sure! yeah if an invoice is going from paid to something else that would be bad news

#

feel free to share what you find and i can look at it

rigid rover
#

thanks! found the invoice looking for id now

#

evt_1SFfbnLmdOdiMXBsbkqQhKkL

#

it seems like a "invoice_payment.detached" event

#

which triggered a paid event + status update and then back to open status after

viscid flicker
#

iiiinteresting. i don't see that endpoint in our public docs, it looks like it might be a dashboard exclusive route

rigid rover
#

yikes haha

#

ok so it is reasonable to assume stripe invoices can revert in status and is not immutable / forward only

#

in that case where does the payment go? was it reverted?

magic timberBOT
cobalt valley
#

Hello
This is a private preview feature - https://docs.stripe.com/invoicing/payment-application

My team on discord won't know a ton about this as we don't work with beta features much
If that doc is unable to answer your questions, I would suggest reaching out to our support team