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

klarna-on-demand

v1.0.3

Published

SDK for Klarna's on-demand purchase service.

Downloads

59

Readme

Klarna on Demand

Build Status Version License

Klarna on-demand allows you to integrate Klarna's payment solution in applications that offer on demand services. It's a perfect fit for apps selling concert tickets, taxi rides, food pick-ups, etc.

This project contains Klarna's on-demand payment solution Javascript SDK, as well as a sample application utilizing the SDK. While the SDK is mostly aimed at hybrid phone apps, it can be utilized in any environment where Javascript is available.

It's Klarna in your App

While not necessary, the simplest way to get going with both the sample application and the SDK is to use NPM and so all the following instructions will focus on that approach. For an alternative approach, see the official documentation (coming soon).

Using the SDK

Have a look at the integration guide for full details on how to use our SDK in your application.

Running the sample application

Prerequisites

The easiest way to run the application is to download the SDK's NPM module. To that end, simply install npm by following this guide. Once installed, pick a directory where you would like to install the package and run:

npm install klarna-on-demand

Running the application

In the directory where you've installed the package, simply run:

open node_modules/klarna-on-demand/example/index.html

or on Windows:

start node_modules/klarna-on-demand/example/index.html

Note: While this will get the application up and running, you will not be able to successfully perform purchases without a backend for the application to interact with. You should go here and follow the instructions provided to get a sample backend running on your local machine.

Contributing

You'd like to help us out? That's great! Here's what you need to do in order to contribute.

Prerequisites

As per running the application.

Setup

  1. Fork the project and clone your repository
  2. In the project folder, run npm install
  3. Fire up your favorite editor and produce marvels!

Building

The SDK's codebase is in coffeescript. To turn it into javascript so that you can try it out in a browser simply run the following in the project folder:

gulp build

This will place the compiled SDK in a newly created ./lib/ folder, with all intermediary javascript available under the ./build/ folder.

You can also simply run:

gulp

which will launch a browser hosting the test application and live-watch for any changes in the code.

Tests

Pull requests must include tests for their proposed fixes/functionality. We use Jasmine to write our tests and you can find the tests themselves here.

Running the tests

From the project folder, simply run:

gulp watch-specs

to continuously run the tests as you code.

License

Klarna on Demand is available under the Apache 2.0 license. See the LICENSE file for more info.