#usm-seong_code

1 messages ¡ Page 1 of 1 (latest)

unique flaxBOT
#

👋 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.

crisp craterBOT
#

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.

jagged verge
#

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

spring dagger
#

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

jagged verge
#

thank you

spring dagger
#

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?

jagged verge
#

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

spring dagger
jagged verge
#

still not working

#
                clientSecret,
                {
                  paymentMethodType: 'Card',
                  paymentMethodData: {
                    token: selectedCard.token,
                  },
                },
              );
spring dagger
#

You will want to pass the ID to paymentMethodId

#

token is for a different kind of Stripe object

jagged verge
#

awesome!! thank you so much you saved my day

#

Please feel free to archive this chat. Have a good one

spring dagger
#

Great to hear. Have a good day yourself!