#aabhaskarma_code

1 messages · Page 1 of 1 (latest)

distant daggerBOT
#

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

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

golden pebble
magic ibex
#

req_C2c95FkTQEV5be

#

It's stripe 18(Basil) issue. I need a proper solution where I need to make fewer API calls.

golden pebble
magic ibex
#

How to apply this query filter to it?
const payment_intents = await stripe.paymentIntents.search({
query: customer:'${this.stripeId}' AND status:'canceled',

#

Or is there any alternative way to do the same?

#

Also I can see this in breaking chnages
Removed the payment_intent, charge, paid, and paid_out_of_band fields from the Invoice object.

golden pebble
#

maybe can you explain why are you searching for canceled PaymentIntents? That might help us be able to suggest a workaround to what you're trying doing

magic ibex
#

When an invoice is manually marked as paid in the Stripe dashboard, the associated payment intent is cancelled, and Stripe does not record the revenue. I want to track that revenue by customer.

golden pebble
#

thanks for explaining. So for context, paid_out_of_band has also been removed from our API starting from basil. I don't think there's any good workaround for this. There's a few options which I suggest you consider :

If you really must specifically identify if an Invoice was paid out of band, I think there's two options that I can suggest here :

  • Set up a webhook endpoint specifically with an API version prior to 2025-03-31.basil to listen for invoice.paid events, and have your application process these events
  • Alternatively, when making the API call to search, you can make the request with a specific API version **prior to **2025-03-31.basil
magic ibex
#

amount_paid is not zero in payments made out of band invoice.

#

id: "in_1RJCkLF8tiMhHfPbMsSLngwb",
amount_paid: 108900,

golden pebble
#

when i look at the invoice.paid event in your Dashboard, it shows amount_paid as 0. Where are you seeing that amount_paid: 108900,?

magic ibex
#

In API response
const invoices = await stripe.invoices.list({
customer: 'cus_SDe2ScVlAEfSj7',
limit: 100
});

golden pebble
#

can you paste the response you received for the above request here?

#

remember to omit any sensitive information

magic ibex
golden pebble
#

hmmm, that's odd, let me quickly test it out on my own account and get back to you

golden pebble
#

This is going to take a while to investigate further, I'm going to send you a link so that you can write in, and we'll keep you updated via that support ticket

distant daggerBOT
#

Hello @magic ibex, we have sent you a direct message, please check it at https://discord.com/channels/@me/1367037954312376361

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
distant daggerBOT
eternal root
#

hi! I'm taking over this thread. @magic ibex make sure to contact Stripe support if you need help with this issue.

magic ibex
#

@golden pebble @eternal root
Instead of depending on invoice.amount_paid from out of band payments.
What if I use invoicePayment.amount_paid and invoice.status combine?
invoice.status === 'paid' && !invoicePayment.amount_paid
It's working for me.

eternal root
#

yes that could work

golden pebble
#

@magic ibex Sorry, I just wanted to mention, it's my mistake, the amount_paid field on the Invoice object will reflect the amount paid out of band for basil, which means amount_paid != 0