#jarcher
1 messages · Page 1 of 1 (latest)
Yeah, so the Payment Intent was created on the back-end, which uses the secret key: https://dashboard.stripe.com/logs/iar_hhtnghWE1KkLzI
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Not sure if that answers your question though
I know that -- but it seems like the RN showPaymentSheet is trying to modify the setup_future_usage
we're not intentionally changing the setup_future_usage -- maybe the RN sdk does that with existing payment methods?
Hmmm, that's interesting. I'm not sure why it would do that automatically. Do you have the code you're running to make that API request?
this is on the frontend : ```const { initPaymentSheet, presentPaymentSheet } = useStripe();
const onSubmit = () => {
const { customerId, ephemeralKey, clientSecret } = await getCheckout(stuff);
const initResp = await initPaymentSheet({
customerId,
ephemeralKey,
clientSecret,
});
if (initResp.error) {
console.error(initResp.error);
return;
}
const presentResp = await presentPaymentSheet();
if (presentResp.error) {
setReserveInProgress(false);
if (presentResp.error.code === "Canceled") return;
Alert.alert(
presentResp.error.localizedMessage ||
presentResp.error.message
);
return;
}
// stuff
}```
Hello! I'm taking over and catching up...
Thanks @unique parcel
Huh, interesting. Is this something you can reproduce on demand or did one of your customers hit this?
We can reproduce it now
it's a payment intent created with setup_future_usage: "off_session" (we do this always by default) then we pass the customerId, ephemeralKey, and clientSecret to the payment sheet (code above) and it fails with an existing payment method
Does it happen every time or are there specific steps you need to take to make it happen?
works just fine when you use a new payment method
so the "specific steps" are :
- off_session save payment 2) react native v0.30.0 3) existing payment method
Is this a new issue with v0.30.0? Did this start after you upgraded?
it was an issue on v0.26.0 so we tried upgradeing to v0.30 (someone else at stripe suggested it [thread here #dev-help message]).
Ah, I think I found details about this internally, hang on...
Yep, okay, this is a known issue in the underlying iOS SDK that doesn't seem to have been addressed yet. As a workaround you can set setup_future_usage to off_session at the top level of the Payment Intent when you create it server-side instead of setting it in payment_method_options.
@thorn coyote Will that workaround work for you?
sorry just seeing this
@unique parcel this could work. what do we do about 3DS payments?
This is what we use now: payment_intent_data.payment_method_options = { card: { request_three_d_secure: "automatic", setup_future_usage: "off_session", }, };
You can keep that part there, just move setup_future_usage.
@unique parcel that worked! Thanks for your help!