Tim Edwards


30 Experience
0 Lessons Completed
0 Questions Solved


Posted in Using Webhooks with Stripe Discussion

Okay, so I know this thread is a few months old, but in case someone revisits like I have, I had a thought...

What if you had an additional subscription plan in Stripe that customers never see that pairs with the annual subscription plan but has a monthly interval and a monthly amount equal to the annual discounted rate divided by twelve? The customer would sign up for the annual plan at the discounted rate and be charged once a year. The "charge.succeeded" event from that charge could trigger the creation/renewal of a subscription to this hidden monthly plan for the same customer with a credit balance for the annual amount paid so that each month it would renew automatically until the balance ran out, which is equal to the duration of the annual subscription. The annual plan would handle the billing, but you could use the webhooks from the monthly plan to trigger the monthly logic in your app.

You could also make this hidden plan free, but it seems the credit balance would automatically suspend services without extra logic to check if the annual subscription had been renewed.

Just a thought, but not one outrageously thought out. :-)

EDIT: With a little more thought, perhaps it is better to make the hidden plan free so as not to affect the values of Stripe balances associated with the entire application (as opposed to the user).


Posted in Using Webhooks with Stripe Discussion

Hi @Alex Kehaya. I don't know if you've already solved your problem, but it appears you are grabbing the wrong event. You are grabbing a subscribe event not a charge event, indicated by the fact that the event.data.object response says "Stripe::Subscription" and the id starts with "sub_". A charge event id starts with "ch_". Go back to "Events & webhooks" in your Stripe dashboard and find an event that has the phrase "was charged". That should be a charge event. When you click on it, in the "Event Data" section the id should start with "ch_". Use the event id that appears under "Event Details" at the top.
And don't worry, I did the same thing. :-)

Posted in Subscriptions with Stripe Discussion

What was the solution? I'm running into the error, too.