#zeez5658
1 messages · Page 1 of 1 (latest)
I'd recommend reading through this doc
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
It explains how you can render elements without needing a client-secret upfront
Thanks I’ll take a look, how would you suggest to address the variable pricing issue?
one option would be to create separate prices for non-business users and business users
and using quantity to calculate the final price
okay great thankyou, final question: how do I make filling out the <PaymentElement/> fields required. I.e ensure the form can’t be submitted without filling those out first
afaik all fields (card number, expiry, cvv) are required in the PaymentElement and are validated on submit, are you seeing something different?
Right now I can submit the form without filling those out
I have the Payment Element nested within the parent web form
might be due to that, the other option would be to listen for element events such as change and look at complete property
https://stripe.com/docs/js/element/events/on_change?type=paymentElement