#Aviv

1 messages ยท Page 1 of 1 (latest)

serene needleBOT
livid lake
#

Do you have the event ID?

grizzled garden
#

yes! "ch_3Myj3JGTsR6mWrjE0B40Ww03"

livid lake
#

An event ID should look like this --> evt_abc123

grizzled garden
#

sorry ๐Ÿ˜…
evt_3Myj3JGTsR6mWrjE0ChtGGt3

livid lake
#

No worries!

grizzled garden
#

Am I not suppose to set it through "stripe.checkout.sessions.create"?

livid lake
grizzled garden
#

Is it ok now?

stripe.checkout.sessions.create({
...
      subscription_data: {
        trial_period_days: 30,
        trial_settings: {
          end_behavior: {
            missing_payment_method: 'cancel',
          },
        },
      },
...
}
livid lake
#

I believe that should work, yeah

grizzled garden
#

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?

livid lake
#

Sure, what's up?

grizzled garden
#

What events should I listen to, in case of an unsuccessful payment, in a subscription plan?

serene needleBOT
livid lake
#

invoice.payment_failed is the one you're looking for