#Shawn-PaymentIntent
1 messages · Page 1 of 1 (latest)
Hi there, so basically you want to update the PaymentIntent amount after its creation?
yes
Got it, you can use the PaymentIntent update API to change the amount https://stripe.com/docs/api/payment_intents/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
well if I was to use the payment element, the customer will click the pay button, once they click that, the intent will either be confirmed or required_capture depending on if confirm was set to true or false. Can I still update the intent at this point?
No you can't update the payment intent when it's status is already requires_capture or succeeded
Or you can use SetupIntent API to collect the payment method from the customer first, once you have finalized the amount, create a PaymentIntent with off_session=true and confirm=true to charge the customer directly.
Okay, I will look into setup intent, thank you Jack