#capncapo_webhooks
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/1417643241364262985
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ Looking into this for you.
What API version are you using for this?
Some of the properties have changed on the Invoice object depending on the API version so i want to be sure I'm providing you appropriate guidance
stripe-go v82
Ok, thats pinned to basil.
oh sorry yeah this is the webhook API version
2025-04-30.basil
sincere apologizes, juggling some questions from other users
So the challenge here is that the payment intent no longer has an invoice property with basil.
So the pattern here is you start with charge.payment_intent
You then search Invoice Payments filtering by the Payment Intent
https://docs.stripe.com/api/invoice-payment/list#list_invoice_payments-payment-payment_intent
This results in a list of Invoice Payment objects. The invoice Payment objects will have an invoice property.
https://docs.stripe.com/api/invoice-payment/object#invoice_payment_object-invoice
You can then retrieve the invoice
https://docs.stripe.com/api/invoices/retrieve
which will have a property containing the subscription id
https://docs.stripe.com/api/invoices/object#invoice_object-parent-subscription_details-subscription
Finally you can retrieve the subscription by ID
To allow for multiple partial payments on an invoice the relationship between Payment Intent and Invoice changed from 1 to 1, to many to 1. Which made this more comlicated than it use to be.