#6hills_api
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/1425464430614937647
๐ 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.
- 6hills_error, 2 hours ago, 38 messages
- 6hills_ece-googlepay, 19 hours ago, 61 messages
{ "type": "invalid_request_error", "message": "Payment details were collected through Stripe Elements using payment_method_types and cannot be confirmed through the API configured with automatic payment methods.", "payment_intent": { "id": "pi_3SFuCm4cOZ7Xf1Lb0ztLe4Vk", "object": "payment_intent", "amount": 31048, "amount_details": { "tip": {} }, "automatic_payment_methods": { "allow_redirects": "always", "enabled": true }, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic_async", "client_secret": "pi_3SFuCm4cOZ7Xf1Lb0ztLe4Vk_secret_zUEj3VgQGUnVCfgdZhhqj2QMi", "confirmation_method": "automatic", "created": 1759917764, "currency": "eur", "description": null, "excluded_payment_method_types": null, "last_payment_error": null, "livemode": false, "next_action": null, "payment_method": null, "payment_method_configuration_details": { "id": "pmc_1S9VI24cOZ7Xf1LbRQVo5IJG", "parent": null }, "payment_method_types": [ "card", "bancontact", "eps", "giropay", "klarna", "link" ], "processing": null, "receipt_email": null, "setup_future_usage": null, "shipping": null, "source": null, "status": "requires_payment_method" }, "request_log_url": "https://dashboard.stripe.com/test/logs/req_dkzcnIYxoSVSQX?t=1759927233", "shouldRetry": false }
๐ happy to help
you should either remove
payment_method_types: ["card", "klarna"], from the elements config or add it to the PI creation
here's my code for PI creation:
await stripe.paymentIntents.create({ amount: totalPriceInCents, currency: currency.toLowerCase(), customer: cartData.user?.stripeCustomerId, });
I should do the following?:
same as in the config for Elements?
yes if you add that you should be fine
or remove it from both
but you need to have the same config in both basically
when I remove it the buttons disappear from ExpressCheckout elements unfortunately
either automatic payment methods or payment method types
so when I removed it from elements config Klrana disappears as an option:
{ mode: "payment" as const, currency: "eur", amount, }
I add it back and it works fine:
so when I removed it from elements config Klrana disappears as an option:
maybe because it's not part of your default PaymentMethodTypes
so matching payment method types on PI creation and Elements config should resolve this? WIll this also include apple pay/google pay right?
so matching payment method types on PI creation and Elements config should resolve this?
yes
please assist on where could I find this, would be very helpful
default PaymentMethodTypes
WIll this also include apple pay/google pay right?
no since this is part of cards
default PaymentMethodTypes is a part of stripe dashboard settings or something similar?
you can set what exactly you want to show by using this param https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-paymentMethods
yes
this is the PMC pmc_1S9VI24cOZ7Xf1LbRQVo5IJG used
for your automatic Payment Methods
ok thanks. I will try matching the PI and Elements. Thank you for your time!
let me know if you need any more help