Hacker News new | past | comments | ask | show | jobs | submit login

Is there a way I can dynamically change the data-amount, data-name, and data-description fields with Javascript depending on what the user clicks?

I'm picturing the user clicking a checkbox for an add-on product without having to make a round-trip back to the server.




Yeah, there's a full JavaScript API for setting these dynamically. Check out (no pun...) https://stripe.com/docs/checkout.




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

Search: