#ironbeard-payments
1 messages · Page 1 of 1 (latest)
yes the PaymentElement requires the client_secret at the time the Element is rendered(so generally at the time the page loads).
so it only really works for scenarios where when you reach the payment page, you know exactly what the customer is buying and just want to accept their details
if you need something more dynamic you can use the other Elements instead, they still work and are supported
Gotcha. If I wanted to use PaymentElement and still allow someone to alter their cart, would I just update the Subscription object on the server? Doing so would keep the same client_secret, right?
yes but it doesn't update the PaymentElement so I wouldn't do it
for example the popup in Apple/Google Pay shows the user an amount that is based on the PaymentIntent passed when initialising the PaymentElement, and that won't change
Oooh, gotcha good to know.
the PaymentElement simply doesn't work for this use case, it's not designed for it at the moment