top of page

SDKs and libraries

Choose the browser library or device integration that fits your application, then follow a complete implementation guide.

Start with the recommended online path

For a new online checkout, use the Payment Component to collect payment details and the REST Payments API on your server to process its token. Choose one frontend package below. The server integration uses HTTPS and JSON; you do not need to invent or install a Betterpay server SDK. Start your first sandbox checkout Process the token on your server

Browser package selector

These are the actual NMI package and export names verified in the current frontend documentation. Keep your chosen package version in the application lockfile and test upgrades before rollout. Application Install Entry point React npm install @nmipayments/nmi-pay-react NmiPayments Vanilla JavaScript or another framework npm install @nmipayments/nmi-pay mountNmiPayments Existing Collect.js checkout Retain its verified existing script setup Migrate server submission separately if needed // React import { NmiPayments } from '@nmipayments/nmi-pay-react'; // Alternative: framework-independent mounting import { mountNmiPayments } from '@nmipayments/nmi-pay'; Implement the Payment Component Maintain Collect.js

Understand what the library does

The frontend library renders payment fields, validates entry and returns a token. It does not replace your order ledger, private-key storage or payment-result handling. Provide the public tokenization key and implement onPay or onChange. onPay returns a Promise resolving to true or an error string. Your server determines the actual order amount and submits the token with its private merchant credential. Prepare the sandbox merchant and matching public/private credentials. Install one package and mount the payment component. Connect the token callback to your application-owned server route. Check approval, persist the transaction ID and render the order result. Configure keys Run the first-token recipe

Choose the in-person route by deployment

Device support depends on the platform, hardware, processor and merchant configuration. Start with the device guides here to identify prerequisites and the actual SDK or API. Do not select a reader only because a similarly named device appears in marketing material. Use case Starting point Confirm first Browser/POS with connected terminal Cloud terminals Device registration, supported processor and network connectivity Phone or tablet with reader Mobile readers OS, reader model, SDK support and merchant enablement Phone as acceptance device Tap to Pay Platform enrollment and supported merchant configuration Kiosk or unattended deployment Unattended payments Device family, deployment OS and certification requirements Cloud terminals Mobile readers Tap to Pay Unattended payments

Verify before adding optional features

Complete the basic sandbox token sale before adding wallets, saved cards or recurring billing. Add each feature only after confirming account support. Keep the first payment implementation small enough that failed tokenization, API rejection and a lost response can each be identified and recovered. Sandbox test matrix Style checkout and add wallets Launch checklist

Join the community and get the latest biz news & tips

Thanks for submitting!

© 2025 Betterpay. All Rights Reserved.

bottom of page