#nikita-saboo_api

1 messages Ā· Page 1 of 1 (latest)

clever gobletBOT
#

šŸ‘‹ 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/1478052250692751511

šŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

elfin mesa
#

Hello, it looks like that invoice did use your account's default payment method config for billing settings when chosing available payment methods. Can you tell me more about the behavior that you expected instead?

iron wharf
#

I want to be able to add automatic_payment_methods: {enabled:true} on the payment_intent created. How to achieve this for only one-time invoices?

elfin mesa
#

Your automatic payment method settings are already being used by the invoice. Is there a reason you need that specific property to be true as well?

iron wharf
#

The front-end payment-element is not happy when try to confirm_payment on this payment_intent.

elfin mesa
#

Ah there we go, so the solution is likely an adjustment to your stripe.js setup such that that error is not thrown. Can you send me the text of the error and your code for setting up the payment element?

iron wharf
#

Give me a minute, setting up my FE app.

#

This the error I get
Payment details were collected through Stripe Elements using automatic payment methods and cannot be confirmed through the API configured with payment_method_types or allowed_payment_method_types.

#

Also my PE setup,
const stripeElementsOptions = {
mode: 'payment',
amount: Math.round(11000),
currency: 'usd',
fonts: smFonts,
setup_future_usage: null,
appearance: useStripeStyles(theme),
} as StripeElementsOptions;

#

@elfin mesa Please see this ^

elfin mesa
#

Yep yep looking in to it, I am trying to figure out what we expect you to pass here. Confirming an invoice with the payment element should definitely be a supported usecase

elfin mesa
#

Hey @iron wharf apologies for the delay. I confirmed that this is a known issue with elements for one-off invoices. We don't have a great workaround solution that I am aware of.
I'm seeing that some people have passed a list of payment method types to the StripeElementsOptions on page load and then updated their elements instance with the final PM list once the invoice is finalized, but that would mean your could would need to change every time your payment method settings did which defeats the purpose.

#

I will add to the feedback around us fixing this. Happy to talk through other potential options for your integration

iron wharf
#

Defeats the purpose but will use PM list for now šŸ¤·ā€ā™€ļø

#

Thanks

#

Is there a Bug logged for this ?

elfin mesa
#

There is an internal issue for this but nothing you can follow unfortunately