Add secure, branded payment fields to an existing website while keeping sensitive payment data out of the merchant’s application.
NMI Collect.js is a JavaScript tokenization library for eligible existing integrations. It can place gateway-hosted payment fields inside a merchant’s checkout experience, create a single-use payment token and pass that token to the merchant’s server for transaction processing through a compatible NMI API.
VCCP can help determine whether Collect.js fits your current website and development resources—or whether NMI’s newer Payment Component is the better path for a new integration.
How Collect.js Works
- Gateway-hosted fields collect eligible card or electronic-check information within the merchant’s payment form.
- Collect.js returns a payment token instead of exposing raw payment credentials to the merchant’s application.
- The merchant’s server sends the token with the required transaction details to a compatible NMI payment API.
- The payment token can support compatible transaction, subscription and Customer Vault workflows when properly implemented.
Lightbox or Inline Integration
Lightbox
A lightbox displays the sensitive payment fields in a gateway-hosted pop-up over the merchant’s website. This may offer a relatively straightforward way to add tokenized payment collection while preserving the surrounding checkout flow.
Inline
Inline integration embeds separate gateway-hosted fields into the page so the form can more closely match the merchant’s design. NMI’s Style Sniffer and supported custom styling options can help those fields blend with the rest of the website.
What Merchants Should Plan For
- Development work: Collect.js is an integration component, not a complete shopping cart or finished checkout page.
- Server-side processing: The website still needs a secure server workflow that submits the token and transaction details to NMI.
- Fraud controls: Tokenization does not replace bot protection, card-testing controls, transaction screening or appropriate velocity rules.
- PCI validation: Hosted fields can help reduce exposure to sensitive payment data, but the merchant remains responsible for the PCI DSS requirements and Self-Assessment Questionnaire that apply to the complete implementation.
- Current integration direction: NMI’s current developer documentation identifies Collect.js for existing integrations and directs new integrations toward its Payment Component and REST API. VCCP can help confirm the appropriate path before development begins.
Who May Be a Good Fit?
- Businesses maintaining an existing Collect.js integration
- Merchants that need a customized checkout experience on their own website
- Development teams that want tokenized payment fields and control over the surrounding user experience
- Businesses that need compatible subscription, Customer Vault or API-driven payment workflows
Collect.js or Collect Checkout?
Collect Checkout may be a better fit when the priority is a hosted checkout page, payment link or website button with less custom development. Collect.js is more appropriate for an existing integration that requires payment fields inside a merchant-controlled website experience. New custom integrations should also evaluate NMI’s current Payment Component.
Related NMI Tools
- Customer Vault for compatible stored-payment workflows
- Fraud Prevention for compatible transaction-risk controls
- 3DSService for compatible payer-authentication workflows
- Webhooks for compatible event notifications and automation
NMI Collect.js Frequently Asked Questions
What is NMI Collect.js?
Collect.js is an NMI JavaScript tokenization library for eligible existing website integrations. It places gateway-hosted payment fields in the checkout and returns a token instead of exposing raw payment credentials to the merchant’s application.
Does Collect.js process the payment by itself?
No. Collect.js creates a payment token. The merchant’s secure server-side application must submit that token and the required transaction information to a compatible NMI payment API.
Does Collect.js require a developer?
Yes. It is an integration component rather than a finished shopping cart. A developer should implement the fields, token handling, server request, error states, fraud controls and testing.
What is the difference between inline and lightbox Collect.js?
Inline mode embeds separate hosted fields within the page for greater design control. Lightbox mode presents the sensitive fields in a gateway-hosted overlay above the merchant’s site.
Does Collect.js eliminate PCI DSS responsibilities?
No. Hosted fields can reduce direct exposure to card data, but the merchant must validate the PCI DSS requirements and Self-Assessment Questionnaire that apply to the complete website and integration.
Should a new NMI integration use Collect.js?
NMI’s current developer direction identifies Collect.js for existing integrations and points new custom integrations toward its Payment Component and REST API. The best path should be confirmed before development starts.
Does tokenization stop card-testing attacks?
No. Tokenization protects payment-data handling but does not stop bots from submitting attempts. Websites still need CAPTCHA or comparable bot controls, rate limiting, monitoring and gateway fraud protection.
Plan the Right Website Payment Integration
Tell VCCP how your website is built, what customers need to pay for and whether you already have an NMI integration. We can help compare Collect.js, Collect Checkout and current NMI integration options while coordinating the compatible gateway, processor and merchant account.
Product availability, API support, integration options, pricing, processing compatibility and approval depend on the business, gateway configuration, processor, merchant account, development environment and underwriting. VCCP does not guarantee PCI scope, approval or availability of a particular configuration.