Skip to main content
Test Smart Fields safely in the Localpayment Sandbox. Simulate payments and validate your integration before going live. Testing your Smart Fields integration is a critical step before going live. The Localpayment Sandbox allows you to simulate real-world scenarios securely, helping you validate both frontend and backend flows.

Stage Environment

Utilize the sandbox environment with test API keys for your integration:
Ensure you are using the correct API Key and the Stage SDK URL in your application:
  • API Keys: Generate separate API Keys for Stage and Production environments.
  • Domain Validation: Session initialization will fail if requests come from unregistered domains, triggering an “Invalid Source Domain” error.
  • Simulation Only: Sandbox transactions simulate payment flows without moving real money.

Test Card Numbers

Use the following test card numbers to simulate different payment scenarios:
  • Expiration Date: Use any valid future date.
  • CVV: Any 3-digit CVV is acceptable.
  • Cardholder Name: Any name is acceptable.

Error Simulation

Test error handling by simulating potential issues:

Invalid Card Number

  • Scenario: Use 4242424242424241.
  • Outcome: Triggers a change event with isValid: false.

Expired Card

  • Scenario: Use a past expiration date, e.g., 12/2020.
  • Outcome: Tokenization fails with expiration error.

Session Expiration

  • Scenario: Wait over 10 minutes after initializeSession()
  • Outcome: Tokenization fails due to session expiration.

Network Errors

  • Scenario: Disable internet connection temporarily.
  • Outcome: Tokenization fails with a network error.
Ensure your integration listens and responds to error events, offering appropriate user feedback and retry options.

Complete Test Example

Validate your integration with a complete example page:
Run the example from localhost. Add localhost as an allowed domain for the Smart Fields API Key to avoid domain validation errors.
Last modified on November 10, 2026