#Jonah Librach
1 messages · Page 1 of 1 (latest)
You can set subscription_data.metadata (see https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata) to include the information you need on the Subscription, but that won't include it on the PaymentIntent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If you need that information from the payment_intent.* webhook events then you'd need to re-retrieve the Subscription in your event handler
@viral scaffold, thanks for prompt response / chat-entry
So which webhook event should I listen for to confirm the subscription is active?
From there, I just want to take my app's userId and process accordingly
You can listen for customer.subscription.created and check the status of the Subscription to see if it's active. If it's not active you'll need to wait for the customer.subscription.updated event to see when the status is updated to active
And that will give me the metadata I passed in for subscription_data in the Session object?
Yes
Okay, thank you I appreciate that. Looks like it works.