You need to
finalize the authorization only if you have a multi-step checkout.
If you're integrating One Klarna and you have a multi-step checkout process we advise to
authorize the purchase at the very last step in your checkout. Multi-step checkouts typically have a separated step for selecting the payment method (eg Klarna) and approving the purchase. In the payment selection step we suggest to render the Klarna widget. When the customer has proceeded to the order review page and decided to complete the purchase you should use our standard flow with an
authorize call to get approval for the purchase.
In a multi-step checkout, your customer can change any order details after the payment selection step (for example, on an order review page). If you have a multi-step checkout and you
authorize Klarna at the payment selection step, you might need to
finalize the purchase with Klarna when your customer has reviewed the order. The authorization of the purchase must always happen at the end of the purchase when the customer clicks the Buy button.
To finalize a purchase in a multistep checkout, use the
authorize call at the payment selection step and the
finalize call when the customer clicks the Buy button.
During the authorization step, call
authorize with the
auto_finalize parameter set to
false. In this way, you indicate that there's an upcoming finalization step in your checkout.
If the response of the
authorize call indicated that
true you need to call
finalize() when the consumer reaches the last page at checkout to finish the purchase. This call triggers the actual authorization and returns the
In a successful response, you get an
authorization_token to create an order. For more details about the possible responses, see Get authorization section.