top of page

Run your first token payment

Run a controlled checkout test from token collection through reconciliation.

Prepare the test

You need a sandbox merchant, its public tokenization key, its server processing key and a working payment component configuration. The frontend guide in this portal documents the NMI React and vanilla packages. Keep their SDK configuration separate from your own server route. online

Build the application boundary

Recommended implementation sequence: Create a sandbox order with an authoritative server-side amount. Mount the supported component using the public tokenization key. Receive a fresh token from the component callback. Send that token to your own authenticated backend route. Load the order on the server and construct a sale request from its amount. Keep the private key and gateway request exclusively on the server.

Submit the gateway request

Use the sale reference in this portal for the request fields. The endpoint below is the gateway route, not a browser fetch destination. POST https://sandbox.nmi.com/api/v5/payments/sale Server credential: sandbox private merchant API key Body: authoritative amount + payment_details.payment_token

Test evidence checklist

Recommended evidence to collect: Scenario Evidence Approved test flow Order ID, gateway ID and redacted result. Validation failure Visible error and no falsely completed order. Repeated submit One intentional application payment attempt. Lost response Unresolved state with an investigation path. Reversal Confirmed void or refund on an eligible test payment. Reporting Gateway record matched to the application ledger.

Use test mode deliberately

Test Mode does not send transactions to the card or ACH processor. It does not replace production provisioning, processor compatibility checks or live settlement validation. Use only documented sandbox payment data and keep test records out of business revenue reporting.

Completion criteria

The base card checkout was exercised in the sandbox: Chrome tokenization, a server-side sale and a confirmed void. Test your own integration and account configuration before rollout. Wallets, actual webhook delivery, settlement and physical-device flows require separate evidence. Use the Payment Component guide in this portal for verified NMI package names and callbacks. No separate Betterpay SDK is required. Test the complete browser-to-server flow in your merchant sandbox before rollout.

Join the community and get the latest biz news & tips

Thanks for submitting!

© 2025 Betterpay. All Rights Reserved.

bottom of page