#Aviv
1 messages ยท Page 1 of 1 (latest)
Do you have the event ID?
yes! "ch_3Myj3JGTsR6mWrjE0B40Ww03"
An event ID should look like this --> evt_abc123
sorry ๐
evt_3Myj3JGTsR6mWrjE0ChtGGt3
No worries!
It doesn't look like a trial was ever set or attempted when the Subscription was created: https://dashboard.stripe.com/test/events/evt_1Myj3LGTsR6mWrjEghHzkkYQ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Am I not suppose to set it through "stripe.checkout.sessions.create"?
You'd want to use this attribute when you create the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-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.
Is it ok now?
stripe.checkout.sessions.create({
...
subscription_data: {
trial_period_days: 30,
trial_settings: {
end_behavior: {
missing_payment_method: 'cancel',
},
},
},
...
}
I believe that should work, yeah
it worked! i did get an "invoice.paid" event, but it says the sum is 0, so it's probably can be ignored.
Can i ask another question?
Sure, what's up?
What events should I listen to, in case of an unsuccessful payment, in a subscription plan?
I'd recommend checking out this resource: https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
invoice.payment_failed is the one you're looking for