#Dynelight
1 messages · Page 1 of 1 (latest)
customer = Stripe::Customer.create(
description: "#{name} (Id: #{id})",
coupon: coupon_stripe_id.presence,
name: name,
email: email_address
)
subscription = Stripe::Subscription.create(
{
customer: customer.id,
items: [
{
price: self.plan.stripe_id
}
],
trial_period_days: 14
}
)
Do you have an example Subscription ID?
We have internal tools that let us see what's going on with the Subscription as long as you provide us with the ID
price_0M99Dl85cJoRoAtCjH8xrBxg
That's a Price ID - do you have a Subscription ID (should be something like sub_xxx)
👍 perfect let me take a look!
tyyy
So it looks like that Subscription as canceled because youre integration made the request to cancel it (see https://dashboard.stripe.com/test/logs/req_kZrAGnDyd40ryA) - it wasn't canceled by anythign automatic on our end
Do you have any code (maybe as part of your webhook handler) that cancels subscriptions?
I disabled my webhooks
And it's still being cancelled lemme try again
sub_0MCX9g85cJoRoAtCoeqCc2PE
yep... my custom weebhooks are disabled
I don't even explicitly handle customer.subscription.deleted
I still see a test webhook that's enabled on your account (https://dashboard.stripe.com/webhooks/we_0MBjAm85cJoRoAtCCrU5ATui)
Those are the defaults from my stripe integration library (the pay gem on rails)
But I can disable it
Yeah try disabling it and see what happens
And just want to be clear - I'm not 100% sure this is because ofyour webhook, but what I can say for sure is that these cancellations are happening because something in your integration is making the request to cancel it (so it could be happening else where in your integration)
I disabled the pay gem's webhooks on stripe and it didn't delete that one
I wonder if there is something the pay gem is expecting that is forcing the cancelation
I'm not creating the subscriptions explicitly with the pay gem, I am with stripe. So maybe I should do it with the pay gem library
Yeah I don't know anything about the specific library you're using, but it sounds like something about your usage of it is not aligning with what they expect
Okay it seems this is more on my side now. Thanks so much!