For a WooCommerce store, NMI hosted payment fields (Collect.js) are usually the better fit than a hosted checkout page: the shopper stays on your checkout, you control the layout, and the card data still goes straight to NMI. A hosted checkout, where the shopper is sent to a payment page and returned afterwards, is simpler to build but moves part of the order flow out of your control. This post gives you the decision rules.
The two models in one paragraph each
Hosted payment fields. Your page renders the checkout. Only the card inputs are NMI iframes. The browser gets a token and your server charges it. Your site owns the order, the button, the error messages and the redirect. This is what Collect.js does.
Hosted checkout (redirect). Your site hands the order to a payment page on a gateway domain. The shopper pays there and is sent back with a result. Your server never sees a token before the payment, so it learns the outcome from the return trip, and sometimes from a server notification.
Decision rules
- You care about checkout conversion and brand continuity: choose hosted fields. A redirect is an extra page load and a visible domain change.
- You need saved cards, one-click reorder or renewals: choose hosted fields, because the token can be stored in the Customer Vault at the time of payment. See saved cards and Customer Vault.
- You cannot run any custom JavaScript on checkout: a redirect avoids it, but check that your processor offers one.
- You want the smallest PCI questionnaire: both reduce scope. A full redirect keeps even the checkout page out of the payment step. Confirm your questionnaire with your acquirer rather than assuming.
- You use a page builder: hosted fields need the checkout to render the standard payment area; read NMI with Elementor and other builders.
What each one costs you
Hosted fields depend on a script loading and running in the browser. A CSP rule, a script optimizer or a theme override can stop the fields appearing, which is the usual cause behind a missing NMI payment method. Fixing that is a one-time job per site, and checkout speed is worth measuring afterwards; see what slows a WooCommerce checkout down.
A hosted checkout costs you in other places: abandoned returns (the shopper pays but never lands back on your site), orders stuck pending because the return or notification did not arrive, and a payment page you may only be able to style within limits set by the provider.
What NMIWP supports
NMI for WooCommerce uses hosted card fields through Collect.js, on both the block checkout and the classic checkout, in the Free plugin. The site does not list a redirect-style hosted checkout as a feature, so if you need one, check the current docs or ask support before planning around it. Note also that NMI's own docs now point new builds to its Payment Component and REST API, and describe Collect.js as documented for existing integrations. For a WooCommerce plugin the practical point is that Collect.js is documented and working today; what a given plugin adopts later is the plugin's decision, so check its changelog.
Check before you commit
- Ask your processor or reseller which integration methods your gateway account is enabled for.
- Create a public tokenization key and test hosted fields in your sandbox.
- Place one order on desktop and one on mobile and watch the full flow, including a failed card.
- If you are considering a redirect, test what happens when the shopper closes the tab after paying.
- Check your hooks and filters for what you can change without custom code: hooks and filters.
More integration notes live on the developer resources hub.
A worked example: the same order under each model
With hosted fields, the shopper fills in the shipping address, then types the card into fields inside your checkout and clicks pay. They stay on your domain the whole time. Your server receives a token, charges it, and shows your own order received page. The merchant sees the order and the gateway response in the same moment.
With a redirect, the shopper leaves for a payment page, pays there, and is sent back. If they close the tab after paying and before returning, the money moves but your site may not know yet. The merchant then sees an order waiting for payment and has to confirm the result in the portal. That gap is the main practical difference.
Mistakes to avoid when choosing
- Choosing a redirect only because it sounds more secure, without checking what your acquirer asks you to attest to.
- Picking hosted fields, then letting a script optimizer or security rule break them on the live site only.
- Not testing the abandoned path: a closed tab, a back button, a slow connection.
- Assuming a plugin supports a method because the gateway does. Check what the plugin lists.
Before deciding, ask your processor or reseller which methods your account is enabled for and whether your merchant agreement limits any of them. Then run both candidates in sandbox with a declined card and a closed tab, and choose the one whose failure behavior you can live with.
Running NMI on WooCommerce? Free covers the basics and Pro adds the paid features. Compare Free and Pro.
Last reviewed November 2026.