On a project I’m working on there is an integration to the payment provider Klarna. I was having trouble to get it to work on my local development environment.
Everytime a purchase was made the visitor(me) was supposed to get redirected back to the dev-environment. I was… but to the wrong url: https://local-dev-env-url/+CSCOE+/wrong_url.html In my case this was connected to the
What is the validation_uri ?
“This checkout function will allow you to validate the information provided by the consumer in the Klarna Checkout iframe before the purchase is completed.”
You can read more about it and the use cases in the Klarna documentation
This is an example of what is sent to Klarna in my local environment, and you can see the validation_uri at the bottom.
Since I’m running this code locally the Klarna API can’t reach my validation uri. That was what was causing my problem. For debugging purposes you can skip to send the validation_uri since it is an optional setting according to the documentation. To also debug the validation logic you need to make sure the Klarna API can reach that url.
Hopefully this helps someone else in the same situation as I was. But I have a feeling you can encounter the same error but it’s being caused by something else.
A big thanks to the Klarna support for helping out with this!