Stripe payment intent for dynamic price amount implementation for an embedded payment form
15:10 12 Feb 2026

I am creating a rent collection app that calculates rents due. My goal is to enter price dynamically into Stripe for payments. My current snippets are not allowing the Stripe SDK to render the elements. Can you help me to find out what I am missing or doing wrong? Below are some screenshots with my code snippets. Note: For context the user enters the payment amount input in another form where I have two payment options (Stripe or Paypal). I have two controller methods one requires the price String which I don't have. Please help me.

enter image description hereenter image description hereenter image description here

javascript java stripe-payments stripe-payment-intent stripe-payments-js