#antogin_api

1 messages ¡ Page 1 of 1 (latest)

steel dockBOT
#

👋 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. Thank you for your patience!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

🔗 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/1213120894101356644

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

quick briarBOT
#

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.

lunar basin
#

Here is my payload that I use to create the payment intent

{
"currency": "EUR",
"capture_method": "automatic",
"customer": "cus_PeSRAHFYk9rdgz",
"transfer_data": {
"destination": "acct_1JmfKA2ElmJlZA7Z"
},
"amount": 2379,
"application_fee_amount": 70,
"on_behalf_of": "acct_1JmfKA2ElmJlZA7Z",
"automatic_payment_methods": {
"enabled": true,
"allow_redirects": "never"
}
}

#

It broke when we upgraded to "stripe": "14.18.0" on nodeJs

magic quest
#

Yeah so this sounds like an issue with how you initialize Elements. Can you share that front-end code?

lunar basin
#

<ExpressCheckoutElement
options={{
wallets: {
applePay: 'auto',
},
}}
onConfirm={onConfirm}
onClick={onClick}
onReady={onReady}
/>

#

"@stripe/react-stripe-js": "2.5.1",
"@stripe/stripe-js": "3.0.6",

#

<ExpressCheckoutElement
options={{
wallets: {
applePay: 'auto',
googlePay: 'auto',
},
}}
onConfirm={onConfirm}
onClick={onClick}
onReady={onReady}
/>

magic quest
#

Sorry the Elements provider

#

Not the Express Checkout Element

lunar basin
#

<Elements
stripe={stripePromise}
options={{
mode: 'payment',
currency: 'eur',
paymentMethodTypes: ['card'],
amount: cart?.totalAmount ? Math.round(cart?.totalAmount * 100) : undefined, // convert to cents,
locale: message?.language ?? 'fr',

  }}
>
  <StripeWrapper isDisabled={!isReadyToPay} isLoading={isLoading}>
    <ClassicPayButton isDisabled={!isReadyToPay} isLoading={isLoading} />
  </StripeWrapper>
</Elements>

We do need to also handle cards

magic quest
#

Ah there it is: paymentMethodTypes

#

That explains the Payment details were collected through Stripe Elements using payment_method_types and cannot be confirmed with a Payment Intent configured with automatic payment methods. error

#

So either only specify paymentMethodTypes: ['card'], on the intent or remove the paymentMethodTypes: ['card'], line from the elements provider if you need to continue using automatic payment methods