#bruhhhhh_api

1 messages ¡ Page 1 of 1 (latest)

rancid streamBOT
#

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

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

ocean goblet
#

Can you share an example of what you're trying to do?

bitter jackal
#

i'm on Node.js SDK 18.0.0 • Basil by the way

#

Given a stripe charge id (i.e. given a Stripe Charge object), i want to identify the associated Stripe Invoice object

#

a TypeScript code snippet on how to achieve this or any high level pointers otherwise would be very helpful

ocean goblet
#
const invoicePayments = await stripe.invoicePayments.list({
  payment: {
    type: 'payment_intent',
    payment_intent: 'pi_123',
  },
});
bitter jackal
#

that's helpful thanks!

#

is it possible for a Stripe BalanceTransaction object to directly have an associated invoice id in one of its fields?

ocean goblet
#

No, it doesn't have that

bitter jackal
#

isn't it possible for the source field of BalanceTransaction object to be an invoice id?

ocean goblet
#

No directly, no, it would be the charge associated with the payment intent that pays the invoice