Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At Stripe, we've had to take a lot of these considerations into account when designing the Checkout. One particular bug-bear of mine is people disabling autocomplete on their credit-card forms.

Turns out that modern browsers (e.g. Safari/Chrome) encrypt CC data on disk, and that it's entirely PCI compliant to turn on autocomplete. The only field we don't do so (and that the browser doesn't store) is the CVC field.

Another tip is adding 'pattern="\d*"' to number/cvc/expiry inputs. That'll bring up a numeric keyboard in mobile browsers.

Lastly we've open sourced a library that'll do a lot of the client side validation and credit card number formatting for you: https://github.com/stripe/jquery.payment



Full disclosure: I work on the team that implemented this feature.

On Wave Invoices [1] we try to make it ridiculously easy for people to get paid. As such, we have a very select number of fields that are mandatory and don't require things like address, country, province, phone number, etc.

Here is an example: http://i.imgur.com/yqSUMNb.png

The payment amount is already filled in - set to the full amount of the invoice in question. The rest is relatively easy to fill out.

We use the awesome jquery.payment [2] and Stripe.js [3] on this form so you get formatted input - like on the credit card number and expiry date - and inline validation.

[1] https://www.waveapps.com/invoicing/

[2] https://github.com/stripe/jquery.payment

[3] https://stripe.com/docs/stripe.js


I just implemented Stripe payments on my first side project [1], but the jquery payment plugin wasn't on the radar when I was building it. Are there any advantages to using it over the jquery validator as seen in one of Stripe's payment examples? [2].

By the way, getting everything up and running with Stripe was a dream, it's an amazing product. Great work.

[1] http://www.tryringo.com

[2] https://gist.github.com/boucher/1750368


For validations there's not much point in using jQuery.payment over Stripe.js - they're practically the same. However, where the jQuery plugin really shines is with formatting the expiry and card inputs. Inputting a cc number in groups of 4 digits is much easier than a whole number munged together.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: