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

With the old Stripe.js, you serve up the form but the Stripe javascript takes over the form and posts directly to Stripe, so your servers never see the data.

The new Stripe.js will render an iFrame, (Edit:) through which Stripe will send the data, which again posts to directly to stripe.

They basically behave the same way and will look the same way, the only difference is that the iFrame is in it's own Javascript "domain" so that if your site is infected with malicious javascript it can't take over the POST to stripe as easily (although that is debatable).

The former requires really high security requirements now and the latter requires almost none.



The new Stripe.js does not render an iframe, the credit card information is still entered on your site so $("#credit-card-number").val() would return the card number. The transmission of the card data happens through the iframe. So the card number gets copied to the iframe, and the iframe makes the post to Stripe.


You are right, editing my comment.


> the iFrame is in it's own Javascript "domain" so that if your site is infected with malicious javascript it can't take over the POST to stripe as easily (although that is debatable).

A malicious attacker could simply replace the entire iframe with something else that looks identical, but sends a copy of the CC details to some other server.




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

Search: