#vincent_api

1 messages · Page 1 of 1 (latest)

vernal phoenixBOT
#

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

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

chrome crag
#

hello

mystic flare
#

Thanks for waiting! Discord is busy now and will take time to respond

#

Could you share the request ID (req_xxx) that you attempted to lis the credit note by invoice?

chrome crag
#

no because i dont have it

vernal phoenixBOT
chrome crag
#

hello vanya

ashen shell
#

Do you have the Credit Note ID that you expect to see?

chrome crag
#

yes i can have it, but with the way i need to use it on my application i cant have it i only have invoice id

#

and sorry no id ont have the id from credit note juste the number

ashen shell
#

I understand. Could you please share the code that you use to fetch it, the Invoice ID, and the Credit Note number? Are you sure you're calling the API for the same Stripe account?

chrome crag
#

const invoice = await getInvoiceById(invoiceId);
const AllLines = invoice.lines.data;

const Allproduct = AllLines.map((line) => line.price.product);

const product = await getProductFromInvoice(Allproduct);

if (!invoice) {
  return res.status(404).send("Facture non trouvée");
}
console.log(invoiceId);
const credit_note = await stripe.creditNotes.list({
  invoice: invoiceId,
});
#

is just a part of my code, but until i use the api on the website i make return an empty array lik data[]

ashen shell
#

Could you please share the Invoice ID?

chrome crag
#

yes

#

in_1Q7wT0FcrsMaCbELmt1WLXDv

#

its realise with the test mode , i hope that still ok ?

ashen shell
#

There's no Credit Notes on this Invoice

chrome crag
#

yes and i dont know why becasue suppose to have it , i have a receipt pdf

ashen shell
#

Why do you expect to have it?

chrome crag
#

because its suppose to be paied also its in test mode

#

so if im client i suppose to have a credit note where writing payed 100 euros for exemple

ashen shell
#

Did you add a credit note?

chrome crag
#

what do you mean add credit note ? on parameter in stripe ?

vernal phoenixBOT
tardy zealot
#

Hey! Taking over for my colleague. Let me catch up.

chrome crag
#

ok

tardy zealot
#

Ok let's start from the beginning, what you want to achieve exactly ?

#

You have a paid invoice in_1Q7wT0FcrsMaCbELmt1WLXDv, why you are looking for a credit note? and what do you expect from a Credit Note ?

chrome crag
#

ok i use the api from stripe, im on test mode and i make a website where i can buy something ok. when i buy in test i have an invoice but on the invoice is not wrinting its payed so my boss want for the client that writing its paied so that exist but on the credit note

tardy zealot
#

Wait let's forget about the credit note for now.

#

After the invoice is paid, you want to display that the invoice is paid ?

#

in your website ?

chrome crag
#

i want i can download it for send to my client for exemple and just printer for me

tardy zealot
chrome crag
#

yes i know that but its the credit note or receipt i want can download

#

because on invoice its writing need paied this sum but the client are alreday paied

tardy zealot
#

Can you share a screenshot of what you are referring to as a credit note ?

tardy zealot
chrome crag
#

that for exemple

#

because invoice look lik that

tardy zealot
#

Could you please share that invoice Id ?

chrome crag
#

so the second one right ?

#

in_1Q7wT0FcrsMaCbELmt1WLXDv

tardy zealot
#

OK I see, let me check further..

chrome crag
#

ok thanks you

tardy zealot
#

Sorry for the late update.

#

Actually, this is how Stripe invoicing works

#

The invoice doesn't update for post-payments update

#

so you'll need to download the receipt

chrome crag
#

ok and with api can i download it ?

tardy zealot
#

And the bad news, is you can't download the receipt with Stripe APIs

chrome crag
#

ah ok

#

i understand , thanks for helping me

tardy zealot
#

Ah wait

#

So you need to check the Invoice => PaymentIntent => Charge => receipt url

chrome crag
#

ok that perfect for me

#

thanks you so much