Ask A Question


You’re not receiving notifications from this thread.

How to use the Pay gem to accept Payments in Rails Discussion

Hey Chris,
What should we do if we just want to authorize payments without attaching a card to a user?
Maybe we could simply delete the card after the payment but I don't even see a way to properly delete a card from a user in Stripe documentation. With Payment Intent it seems that we can just detach it but not delete it.

Also do you have any advices to add another Payment Provider to this gem in addition to the github Wiki page? There are other providers like MangoPay out there that don't charge anything for a refund unlike Stripe.


Hi - When I call current_user.subscribe, it returns "NameError (uninitialized constant Stripe::PaymentMethod)". I've looked through the gem source files, and I don't see why I am receiving this error. Everything else working up until this point.

I'm confused because the wiki uses the createToken method in step 5, but the gem readme indicates you shouldn't use the createToken method, but instead use createPaymentMethod.


Thanks for this gem!


Looks great! What's the main benefit to using Stripe with Pay, rather than Stripe solo? We have Stripe subscriptions already set up on our site. Would this augment what we already have?


Have you done a repo for this tutorial, Chris?

  • 1 on a demo app for this video Chris?

I can't seem to get a particular use case to work. If you subscribe with a free trial using a card that requires SCA, the payment/show view looks for an 'amount' parameter which is in payment_intents but not setup_intents. it looks as though it might need a 'setups' controller in addition to the 'payments' controller, unless i'm missing something?


Yep, I was missing something. Need to create setupIntent first, then create subscription.


How do we add the redirect url after Stripe payment?

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.