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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cielo-smartpos-expo-module

v0.4.1

Published

Module to integrate cielo smartpos

Readme

💳 cielo-smartpos-expo-module

Expo module library to simplify integration with Cielo SmartPOS

🚀 Installation

npm i cielo-smartpos-expo-module

Usage

import {
  doAsyncPayment,
  doAsyncVoidPayment,
  doAsyncPrintText,
  doAsyncPrintBitmap,
  getSerialNumber,
  CieloSmartposExpoModule,
} from "cielo-smartpos-expo-module";

AndroidManifest.xml setup

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
  <uses-permission android:name="android.permission.VIBRATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  <queries>
    <package android:name="com.ads.lio.uriappclient" />
  </queries>

  <queries>
    <intent>
      <action android:name="android.intent.action.VIEW"/>
      <category android:name="android.intent.category.BROWSABLE"/>
      <data android:scheme="https"/>
    </intent>
  </queries>

  <application
    android:name=".MainApplication"
    android:label="@string/app_name"
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:allowBackup="true"
    android:theme="@style/AppTheme"
    android:supportsRtl="true"
    android:enableOnBackInvokedCallback="false"
    android:requestLegacyExternalStorage="true">

    <meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>

    <activity
      android:name=".MainActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode"
      android:launchMode="singleTask"
      android:windowSoftInputMode="adjustResize"
      android:theme="@style/Theme.App.SplashScreen"
      android:exported="true"
      android:screenOrientation="portrait">

      <!-- App Launcher -->
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>

      <!-- Callback: payment -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="payment" android:scheme="@string/schema_return" />
      </intent-filter>

      <!-- Callback: payment reversal -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="payment-reversal" android:scheme="@string/schema_return" />
      </intent-filter>

      <!-- Callback: print -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="print" android:scheme="@string/schema_return" />
      </intent-filter>
    </activity>
  </application>
</manifest>

Strings.xml setup

<resources>
  <string name="app_name">cielo-smartpos-expo-module-example</string>
  <string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
  <string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>

  <!-- Scheme used for deep link callbacks -->
  <string name="schema_return">cielo-smartpos-expo-module</string>

  <!-- Hosts used by intent filters -->
  <string name="callback_payment">payment</string>
  <string name="callback_payment_reversal">payment-reversal</string>
  <string name="callback_print">print</string>
</resources>

⚠️ Important rule about the host name: it must match the screen route (Expo Router)

The host defined in each intent filter must match the exact route of the screen that will receive the deep link callback.

Examples:

app/index.tsx → host must be "index"

app/payment.tsx → host must be "payment"

app/sell/finish.tsx → host must be "finish"

So, for example:

✔ If your callback should return to app/index.tsx:

<data android:host="index" android:scheme="@string/schema_return" />

✔ For a screen like app/payment.tsx:

<data android:host="payment" android:scheme="@string/schema_return" />

This is mandatory, because SmartPOS always returns in the format:

<scheme>://<host>

And the host must match your route exactly for Expo Router to open the correct screen.

📁 You can check all function examples in example/App.tsx

📚 API Reference

🔧 Functions

doAsyncPayment: Starts a payment operation.

doAsyncVoidPayment: Performs a void (cancellation) of a previous payment.

doAsyncPrintText: Starts a text print

doAsyncPrintBitmap: Starts a image print

getSerialNumber: Returns the SmartPOS device serial number.

CieloSmartposExpoModule: Default exported module object (contains methods registration helpers).

📘 Important notice (Cielo documentation)

For full details about how SmartPOS deep link integration works, developers must consult the official Cielo documentation:

👉 Cielo SmartPOS Deep Link Integration

This library does not replace the official flow; it only simplifies the communication layer.

Contributing

🤝 Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📄 License

MIT