#alexander-1966_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/1265319589835702273
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! the exceptions are listed here: https://docs.stripe.com/metadata#exceptions
the Subscription copies to the Invoice's subscription_details.metadata but not to the PaymentIntent or Charge
Thanks. So I assume there's no other way to achieve that?
nope, you'll have to copy the metadata manually in code. What are you trying to do?
I'm trying to distinguish webhooks for charge.* and payment_intent.* for subscriptions from non-subscription events
such webhooks have an invoice association invoice: in_... that I can fetch expanding the subscription - and from there find that out
I was hoping there's be a more elegant way for that but seems like no
the PaymentIntents or Charges will have a non-null invoice field so you wouldn't need to expand it to know it belonged to an Invoice, right?
or do you have one off Invoices also and you're trying to distinguish "one off Invoices" vs "Sub backed Invoices"
trying to distinguish "one off Invoices" vs "Sub backed Invoices"
yes, that
One easier way could be to listen to the invoice.paid event which will have info on whether it is one-off or part of a subscription.