0
votes

So I have a simple react frontend connected to stripe checkout, right now I created a product on stripe for 10 dollars and capture it with the API. I would like to implement something where the user can enter a custom amount and send it. Is this possible to do using the stripe checkout only? I do not want to setup a backend or something too complicated. Any ideas will be appreciated thank you :)

lineItems:[
        {
            price: process.env.REACT_APP_PRODUCT,
            quantity: 1,
        },
    ],
    mode:"payment",
    cancelUrl: window.location.origin,
1

1 Answers

2
votes

Yes, it's possible. You can do it like this:

https://jsfiddle.net/captainapollo/atgycd2s/

console.log("I can't put a JSFiddle link without code so here's some code.");