npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@velocity-bpa/n8n-nodes-klarna

v1.0.0

Published

n8n node for Klarna payment processing and order management

Downloads

117

Readme

n8n-nodes-klarna

[Velocity BPA Licensing Notice]

This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).

Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.

For licensing information, visit https://velobpa.com/licensing or contact [email protected].

This n8n community node integrates with Klarna's payment platform, providing access to 5 core resources for managing payment sessions, orders, captures, refunds, and settlements. Automate your Klarna payment workflows with comprehensive support for the complete payment lifecycle from session creation to settlement reconciliation.

n8n Community Node License TypeScript Klarna API Payments E-commerce

Features

  • Payment Session Management - Create, update, and manage Klarna payment sessions for checkout flows
  • Order Processing - Handle order creation, authorization, and lifecycle management
  • Capture Operations - Process full and partial captures for authorized orders
  • Refund Handling - Execute refunds with support for partial amounts and reason codes
  • Settlement Tracking - Monitor and reconcile settlement reports and transaction data
  • Comprehensive Error Handling - Built-in retry logic and detailed error messages
  • Flexible Authentication - Secure API key-based authentication with environment support
  • Production Ready - Full type safety and validation for reliable payment processing

Installation

Community Nodes (Recommended)

  1. Open n8n
  2. Go to SettingsCommunity Nodes
  3. Click Install a community node
  4. Enter n8n-nodes-klarna
  5. Click Install

Manual Installation

cd ~/.n8n
npm install n8n-nodes-klarna

Development Installation

git clone https://github.com/Velocity-BPA/n8n-nodes-klarna.git
cd n8n-nodes-klarna
npm install
npm run build
mkdir -p ~/.n8n/custom
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-klarna
n8n start

Credentials Setup

| Field | Description | Required | |-------|-------------|----------| | API Key | Your Klarna API key from the merchant portal | Yes | | Environment | Production or Sandbox environment | Yes | | Region | API region (EU, NA, OC) | Yes |

Resources & Operations

1. Payment Session

| Operation | Description | |-----------|-------------| | Create | Create a new payment session for checkout | | Get | Retrieve payment session details | | Update | Update payment session information | | Delete | Cancel and remove a payment session |

2. Order

| Operation | Description | |-----------|-------------| | Create | Create a new order from payment session | | Get | Retrieve order details and status | | Update | Modify order information | | Cancel | Cancel an existing order | | Extend Authorization | Extend order authorization period |

3. Capture

| Operation | Description | |-----------|-------------| | Create | Capture funds for an authorized order | | Get | Retrieve capture details | | Get All | List all captures for an order | | Update | Update capture information |

4. Refund

| Operation | Description | |-----------|-------------| | Create | Issue a refund for captured funds | | Get | Retrieve refund details | | Get All | List all refunds for an order |

5. Settlement

| Operation | Description | |-----------|-------------| | Get Report | Retrieve settlement report | | Get Transactions | List settlement transactions | | Get Payouts | Retrieve payout information |

Usage Examples

// Create a payment session
{
  "purchase_country": "US",
  "purchase_currency": "USD",
  "locale": "en-US",
  "order_amount": 2500,
  "order_tax_amount": 250,
  "order_lines": [
    {
      "name": "Gaming Laptop",
      "quantity": 1,
      "unit_price": 2500,
      "tax_rate": 1000,
      "total_amount": 2500,
      "total_tax_amount": 250
    }
  ]
}
// Capture an order
{
  "order_id": "order_12345",
  "captured_amount": 2500,
  "description": "Full order capture",
  "order_lines": [
    {
      "name": "Gaming Laptop",
      "quantity": 1,
      "unit_price": 2500,
      "total_amount": 2500
    }
  ]
}
// Process a refund
{
  "order_id": "order_12345",
  "refunded_amount": 500,
  "description": "Partial refund - shipping cost",
  "order_lines": [
    {
      "name": "Shipping refund",
      "quantity": 1,
      "unit_price": 500,
      "total_amount": 500
    }
  ]
}
// Get settlement report
{
  "settlement_date": "2024-01-15",
  "currency": "USD",
  "payment_method": "card"
}

Error Handling

| Error | Description | Solution | |-------|-------------|----------| | 401 Unauthorized | Invalid API credentials | Verify API key and environment settings | | 404 Not Found | Resource does not exist | Check order ID, session ID, or resource identifier | | 400 Bad Request | Invalid request parameters | Validate required fields and data formats | | 409 Conflict | Resource state conflict | Check order status before performing operations | | 422 Unprocessable Entity | Business logic validation failed | Review order amounts, currency, and line items | | 429 Too Many Requests | Rate limit exceeded | Implement request throttling and retry logic |

Development

npm install
npm run build
npm test
npm run lint
npm run dev

Author

Velocity BPA

Licensing

This n8n community node is licensed under the Business Source License 1.1.

Free Use

Permitted for personal, educational, research, and internal business use.

Commercial Use

Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.

For licensing inquiries: [email protected]

See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.

Contributing

Contributions are welcome! Please ensure:

  1. Code follows existing style conventions
  2. All tests pass (npm test)
  3. Linting passes (npm run lint)
  4. Documentation is updated for new features
  5. Commit messages are descriptive

Support