With the previous version of Stripe, I could create a payment form integrated on a payment page (ie not the hosted page option). Neither products not customers are stored in Stripe, so it was just a matter of creating a form with the card details, description and price. The Stripe Card component was included in a form, which was submitted to an API using Create Payment Intent. This was quite straightforward.
I would like to create exacly the same functionality with Stripe Elements. After quite a few hours reading posts, watchcing videos and trying AI etc. I think I’ve got close but am missing some essential details.
I’ve created a page with the Stripe Element and Stripe Payment components. The dynamically created form is submitted to a Server Connect API using the Create Payment Intent template. Payments are sent to Stripe and essentially it works. but I’m stuck on something which must be staring me in the face:
How do I pass parameters (the amount, description and customer name/email address) to the API from the payment page? I can enter a static price and description but obviously that’s no use. The form and inputs are created dynamically so it doesn’t seem possible to add fields. I’ve also tried adding the Amount Dynamic Attribute but this doesn’t work even with a static value.
The form created above is submitted to a server connect API using the Create Payment Intent template. Essentially, I want to know how to pass values to these fields:
(or usually hidden field ), but I can’t see how to do this with the new Stripe Elements (perhaps I’m using the wrong options). I think I must be missing something obvious.