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:- Stage (Testing)
- Production (Live)
Use this for development and testing with simulated payments:
Tip
Always test your integration thoroughly in the stage environment before going live.
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: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: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 aPOST request to the Consolidate endpoint, sending the sessionId and cardholder details:
Environments:
- Stage:
- Production:
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 resourcesWebhook 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.

