#david-chong_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1375007751998148649
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Give me a moment to a look
Yes sure, thank you
Okay so I can see that your Stripe account is currently using the api version
2025-04-30.basil.
Starting with API version 2025-03-31.basil, we removed the invoice parameter from Charge [0] and Payment Intent [1] object. This change was made in preparation to support multiple (partial) payments on invoices, and is further detailed in our changelog: https://docs.corp.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices
So it is expected that retrieving a Charge or Payment Intent via the API wouldn't return an invoice ID.
[0] https://docs.stripe.com/api/charges/object?api-version=2025-04-30.basil&lang=curl
[1] https://docs.stripe.com/api/payment_intents/object?api-version=2025-04-30.preview&lang=curl
OK, so can you recommend us better way to find a way if payment is linked to Stripe Invoice? Can we identify this within Charge object?
So to retrieve an invoice ID from a payment, you can
- Make a GET request to the List all Invoice Payments API [0] and pass the PaymentIntent ID to this endpoint
- You may also want to include "expand[]=data.invoice" in your request
- The API will return a list of Invoice Payment objects, where you can find the invoice [1]
[0] https://docs.stripe.com/api/invoice-payment/list
[1] https://docs.stripe.com/api/invoice-payment/object#invoice_payment_object-invoice
No you can't identify the linked invoice from the Charge object.
Ok, so just to clarify. Previously we can identify linked invoice, but it is deprecated on 2025-04-30.basil version?