Implementation Example

Instead of including the complete implementation here, we’ve created a ready-to-use CodeSandbox template that you can fork and customize: Open Reach SDK Example in CodeSandbox

Getting Started

Once you open the CodeSandbox link, you’ll need to update two configuration files:
  1. Client Configuration (src/config/reach-config.ts):
    export const reachConfig = {
      // The user/business ID from your system
      tenantExternalId: 'YOUR_TENANT_EXTERNAL_ID',
      // Your unique vertical saas platform identifier provided by Reach
      partnerId: 'YOUR_PARTNER_ID',
      // The feature you want to use (e.g., "measure", "acquire")
      feature: 'acquire',
      // Set to true for additional console logging during development
      debug: false,
    };
    
  2. Server Configuration (server/config/server-config.js):
    module.exports = {
      // Your Reach provided secret key for signing JWTs
      jwtSecret: 'YOUR_JWT_SECRET',
    };
    

What’s Included

The CodeSandbox example includes:
  • A complete React implementation with the Reach SDK
  • Token authentication handling
  • Proper cleanup and disposal
  • JWT token generation on the server
  • Basic error handling for authentication

Next Steps

After updating the configuration files, the Reach SDK will be fully functional in your sandbox environment. You can then:
  1. Test the implementation
  2. Copy the relevant code to your own project
  3. Customize the UI or callback implementations as needed