#comet_elements-invoice
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/1432788163578957891
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
@junior aspen I don't think so. You have to pass the list of payment_method_types to your front end instead
did you initialize Elements with the client_secret of that PaymentIntent?
yes
and it works when explicitly creating the payment intent
because this is set on the payment intent:
"automatic_payment_methods": {
"enabled": true
}
sorry you said yes
can you share how you have initialized Elements? Like your exact code
when creating the invoice and finalizing it, the payment intent that gets attached does not have that set
I know ๐
Please share your exact code to initialize Elements
comet_elements-invoice
ok, one second
() => ({
mode: recurringDonation === 'monthly' ? 'subscription' : 'payment',
amount: Math.max(50, Math.round((typeof getTotal === 'function' ? getTotal() : 50) * 100)),
currency: 'usd',
}),
[recurringDonation, getTotal],
);```
it does work when explicitly passing in payment_method_types but i'd like to maintain the automatic payment method functionality since we're also using stripe connect for connected accounts
yeah you see, you are not doing what I was saying from waht I can tell
You can pass the existing PaymentIntent's client_secret when you initialize Elements instead of passing amount and currency and that would solve your problem
ok, cool. i'll try that. thank you!
Koopajah. Do you have a tip jar? If this works you saved us quite a bit of time tyvm