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

qliroone_reactnative

v0.1.22

Published

This library is a QliroOne wrapper for React Native.

Readme

QliroOne Checkout

What does QliroOne Checkout offer?

This package wraps QliroOne Checkout and exposes its functionality as a React Native component.

Getting started

Install the package yarn add qliroone_reactnative

iOS

Run pod install --project-directory=ios.

Android

Nothing more required

Payment Providers

BankID (Trustly and customer authentication)

To be able to open BankID in Sweden you will have to add an entry in the Info.plist for iOS:

	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>bankid</string>
	</array>

Swish

To be able to open Swish in Sweden you will have to add an entry in the Info.plist for iOS:

	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>swish</string>
	</array>

Usage

Import the QliroOneCheckout component from qliroone_reactnative and use it like:

With scroll enabled (default):

import React from "react";
import { View } from "react-native";
import { QliroOneCheckout } from "qliroone_reactnative";

// ...

const CheckoutPage = () => {
  const checkoutRef = useRef<QliroOneCheckout>(null);

  return (
    <View style={{ flex: 1 }}>
      <QliroOneCheckout
        ref={checkoutRef}
        orderHtml={htmlSnippet}
        isScrollEnabled={true}
        onCheckoutLoaded={() => console.log("loaded")}
      />
    </View>
  );
};

With scroll disabled:

import React from "react";
import { View } from "react-native";
import { QliroOneCheckout } from "qliroone_reactnative";

// ...

const CheckoutPage = () => {
  const checkoutRef = useRef<QliroOneCheckout>(null);

  return (
    <ScrollView style={{ flex: 1 }}>
      <QliroOneCheckout
        ref={checkoutRef}
        orderHtml={htmlSnippet}
        isScrollEnabled={false}
        onCheckoutLoaded={() => console.log('loaded')}
      />
    </ScrollView>
  );
};

Configurable props

Checkout Event props

SDK Specific Event props

Checkout Actions

SDK Specific Actions

Configurable props

orderHtml

The html-snippet to the checkout, it is the html-snippet returned from the getOrder.

isScrollEnabled

Sets to enable scroll, default is true. If scrolling is disabled the component height is as tall as the content of QlirOne.

SDK Specific Event props

onOrderUpdated

Called after the ´updateOrders´ action has been called when Qliro One has synced its orders. This might be called multiple times and should return true when the Qliro One and the app is in sync. Once the order change can be validated, call removeOrderUpdateCallback and unset the locked property in order for the customer to interact with the checkout again.

Example:

const checkoutRef = useRef<QliroOneCheckout>(null);

const onCartChanged = async () => {
  checkoutRef.current?.lock();
  /// ...
  const updatedCart = await ...
  /// ...
  checkoutRef.current?.addOrderUpdateCallback();
}

const onOrderUpdated = (order: Order) => {
  // Check that the order is synced with your order.
  const orderCorrect = ...
  if (orderCorrect) {
    checkoutRef.current?.removeOrderUpdateCallback();
    checkoutRef.current?.unlock();
  }
};

// ...
<QliroOneCheckout
  onOrderUpdated={onOrderUpdated}
  // ...
/>;

onCompletePurchaseRedirect

A callback called when a purchase has been completed. The successUrl you created in the createCart will be provided in this callback in an object as merchantConfirmationUrl: { merchantConfirmationUrl: string }

Example:

<QliroOneCheckout
  // ...
  onCompletePurchaseRedirect={(options) => {
    dispatch({ type: "CHECKOUT_SUCCESS" });
    navigation.dispatch(
      StackActions.replace("ThankYou", {
        successUrl: options.merchantConfirmationUrl,
      })
    );
  }}
  // ...
  // ...
/>

SDK Specific Actions

addOrderUpdateCallback and removeOrderUpdateCallback

Initiates and removes the order sync process.

See onOrderUpdated

lock and unlock

Initiates and removes the order sync process.

See onOrderUpdated

onScroll

If QliroOne is rendered inside a scrollview this function needs to be called on when scrolling to ensure correct positions on popups in the checkout.

Example:

<FlatList
  ref={listRef}
  scrollEventThrottle={120}
  onScroll={() => {
    checkoutRef.current?.onScroll();
    // ...
  }}
  data={productsInCart}
  renderItem={({ item }) => (
    //
    // rendering products in cart
    //
  )}
  ListFooterComponent={
    <QliroOneCheckout
        ref={checkoutRef}
        // ...
        // ...
        // ...
      />
  }
/>

More information about these callbacks can be found in the developer portal.