#usm-seong_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1275179737743884299
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- usm-seong_react-native-payment-sheet, 3 days ago, 46 messages
I tried ``` if (doesUserHaveCC) {
const { error: PIError, paymentIntent: paymentIntentResult } = await confirmPayment(
clientSecret,
{
paymentMethodType: 'Card',
// paymentMethodData?: {
// token?: '';
// billingDetails?: BillingDetails;
// mandateData?: MandateData;
// };
},
);
intentResult = paymentIntentResult;
error = PIError;
} else if (isPaymentIntentFlow) {
const { error: PIError, paymentIntent: paymentIntentResult } =
await confirmPlatformPayPayment(clientSecret, payload);
intentResult = paymentIntentResult;
error = PIError;
} else {
const { error: SIError, setupIntent: setupIntentResult } =
await confirmPlatformPaySetupIntent(clientSecret, payload);
intentResult = setupIntentResult;
error = SIError;
}```
but getting an error message
declineCode:null
localizedMessage:Card details not complete
message:Card details not complete
type:null
code:Failed```
so ultimately when a user is trying to use a credit card that's already added to their Stripe account (and my BE server) and clicks Checkout button, no Apple pay (or Google Pay) window should show up. Instead, it should fetch payment intent (this part is working) and confirm the payment (or card?) with Stripe
Hello, I think there is a way to pass in the ID of an existing payment method but I am having trouble finding exactly what that looks like. I will consult my colleagues adn get back to you with what I can find
thank you
Can you tell me more about what your app's flow looks like at some point? Are they selecting this PM in your UI in the app just before paying? Or is this something set at their account level?
it looks like this
so as of now, when I click Apple Pay option as payment method and proceed. everything works
however when I click the existing payment method and click the CTA, the apple pay window pops up
which is not what I want. so I tried adding const { error: PIError, paymentIntent: paymentIntentResult } = await confirmPayment( clientSecret, { paymentMethodType: 'Card', // paymentMethodData?: { // token?: ''; // billingDetails?: BillingDetails; // mandateData?: MandateData; // }; }, );
but this doesn't work to begin with
You can pass the ID of the existing payment method (pm_) via paymentMethodData.paymentMethodId https://stripe.dev/stripe-react-native/api-reference/modules/PaymentIntent.html#CardParams
Documentation for @stripe/stripe-react-native
still not working
clientSecret,
{
paymentMethodType: 'Card',
paymentMethodData: {
token: selectedCard.token,
},
},
);
You will want to pass the ID to paymentMethodId
token is for a different kind of Stripe object
awesome!! thank you so much you saved my day
Please feel free to archive this chat. Have a good one
Great to hear. Have a good day yourself!