Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe for one time payment. - Ruby on Rails

Can I use Stripe for receiving a one-time payment instead of recurring payments?

If so what settings do I have to make?

like image 947
prabu Avatar asked Jul 10 '12 14:07

prabu


3 Answers

Yes, just use the Stripe::Charge.create method. As the payment method, you can either pass in a card directly or reference a Customer whose card should be charged.

like image 156
John Collison Avatar answered Sep 19 '22 13:09

John Collison


You can receive one-time payments via the Stripe dashboard. Go to:

https://dashboard.stripe.com/payments

and click the button for a "+New" payment. That will let you manually enter the cc info. I do this with my Pairing as a Service clients all the time... they just read me their card info, and I enter it with the amount I'm charging them and a description. Your account password is then required to complete the charge.

It's fast and easy... I just wish there was a way to let them enter the info directly. Maybe I'll make something like that...

like image 34
brookr Avatar answered Sep 17 '22 13:09

brookr


Yes, You can just create a Stripe account and use a simple example of Stripe payment for Ruby on Rails I've made recently. Check the code: https://github.com/ab00zar/StripePayment-example

Run the server using your test keys like:

PUBLISHABLE_KEY=pk_test_g0XSu8r2ugAETksVJQXJjU30
SECRET_KEY=sk_test_A3rwGLOMNxEKDkaJOTgi4frd rails s
like image 36
Aboozar Rajabi Avatar answered Sep 17 '22 13:09

Aboozar Rajabi