#sindev_error

1 messages Β· Page 1 of 1 (latest)

topaz lotusBOT
#

πŸ‘‹ 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/1479059486365843548

πŸ“ 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.

tacit edge
#

πŸ‘‹ Do you have a screenshot of where this error shows?

untold hemlock
#

this modal has the embedded payment method

#

for amazon pay for example the Amazon pay option is displayed

tacit edge
#

Are you passing 'link' to your paymentMethodTypes?

#

If so, I believe this is unnecessary. As you are creating your payment intent using automatic payment methods, the element should auatomatically surface Link when appropriate

untold hemlock
#

yes I pass link to it

#

I'm not sure why it's showing that error

tacit edge
topaz lotusBOT
untold hemlock
#

I didn't get it, so config for link is not the same as amazon or satispay for example?

orchid sage
#

hey there πŸ‘‹ taking over as my colleague needs to step away

#

to clarify, you're currently manually listing payment method types, rather than relying on Stripe's automatic payment methods, correct?

can you share more about your flow? for example, at what point do you create the PaymentIntent

untold hemlock
#

payment intent is created once entering the screen, 1 payment intent is used for all kind of stripe payment methods

#

I render custom UI (I verify that amazon_pay satispay and link are part of payment method types in the payment intent (BE returns this data for me)

#

since intent is created on the BE side

#

then when I click on 1 of the custom components, a popup with the embedded payment method is shown inside

#

for example, amazon pay

#

Link on the other hand shows only that error message

orchid sage
#

ok thanks for clarifying

#

I'll just need a few minutes to investigate

untold hemlock
#

sure, thanks

#

may I add

orchid sage
#

could you share an example of a PaymentIntent ID (pi_123) that you got this error with?

untold hemlock
#

when I add all 3 paymentMethodTypes

#

amazon satispay and link

#

Link is shown correctly

#

['amazon_pay', 'satispay', 'link'] with this config Link is shown

#

['link'] with this, it shows the error

orchid sage
#

we'll need some concrete examples to investigate to properly understand the shape of your integration - is it possible for you to share an example PaymentIntent ID that the error happened with?

#

also if you could share the React Native code you use to integrate the embedded payment element, that would be helpful

untold hemlock
#

const intentConfig =
hasStripeIntent && totalAmount > 0
? {
mode: {
amount: Math.round(totalAmount * 100),
currencyCode,
},
paymentMethodTypes: selectedStripeType
? [selectedStripeType]
: getStripeEmbeddedPaymentMethodTypes(),
confirmationTokenConfirmHandler: (
_confirmationToken: unknown,
intentCreationCallback: (
params: import('@stripe/stripe-react-native').IntentCreationCallbackParams
) => void
) => {
if (stripeIntent?.clientSecret) {
intentCreationCallback({ clientSecret: stripeIntent.clientSecret });
} else {
intentCreationCallback({
error: { message: i18n.t('payment.paymentNotReady'), code: 'Failed' },
} as import('@stripe/stripe-react-native').IntentCreationCallbackParams);
}
},
}
: null;

#

const elementConfig =
hasStripeIntent && totalAmount > 0
? {
merchantDisplayName: 'example.com',
returnURL: 'example://payment',
allowsDelayedPaymentMethods: true,
rowSelectionBehavior: {
type: 'immediateAction',
onSelectPaymentOption: () => {
if (
selectedStripeType &&
paymentOption?.paymentMethodType === selectedStripeType
) {
handleConfirm();
} else {
pendingConfirmAfterSelectionRef.current = true;
}
},
},
appearance: {
embeddedPaymentElement: {
row: {
style: RowStyle.FlatWithDisclosure,
},
},
},
}
: null;

#

these are config I pass on to the hook

#

pi_3T7aGGDMPmPwJSYh0bFW4oRb

#

this is the payment intent id

scenic nimbus
#

To confirm, you init the Element without the intent yes? The intent is created separately?

untold hemlock
#

the intent is created before the element is shown on the screen

#

it's created automatically once entering the payment screen

scenic nimbus
#

Right, but you're not actually initialising the Elements instance with it. You're using the deferred flow

#

hence the mode parameters

#

If you have an intent before initialing the element then why not just use it instead of doing the deferred flow?

untold hemlock
#

what do you mean exactly?

#

what is using it directly vs using the deferred flow

scenic nimbus
untold hemlock
#

yes, correct

scenic nimbus
#

OK, cool. Checking something

untold hemlock
#

but it's weird why link is not shown if I specify only link, if I attach some other payment method along with it, it works
just Link, doesn't
other payment methods are working fine so far

scenic nimbus
# untold hemlock

This screenshot is for this PI, correct? pi_3T7aGGDMPmPwJSYh0bFW4oRb

untold hemlock
#

I have many requests now, let me create new one

topaz lotusBOT
scenic nimbus
#

Basically, we want to know how the paymentMethodTypes param is computed in each instance/screenshot you've shared. This part:

            ? [selectedStripeType]
            : getStripeEmbeddedPaymentMethodTypes(),```
untold hemlock
#

should I open modal with just link or all payment methods?

#

paymentMethodTypes is ['amazon_pay'], ['satispay'] or ['link']

#

getStripeEmbeddedPaymentMethodTypes() is the fallback with all three of them combined

#

pi_3T7aWpDMPmPwJSYh0PHRLtIj here is the latest intent

scenic nimbus
#

I think we're going to need to take this to a support case and we can investigate this further. Right now it's not clear why it's unavailable in some scenarios

topaz lotusBOT
#

Hello @untold hemlock, we have sent you a direct message, please check it at https://discord.com/channels/@me/1479088331693490249

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
scenic nimbus
#

Got the email – we'll be in touch shortly via email