Laybuy API - Integration Flow
This integration flow is specific to E-Commerce payment flow using direct integration using Laybuy by Klarna API.

E-Commerce Integration Flow
Flow description
Create Order
- From the checkout process on the Merchant Site, the customer chooses to pay with Laybuy by Klarna.
- The Merchant Server creates a new Laybuy order by making a request to the Laybuy API (
api/order/create
) and passing the order details.- If the request fails, an error is displayed on the Merchant Site.
- If the request is successful, the Laybuy API returns a payment token and the payment URL. The
token
can be stored by the merchant server, and the customer is redirected to the payment URL to begin the payment process.
Customer Onboarding and Payment authorization
- The customer proceeds through the Signup/Login process on the Laybuy by Klarna payment site.
- If Klarna Signup/Login process is successful and approved then customer needs to authorize the payment by clicking 'Pay by Laybuy by Klarna', once done customer is redirected back to the return URL on Merchant site.
- If the payment authorization fails, an error is displayed on the merchant site.
- If the payment authorization is successful, the customer is redirected to the return URL on the merchant site. Merchant needs to complete/finalize the payment and order creation process.
Confirm Order
- The merchant server confirms the payment by making a request to the Laybuy API (
api/order/confirm
)- If the payment fails, an error is displayed on the merchant site.
- If the payment is successful, the customer’s payment card is charged. Laybuy API returns the Klarna OrderId. The merchant site shows the order confirmation page with Klarna order details.
Notifications and Session Expiry
- The customer receives a payment confirmation email or notification.
- If the customer takes too long to complete any step, the payment session is expired.
Manage Orders and Payments - by Customer
- Customer need to install Klarna app to mange orders and payments.