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

@controleonline/react-native-getnet-payment

v1.0.0

Published

React Native module for Getnet POS payments via deeplink

Readme

@controleonline/react-native-getnet-payment

Módulo React Native para integração de pagamentos com terminais Getnet POS via deeplink.

Suporta crédito, débito, voucher, PIX, estorno, reimpressão e consulta de status.

Apenas Android. Requer o app de pagamentos da Getnet instalado no terminal.

Instalação

npm install @controleonline/react-native-getnet-payment
# ou
yarn add @controleonline/react-native-getnet-payment

Android

  1. minSdkVersion >= 22

  2. Registre o package no MainApplication.java / MainApplication.kt:

import com.controleonline.pos.getnet.payment.GetnetPackage;

// em getPackages():
packages.add(new GetnetPackage());

Uso

import Getnet from '@controleonline/react-native-getnet-payment';
import { v4 as uuidv4 } from 'uuid';

// Pagamento crédito à vista
const result = await Getnet.payment({
  amount: 15.0,
  paymentType: 'credit', // credit | debit | voucher | pix
  callerId: uuidv4(),
  installments: 1,
  // creditType: 'creditMerchant' | 'creditIssuer', // só se installments > 1
  // allowPrintCurrentTransaction: true,
  // orderId: 'PEDIDO-123',
});

if (result.success) {
  console.log('Aprovado!', result.authorizationCode, result.nsu);
} else {
  console.log('Falhou:', result.result, result.resultDetails);
}

// Estorno
await Getnet.refund({
  amount: 15.0,
  cvNumber: result.cvNumber,
  // transactionDate: '150921',
  // originTerminal: '...',
});

// Reimpressão do último comprovante
await Getnet.reprint();

// Consulta de status
await Getnet.checkStatus(callerId);

Métodos

payment(params)

| Parâmetro | Tipo | Obrigatório | Descrição | |-----------|------|-------------|-----------| | amount | number | sim | Valor em reais (ex: 15.50) | | paymentType | string | sim | credit, debit, voucher ou pix | | callerId | string | sim | Identificador único da transação | | installments | number | não | Parcelas (1–12). Débito deve ser 1 | | creditType | string | não | creditMerchant ou creditIssuer (parcelado) | | allowPrintCurrentTransaction | boolean | não | Imprimir comprovante | | orderId | string | não | ID do pedido |

refund(params)

| Parâmetro | Tipo | Obrigatório | Descrição | |-----------|------|-------------|-----------| | amount | number | sim | Valor em reais | | cvNumber | string | não | Número do CV da transação original | | transactionDate | string | não | Data da transação | | originTerminal | string | não | Terminal de origem | | allowPrintCurrentTransaction | boolean | não | Imprimir comprovante |

reprint()

Reimprime o comprovante da última transação.

checkStatus(callerId)

Consulta o status de uma transação pelo callerId.

Resposta

{
  result: "0",              // "0" = sucesso
  resultDetails: "TRANSACAO APROVADA",
  success: true,
  amount: "000000001500",
  callerId: "...",
  nsu: "...",
  cvNumber: "...",
  authorizationCode: "...",
  cardBin: "...",
  cardLastDigits: "...",
  brand: "...",
  installments: "...",
  nsuLocal: "...",
  // ... demais campos retornados pelo app Getnet
}

Códigos de result

| Código | Significado | |--------|-------------| | 0 | Sucesso | | 1 | Negada | | 2 | Cancelada | | 3 | Falha | | 4 | Desconhecido | | 5 | Pendente |

Deeplinks

| Operação | URI | |----------|-----| | Pagamento | getnet://pagamento/v3/payment?... | | Estorno | getnet://pagamento/v1/refund?... | | Reimpressão | getnet://pagamento/v1/reprint | | Status | getnet://pagamento/v1/checkstatus?callerId=... |

Requisitos

  • Terminal Getnet (Smart POS) com app de pagamentos instalado
  • Android API 22+
  • React Native

Referências

License

MIT