Laybuy by Klarna - Merchant APIs:

The Laybuy Merchant API is simple REST-based API. This API can be used by merchants to integrate directly with Klarna. It helps to create new Klarna orders, process refunds or retrieve past order details.

API endpoint - Live (production)

https://api.laybuy.com

API endpoint - Testing (sandbox)

https://sandbox-api.laybuy.com


API Credentials

You need access to the Merchant Portal account to generate API credentials as follows.

1. Airwallex

If your merchant account is onboarded with Airwallex (our merchant onboarding Partner), get the API credentials from the Airwallex merchant portal. https://www.airwallex.com/app/login

Recommendation: Its recommended to generate the restricted Airwallex API keys for your Laybuy API credentials.

2. Klarna

If your merchant account is onboarded directly with Klarna, get the API credentials from the Klarna merchant portal. https://portal.klarna.com/

For more information on generation of Klarna API credentials or using the Klarna Merchant Portal, please visit Klarna merchant support here: https://www.klarna.com/international/enterprise/the-merchant-portal/


Please contact Klarna/Airwallex onboarding team to setup a playground (non-prod) merchant account to try these APIs in non-prod environment.


API Authentication

The Laybuy API uses Basic Authentication, where the username is your merchant username and the password is your API key. Please note merchant username is different to your merchant Id (MID).

curl 'https://sandbox-api.laybuy.com/order/create' -u '{merchantUsername}:{apiKey}'
<? $authHeader = 'Authorization: Basic ' . base64_encode($merchantUsername . ':' . $apiKey); ?

API Requests

  • The Laybuy Merchant API is REST-based.
  • It accepts and returns only JSON data.
  • All communication must be completed securely using HTTPS