#archmaze.
1 messages · Page 1 of 1 (latest)
It's up to you to call Update PaymentIntent and update its amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i did update the amount but it does not reflect on payment element form
so after updating, i tried to pay with Google Pay or any other wallet... it shows the initially set price
Ah I see, I think you would want to know the final amount first before creating the PaymentIntent then, like after your customer select the frequency interval
let me explain the flow...
1.User selects plan
2.Register Customer/User
3 get to payment page, there user can change frequency and choose payment method and pay
Okie let's try this: On step 3, when your customer change frequency, send an AJAX request to your backend and then from backend Update PaymentIntent, and coming back to client. On client, call retrievePaymentIntent to see if the amount is updated
ok
price is updated on payment update...
here is the screenshot
now if i try to pay with google pay it'll charge $80 only
Can you use this fetchUpdates() function in JS before confirming? https://stripe.com/docs/js/elements_object/fetch_updates