#lobsterpizza18
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- lobsterpizza18, 56 minutes ago, 24 messages
Hi, let me help you with this.
Are you talking about Stripe Checkout or Stripe Payment Links?
@restive drum Stripe checkout
How are you setting the metadata on the Checkout with type: "subscription"?
@restive drum I'm using CheckoutSessionSubscriptionData and setting metadata inside its metadata property
the main issue is not with metadata but I more interested to know if this event triggered by payment type or subscription type so I can ignore certain actions if this is a subscription based event
but if you can suggest on metadata issue that would be good as well
This means metadata lives on your Subscription object, and not on PaymentIntent.
You can tell if payment_intent.succeeded event (which contains a PaymentIntent object) is produced by a Subscription if you find that PaymentIntent.invoice field is not-empty.
You can also check if the related Invoice object has a subscription field. This means it comes from a Subscription for sure.
great, looks like that works. Link generated with method payment, payload doens't include invoice ID, it is null. heaps!
Nice!