#fernandofas_klarna-availability

1 messages ยท Page 1 of 1 (latest)

spice brambleBOT
#

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

golden drift
#

Hi ๐Ÿ‘‹

Can you provide more details about your integration? What Stripe UIs are you using?

median meadow
#

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.

golden drift
#

Can you provide a test site where I can view the payment UI?

median meadow
#

I can provide you screenshots as I'm not allowed to give the test site tha also has the ip restricted I'm afraid.

golden drift
#

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?

median meadow
#

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

golden drift
#

Gotcha. Can you share an example payment intent where Klarna is not appearing?

median meadow
#

yep, hold on

#

pi_3Q4m5zL8ODTYavB805Q9YrhM

golden drift
#

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

median meadow
#

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

golden drift
#

I'm not sure what you are referring to here

median meadow
#

What would be the other options for the future-usage?

golden drift
#

It isn't a setting, it's a parameter your code passes to the API

#

You cannot configure Klarna payment methods for future usage

median meadow
#

$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

golden drift
#

If you want Klarna to display, you have to remove the setup_future_usage part

median meadow
#

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.

golden drift
#

Hmmm... in that case try passing "on_session" as a parameter. Those are the two options for setup_future_usage

median meadow
#

Alright

golden drift
#

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

median meadow
#

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.

golden drift
#

Alright, I'm glad we were able to identify the issue

median meadow
#

Thank you so much. I'm glad I found this channel. \m/

#

Thank you for your support @golden drift

golden drift
#

Happy to do it! It's why we're here ๐Ÿ™‚