Skip to main content
This guide provides a detailed, step-by-step process for integrating Smart Fields into your payment checkout. By the end, you will be able to securely collect payment details directly within your website while Localpayment handles the sensitive data.

Prerequisites

Ensure you have these essential components ready:

API Keys

Get your authentication keys from either Stage (testing) or Production environment.

Client Code

Your unique merchant identifier found the Localpayment business portal.

Backend Setup

A server endpoint ready to receive payment tokens and process transactions.

Integration Steps

1. Include the Smart Fields SDK

Choose the appropriate environment for your integration:
Use this for development and testing with simulated payments:
Tip
Always test your integration thoroughly in the stage environment before going live.

2. Initialize the SDK

Initialize the SDK with your credentials once the script loads:
Configuration Parameters:

3. Create a Secure Session

Establish a secure connection with Localpayment’s servers:
Security NoteThe session establishes encrypted communication channels for all payment data.

4. Set Up Payment Form

Create the HTML structure for your payment form:

5. Create and Mount Payment Fields

Initialize the secure payment fields and mount them to your form:
Use the mount() method to render the secure iframe within your specified container. Pass a CSS selector string that identifies your target DOM element (e.g., #pan-container). Field Types and Features:

6. Handle Field Events and Validation

Listen to events from each field to update your UI and track their validation status:

7. Process Payment Submission

Retrieve the session data and sessionId:

8. Consolidate Session and Get Token

Create a POST request to the Consolidate endpoint, sending the sessionId and cardholder details:
Environments:
  • Stage:
  • Production:
Expected Consolidation Response:

9. Process Payment

Create a new Payin and use the token parameter instead of cardholder information. The token securely represents the payment method without exposing sensitive details.

Resources & Next Steps

Maximize your integration success with these essential resources

Webhook Integration

Set up real-time notifications for transaction status updates.

Reporting Business Portal

Access detailed analytics, reporting tools, and reconciliation features.

Transaction Monitoring

Learn to query transaction status and implement comprehensive tracking.

API Reference

Complete endpoint documentation with interactive examples.

Pro TipAlways test your workflow in our sandbox environment before deploying to production. This ensures your error handling, webhook processing, and status tracking work correctly across all scenarios.

Need Help?Contact our support team if you experience any issues or need assistance for integration.

Last modified on November 22, 2026