To improve conversion rates, you should get an authorization token through a server-side callback.
When Klarna approves a customer, you receive an authorization token that lets you place an order. While you would typically receive
authorization_token as a response to the
authorize() call, you are required to implement the server-side callback to a specific URL to receive the
session_id in the backend.
By using server-side authorization callback, you can create an order in case of any client-side communication issues.
Payment methods that require complex customer interactions, for example switching between banking apps, are vulnerable to front-end communication issues. If communication breaks down, a valid authorization_token issued by Klarna payments may not reach the client, making placing an order impossible.
This can lead to the customer being charged without the payment getting registered in your checkout. Such errors can affect your store's conversion rates if the customer believes they have completed an order but don't receive a confirmation from your side.
When initiating a payment, include a URL in the
authorization field of the
merchant_urls object. Klarna payments calls this URL after a successful authorization.
Klarna calls the URL provided in authorization once the session is authorized.
You must provide the callback URL over HTTPS. To be able to authenticate that Klarna sent the callback, we recommend that you generate a one-time token only for this specific payment session.
This lets you authenticate Klarna as the origin of the call made to you after a successful authorization.
204) response of your server to Klarna's callback is considered successful. Any other response triggers a retry of up to 3 calls in total.
2xx, Klarna may send back the same callback multiple times.