I think the way that Stripe handles Subscriptions and Customers has changed recently, where `Stripe::Subscriptions.create` no longer requires the source, but must be passed to `Stripe::Customers.create` instead. I'm having trouble creating the `stripe_customer` method because of this (since the token must be passed to where ever the Customer is being created. Any chance you code shed some insight on this?
Gotchya...thanks for the quick reply man! I'll rollback my custom `stripe_customer` approach to follow yours, creating a customer from the email, and try to create the `source` after as you outlined above.
Also, I like the idea of using an idempotent key, since we don't have the single-use guarantee that comes with a token generated by Stripe.js. Are you passing your idempotency key through the user's browser via the payment form and back into your controller? Not sure how to set this up exactly but I think it would help alleviate accidental double clicks along with any network hiccups
Extending this logic to the `Resubscriptions` controller, you may find something like
```
subscription = current_company.stripe_customer.subscriptions.first
Stripe::Subscription.update(
subscription.id,
{
cancel_at_period_end: false
}
)
```