How to distribute the HPP Session
After creating the HPP Session it will be necessary to get the Consumer access it so that they can complete the payment. This distribution of the HPP Session will change depending on the use case you are trying to achieve.
Technical constrains are defined by the use case (eCommerce, In-store or Telesales) and would most likely be covered by these cases:
The Consumer is already on a website that you own. You are able to redirect their browser to the Hosted Payment Page. This use case is the most easy to fulfill and you can directly read our chapter on Redirection.
The Consumer is interacting indirectly with your system, for example:
- By speaking with a Salesperson
- By email or via another asynchronous communication mechanism
In all of these cases, you will need to get the Consumer use a web browser to actually access the Hosted Payment Page, and for that you can use our advanced distribution mechanisms.
The Consumer is interacting with your system using a shared device, for example a Kiosk in a store. As Privacy standards are not met, it is also required to use advanced distribution mechanisms.
When creating the HPP Session you get back a
redirection_url that can be used by a Consumer to access the Payment Page. You just need to redirect the Consumer to this URL.
This distribution mechanism is usually used in an eCommerce ecosystem and is not really adapted to In-store or Telesales.
UsageConsumer will get redirected there after a successful authorization of payment. Consumer may have seen a confirmation from Klarna before getting redirected, but it is mandatory that the integrator displays information about the payment that has just been authorized.
UsageConsumer will get redirected there when payment was refused by Klarna. If an error occurs and no
UsageConsumer will get redirected there when clicking on the back button. This URL is recommended in an eCommerce flow and any
UsageConsumer will get redirected there when clicking on the cancellation button. This URL can’t be used in an eCommerce flow and will be considered as a
UsageConsumer will get redirected there when an error occurred in the flow. If this parameter is not set and a
Cancel and Back - what are the difference
It is not possible to use both
cancel options simultaneously, because the user interface will be adapted to use one of them:
- When consumer has a
backbutton on the page, then the Payment Page is still reachable after clicking on the button. It means that they can come back with their browser, or that you can redirected them back to the same
redirect_urlwithout changing anything.
- When consumer has a
cancelbutton on the page, they will get prompter to validate that they want to actually cancel the payment. If they do so, then the HPP Session will now be in a
CANCELLEDstate and consumer won’t be able to interact with the payment anymore.
When on eCommerce, the value for the
cancel URL is systematically considered as a
back URL and consumers will always be able to come back to the Payment Page.
Use the distribution endpoint if you want to distribute to the Consumer a link to the Hosted Payment Page either by e-mail or SMS. A message will be sent directly to the Consumer and will be localised to the Consumer’s language, it will contain a link. When using the link, the Consumer will see the specific Hosted Payment Page. The phone number or e-mail address will be used by Klarna to try to pre-fill the Consumer if they already used Klarna before and agreed to be pre-filled, which will increase the speed of the payment.
qr_code_url is provided back in the creation call of the HPP Session, this URL is a public URL that can be displayed on every browser and doesn’t need any authentication.
You can embedded this picture in a display that can be seen by the Consumer, who would be able for example to read the QR Code using they mobile phone. The link embedded in the QR Code is leading to the Payment Page of the HPP Session. They will then be able to proceed to payment.
QR code leading to the Hosted Payment Page