During the checkout, your customers can see Klarna as a payment option, select it, and go ahead with the purchase. To enable these customer interactions, you need to perform two main actions:
load() call for displaying the widget and the
authorize() call for getting the purchase authorization.
To make the call for displaying the widget, first you need to add and initialize the SDK and then place a container in your page.
Add the SDK by including the following script in the body section of your checkout page.
Initialize the SDK by making an
init() call and passing the
client_token from the Initiate a payment step.
client_token relies on the created session, which expires after 48 hours. The purchase might fail after this time.
Add a container in the HTML file of your checkout page. This container specifies where to place the widget.