#_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/1448561266376314922
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You can only setup until Subscription level: https://docs.stripe.com/api/checkout/sessions/create
1 Checkout Session generates 1 Subscription, but then generates a lot of Invoice and Payment Intent on each billing cycle. If you want to include the metadata in each generated Payment Intent, you would want to listen to invoice.paid everytime, take the metadata from the Subscription, then manually set it to the linked PaymentIntent object
Do you mean that by obtaining the metadata from the invoice.paid webhook and then updating it via the PaymentIntent update API, it will be applied to the Charge object?
But I cant get payment intent ID in invoice object
If you want the metadata on Charge object, you would want to call Update Charge API
metadata is on object level
Workflow is it?
- checkout session set subscription metadata
- receive metadata in
invoice.paidwebhook - get payment intent ID in
invoice.paidwebhook - update payment intent object (metadata) in
invoice.paidwebhook
But I cant get payment intent ID in invoice object
Yes this is a different issue.https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices#inspect-the-array-for-payment-information
Yes steps are correct. "receive metadata" in invoice.paid webhook means receiving metadata from the Subscription object
You may need to call Retrieve Invoice API and expand subscription, because step 1 only can set the metadata to the Subscription object so far