#aabhaskarma_code

1 messages ¡ Page 1 of 1 (latest)

desert glenBOT
#

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

📝 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.

merry lava
#

@obtuse stone @silver ginkgo

austere geyser
#

Hey, taking over here! I think there's been some confusion and there's no bug/discrepency. As noted here, amount_paid reflects invoices paid 'out of band':

The amount_paid field on the Invoice object now reflects out of band payments.

#

The reason it differs between your API request and invoice.* event payloads is because of API versioning. You're using 18.x.x of our SDK which uses 2025-03-31.basil to make requests. However your endpoint uses an older version

#

That means events sent to that webhook will use the API shape of that version, where amount_paid behaviour is different

merry lava
#

I'm still searching for an exact answer for "How to calculate paid_out_of_band total payments in Stripe version 18 using customer id?" with minimum API calls.

#

Can you provide me with any pseudocode or something?

austere geyser
#

Why can you not just use amount_paid?

merry lava
#

The same data (i.e., amount_paid: 108900) appears in both the normal invoice and the invoice marked as paid outside Stripe.
How can we differentiate between them?

austere geyser
#

You can't on that API version since we removed paid_out_of_band, you'd probably need to leverage metadata for that

#

Or you can pass an older API version when you retrieve the invoice, and the paid_out_of_band field will be set

#

I agree that the out of band payment experience took a step back in the latest API version unfortunately. Something we're hoping to improve

austere geyser
merry lava
#

Checking

desert glenBOT
merry lava
austere geyser
#

Do you have an example?

merry lava
#

Invoice id: in_1RJCkLF8tiMhHfPbMsSLngwb

austere geyser
#

Ah well thats because you finalized the invoice before it was paid out of band. So we generated a payment for it

austere geyser
merry lava
#

Thanks @austere geyser . Will go with this approach for now and will open a new thread if required.

austere geyser