top of page

Connect fraud screening to a payment

Pass the data-collector session to the payment request so screening can correlate the checkout.

Initialize Gateway.js

Load Gateway.js from the gateway host, not a self-hosted copy. Use a public key with Checkout permissions. The sandbox library is https://sandbox.nmi.com/js/v1/Gateway.js; the private payment key remains on your server. const gateway = Gateway.create('YOUR_PUBLIC_CHECKOUT_KEY'); const kount = gateway.getKount(); const sessionId = await kount.createSession(); // Send sessionId with the token to your application server.

Use the current session

Run the collector when the payment page loads. Use the latest session returned if it runs again. Sessions must be unpredictable, single-use and not reused within 30 days. Missing transaction_session_id prevents correct correlation.

Submit on your server

Map the collector result to transaction_session_id in the v5 payment request alongside payment_details.payment_token. Your server supplies the order amount and handles the gateway result. A collector session is not a payment approval. { "amount": 10, "transaction_session_id": "LATEST_COLLECTOR_SESSION", "payment_details": { "payment_token": "CHECKOUT_TOKEN" } }

Join the community and get the latest biz news & tips

Thanks for submitting!

© 2025 Betterpay. All Rights Reserved.

bottom of page