#rupesh4402
1 messages · Page 1 of 1 (latest)
What event type are you receiving?
checkout.session.completed
Gotcha. You'd need to retrieve the subscription: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You could then see if it has a trial: https://stripe.com/docs/api/subscriptions/object#subscription_object-trial_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So when the webhook is called I take the subscription id and then fetch subscription to find out if it is a trial? there is no way to get that information in the checkout.session.completed
?
Correct
Alternatively listen to another event
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
which event?
The one I linked above
Thank you