#6hills_api

1 messages ยท Page 1 of 1 (latest)

ruby forumBOT
#

๐Ÿ‘‹ 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.

vivid locust
#

{ "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 }

shadow pine
#

๐Ÿ‘‹ happy to help

#

you should either remove
payment_method_types: ["card", "klarna"], from the elements config or add it to the PI creation

vivid locust
#

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?

shadow pine
#

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

vivid locust
#

when I remove it the buttons disappear from ExpressCheckout elements unfortunately

shadow pine
#

either automatic payment methods or payment method types

vivid locust
#

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:

shadow pine
#

so when I removed it from elements config Klrana disappears as an option:
maybe because it's not part of your default PaymentMethodTypes

vivid locust
#

so matching payment method types on PI creation and Elements config should resolve this? WIll this also include apple pay/google pay right?

shadow pine
#

so matching payment method types on PI creation and Elements config should resolve this?
yes

vivid locust
#

default PaymentMethodTypes

shadow pine
#

WIll this also include apple pay/google pay right?
no since this is part of cards

vivid locust
#

default PaymentMethodTypes is a part of stripe dashboard settings or something similar?

shadow pine
shadow pine
#

this is the PMC pmc_1S9VI24cOZ7Xf1LbRQVo5IJG used

#

for your automatic Payment Methods

vivid locust
#

ok thanks. I will try matching the PI and Elements. Thank you for your time!

shadow pine
#

let me know if you need any more help

ruby forumBOT