#fernandofas_klarna-availability
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/1290338415614885959
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Can you provide more details about your integration? What Stripe UIs are you using?
I'm using a custom integration (checkout.js, create.php, complete.php, etc) with the templates provided by Stripe. We use the same codes in different websites and in one the Klarna option came up nicely and on the other one it didn't, so after trying to disable everything, enable again, review all the settings and integration, I really can't find where the settings are not picking up. If I inspect the widget, the Klarna codes are there, but not appearing as an option in the widget. Paypal, Direct Debit, Custom link, etc, all come up ok.
Can you provide a test site where I can view the payment UI?
I can provide you screenshots as I'm not allowed to give the test site tha also has the ip restricted I'm afraid.
Klarna has restrictions on country and currency. For example, a merchant in the UK charging in GBP will only show Klarna to customers in the UK
Do you think that could be the issue?
That's right. All is set to just UK and I'm in the UK as well.
We jsut receive payments form the UK
jsut
just
Gotcha. Can you share an example payment intent where Klarna is not appearing?
Hmmmm.... the only valid payment methods that were assigned for this Payment Intent were ['card', 'link']. You can see that in the JSON response here:
OH you have setup_future_usage: 'off_session' for this PI
Klarna does not support that
ok, hol don
hold on
Can't remember where is the settings to chagne that... :/
Hold on
Almost there
Can't find the options for that. I just have the off_session
I'm not sure what you are referring to here
What would be the other options for the future-usage?
It isn't a setting, it's a parameter your code passes to the API
You cannot configure Klarna payment methods for future usage
$paymentIntent = $stripe->paymentIntents->update($order->data["stripe_pi"], [
'customer' => $customer->id,
'description' => 'MPID UK: Annual New Policy',
'setup_future_usage' => 'off_session',
'amount' => calculateOrderAmount( $jsonObj->items ) * $order->data['total'],
'currency' => 'gbp',
'metadata' => [
'Type' => 'Annual',
'Total' => calculateOrderAmount( $jsonObj->items ) * $order->data['total'],
],
'automatic_payment_methods' => [
'enabled' => 'true',
],
] );
This one
If you want Klarna to display, you have to remove the setup_future_usage part
ok, let me try
That works like a charm. So, I have the setup_future_usage on the other website and the Klarna options comes up. Same setup.
Hmmm... in that case try passing "on_session" as a parameter. Those are the two options for setup_future_usage
Alright
But the confusing part is that setup_future_usage is for recurring payments and Klarna specifically does not support recurring payments
Because it's already a loan with recurring payments
Yes, that is the bug I found. Placing on_session doesn't work, just deleting it from the create.php file params. By any means, it's working now and I will do some tests and see how it goes.
Alright, I'm glad we were able to identify the issue
Thank you so much. I'm glad I found this channel. \m/
Thank you for your support @golden drift
Happy to do it! It's why we're here ๐