stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.25k stars 256 forks source link

ability to Update payment details after calling initPaymentSheet #1652

Open minawalphonce opened 3 months ago

minawalphonce commented 3 months ago

Is your feature request related to a problem? Please describe. there is a need to update payment details "intentConfiguration" block after calling initPaymentSheet. the feature already exists in android and ios SDK but it is not exposed in react native

Describe the solution you'd like an updatePaymentSheet function that can be exposed in via useStripe hook, which in turn can take the updated options

Additional context ios docs https://docs.stripe.com/payments/accept-a-payment-deferred?platform=ios&type=payment#update-payment-details

android docs https://docs.stripe.com/payments/accept-a-payment-deferred?platform=android&type=payment#update-payment-details

minawalphonce commented 3 months ago

i have added a PR https://github.com/stripe/stripe-react-native/pull/1653 i dont think it will be merged but it gives some idea of what is needed

it is working for me for now at least