#ionu_unexpected
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/1328676621288210493
๐ 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.
- ionu_code, 1 hour ago, 26 messages
Can you share the code you use to initialise Stripe.js
this.stripe = await loadStripe(this.authentication.public_key);
I have the public key sent from backend
this.elements = this.stripe.elements(options);
this.elements.create('payment').mount('.js_stripe_payment_cc_div');
try {
this.stripe = await loadStripe(this.authentication.public_key);
} catch (e) {
let errorMessage = 'There seems to be an issue with your gateway configuration, please check it.';
if (e.message) {
errorMessage = e.message;
}
throw new Error(errorMessage);
}
let options;
options = {
mode: 'payment',
amount: 10000,
currency: 'eur',
// setup_future_usage: 'off_session',/// for single payment we do not use this
// Fully customizable with appearance API.
appearance: {
theme: 'flat',
},
// payment_method_types: ['card'],
// payment_method_types: ['card', 'revolut_pay'],
capture_method: 'automatic', // Set to 'automatic' for immediate capture / this needs to come from the backend (free trial will be manual)
};
this.elements = this.stripe.elements(options);
this.elements.create('payment').mount('.js_stripe_payment_cc_div');
this is the whole code snippet
Hmm, what kind of Connect payments are you doing?
I do createConfirmationToken in the front, than create and confirm a payment intent in the backend, based on that confirmation token
OK, but that doesn't answer my question. Can you share an ID from an intent you've created? pi_xx
pi_3Qf6ANEah6jYoDai0TKcp2tI this is for example one done via credit card. But my problem is before the creation of the pi. Because the pi is agnostic of the payment method type. I need to create a pi with klarna, and the only way I can get it done is by specifying payment_method_types: ['card', 'klarna'], in the options
this is with the same code but payment_method_types: ['card', 'klarna'], added to the options
I understood that if the payment option is set in the account, and I do not specify any payment_method_types, stripe will handle the payment option cards. It works for revolut pay for example (on/off in the account). But klarna does not appear unless I specify it in payment_method_types
Yep, you already said that. I'm looking at the intent you're creating, patience please
sure, I just wanted to be clear. Thanks
Hmm, you said this was Conneect yet the Stripe-Account header you pass is the ID of the platform? https://dashboard.stripe.com/test/logs/req_wI3JEKB0SSkX1N
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't see acct_1A8P8ZG5NORjrd4m used anywehre when creating the payment
sorry, let me do another payment right now. I think I took a wrong test pi
pi_3Qh80dG5NORjrd4m0XuNKQgi this is done with the klarna payment option added, but with credit card
req_zENCwNvYbPuFpD
Can you get me an intent where you don't pass payment_method_types? The ones you shared specifically pass Klarna so it's hard to debug
I need a pi_xxx that demonstrates the problem
OK, let me take a look
but I do not understand. The display of the payment option cards is done before the payment intent is initiated
Where are you located?
Is there somewhere I can reproduce this?
yes, but I need a few minutes to set it up
brb ๐
right now it is on my local machine
https://io1.kartradev.com/checkout/b9d102467a265d12e94f12ff071b353c here is the payment page we use
stripe al pp types no aff/shipping/vat
OH, I'm so stupid
Klarna is a domestic payment method only, meaning you can only charge customers in your country (FR) using their native currency (EUR). However but you're in RO where EUR is not the native currency
(I just leanred that โ forgive me)
So we hide it automatically โ I don't see it either as I'm in UK (GBP)
oh, makes sense
than I will try to do it in ron (romanian currency), and with euro and vpn
thank you very much
I was out of ideas
Yeah my bad. It was so obvious all along I just assumed RO was EUR
(forgive my ignorance)