Skip to main content

Easily Integrate
Klarna's Payments API using Konfig's TypeScript SDK

Need a TypeScript SDK for Klarna's Payments API?

Growing API Companies trust Konfig's SDKs to onboard developers to their API.

SnapTradeHumanloopSplititLeapGroundx

First, instantiate the SDK

It only takes a few lines of code.

index.ts

import { KlarnaPayments } from 'klarna-payments-typescript-sdk';
const klarnaPayments = new KlarnaPayments()

Then, send your first request

We made it really easy.

index.ts

// Create a session
const createSessionResponse = klarnaPayments.payment.createSession({
acquiring_channel: "ECOMMERCE"
client_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIw"
expires_at: "2038-01-19T03:14:07.000Z"
locale: "en-US"
merchant_data: "{\"order_specific\":[{\"substore\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}"
merchant_reference1: "ON4711"
merchant_reference2: "hdt53h-zdgg6-hdaff2"
order_amount: 2000
order_tax_amount: 333
purchase_country: "GB"
purchase_currency: "GBP"
status: "complete"
intent: "buy"
})

Enjoy a buttery smooth developer experience with 6 SDK methods

How Konfig Works

Konfig collects APIs and automatically generates SDKs so you can focus on building your application.

openapi-examples

Konfig maintains the highest quality collection of OpenAPI Specifications on the internet in a GitHub repository

We pull OpenAPI Specifications from public sources, fix any errors, and make sure they pass our lint rules. We continually make sure the repository is up-to-date and collect up-time and response time metrics for every API.

openapi-examples-to-konfig

Generates AI-Augmented SDKs from openapi-examples

Our SDK generator is trusted by growing API companies and goes through a rigorous testing process to ensure the generated SDKs are high-quality and easy to use.

konfig-to-package-managers

Publishes to standard package managers

We publish to standard package managers like npm, PyPI, and Maven so you can easily integrate the SDK into your application.

Klarna

About Klarna

Klarna is a Swedish bank that provides online financial services such as payment solutions for online storefronts. It offers customers the ability to buy now and pay later, as well as other financing options. Klarna has gained popularity for its smooth checkout experience and customer-friendly payment options.

Keywords

finance
payments
online_payments
fintech
checkout_experience

Start integrating Klarna's Payments API with Konfig