#JimP
1 messages ยท Page 1 of 1 (latest)
๐ Thanks for reaching out
You can listen to this webhook event customer.subscription.updated:
Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active)
https://stripe.com/docs/billing/subscriptions/webhooks#events:~:text=customer.subscription.updated
https://stripe.com/docs/api/events/types#event_types-customer.subscription.updated
Thanks. I actually want to check for the subscription being created, so I can then update it to set cancel_at?
You can listen to the customer.subscription.created event, this one is sent when the subscription is created.
Thanks.
Another quick question: is the Stripe customer record unique on email address?
They're not no
Really? More than one customer can have the same email address?
(within my account, I mean)
Yep, plausible. If you need to prevent that you'd need to validate that yourself
Wow. Glad I asked. So if I'm identifying customers uniquely by email in my app, how do I reliably associate my customer ID with Stripe customer IDs? I suppose I need to keep a record mapping my customer ID (with its unique email address) to (potentially) several Stripe customer Ids sharing the same email address?
You'd store the cus_xxx ID (which are unique) directly in your DB and relate those to your users/sessions.
I'm very glad I asked what I thought was a dumb question! Thanks so much for clarifying!! ๐
np!
Just want to say this is the best tech support experience I've ever had. Really appreciate it. ๐ฏ
We love to hear it, thank you!