{"id":49482,"library":"synapsenode","title":"SynapseNode","description":"Node.js client library for SynapseFI REST API v3.1, built with TypeScript for improved developer experience. Current version is 2.0.0-beta.11, released as a major version rewrite that is backward compatible. Supports both sandbox and production environments, with key management via environment variables. Differentiators include TypeScript support (first-party types), Promise-based async operations, and comprehensive coverage of SynapseFI's payments and financial APIs. Release cadence is beta-phase with ongoing updates.","status":"active","version":"2.0.0-beta.11","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","API","payments","synapsefi","synapsepay","typescript"],"install":[{"cmd":"npm install synapsenode","lang":"bash","label":"npm"},{"cmd":"yarn add synapsenode","lang":"bash","label":"yarn"},{"cmd":"pnpm add synapsenode","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for loading environment variables (CLIENT_ID, CLIENT_SECRET, FINGERPRINT) from .env file as recommended in documentation.","package":"dotenv","optional":true}],"imports":[{"note":"Since v2.0.0-beta, named export is available via ESM; CommonJS pattern still works but is legacy.","wrong":"const Synapse = require('synapsenode'); const Client = Synapse.Client;","symbol":"Client","correct":"import { Client } from 'synapsenode'"},{"note":"Default import in ESM; CJS require returns an object with Client property, not the default export.","wrong":"const Synapse = require('synapsenode').default;","symbol":"Synapse (default)","correct":"import Synapse from 'synapsenode'"},{"note":"Use import type for TypeScript interfaces to avoid bundling runtime code.","wrong":"import { IClientOptions } from 'synapsenode' (without type keyword)","symbol":"types (e.g., IClientOptions)","correct":"import type { IClientOptions } from 'synapsenode'"}],"quickstart":{"code":"import Synapse from 'synapsenode'; // or const Synapse = require('synapsenode')\n\nconst client = new Synapse.Client({\n  client_id: process.env.CLIENT_ID ?? '',\n  client_secret: process.env.CLIENT_SECRET ?? '',\n  fingerprint: process.env.FINGERPRINT ?? '',\n  ip_address: '127.0.0.1',\n  isProduction: false\n});\n\nasync function createUser() {\n  try {\n    const user = await client.users.create({\n      logins: [{ email: 'test@example.com' }],\n      phone_numbers: ['+1-555-555-5555'],\n      legal_names: ['Test User']\n    });\n    console.log('User created:', user.id);\n  } catch (error) {\n    console.error('Error creating user:', error);\n  }\n}\n\ncreateUser();","lang":"typescript","description":"Initializes a Synapse Client in sandbox mode using environment variables and creates a new user."},"warnings":[{"fix":"Test extensively in sandbox before upgrading from v1.x.","message":"v2.0.0 is a major version rewrite with TypeScript; although claimed backward compatible, review migration guide for potential signature changes.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use const { Client } = require('synapsenode') or import { Client } from 'synapsenode'.","message":"The default export Synapse is different from the named export Client; CJS require returns an object with Client property.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Create .env file with required variables or pass them directly to client constructor.","message":"Environment variables CLIENT_ID, CLIENT_SECRET, FINGERPRINT are mandatory; missing them will cause runtime errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Default to false (sandbox) for development.","message":"Setting isProduction to true uses production endpoint; ensure you have production credentials and intend real API calls.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.0.0':20 'api':8,66,77 'async':55 'backward':30 'base':54 'beta':71 'beta-phas':70 'beta.11':21 'built':10 'cadenc':68 'client':3 'compat':31 'comprehens':58 'coverag':59 'current':17 'develop':15 'differenti':44 'environ':37,42 'experi':16 'financi':65 'first':49 'first-parti':48 'improv':14 'includ':45 'javascript':76 'key':39 'librari':4 'major':25 'manag':40 'node.js':2 'ongo':74 'oper':56 'parti':50 'payment':63,78 'phase':72 'product':36 'promis':53 'promise-bas':52 'releas':22,67 'rest':7 'rewrit':27 'sandbox':34 'support':32,47 'synapsefi':6,61,79 'synapsenod':1 'synapsepay':80 'type':51 'typescript':12,46,81 'updat':75 'v3.1':9 'variabl':43 'version':18,26 'via':41","created_at":"2026-06-07T17:02:00.352946+00:00","updated_at":"2026-06-07T17:02:00.352946+00:00","problems":[{"fix":"Use const { Client } = require('synapsenode') or import { Client } from 'synapsenode'.","cause":"Using default import with CJS require incorrectly.","error":"TypeError: Synapse.Client is not a constructor"},{"fix":"Call require('dotenv').config() and ensure .env file exists.","cause":"Missing environment variables or .env file not loaded.","error":"Error: CLIENT_ID is not defined"},{"fix":"Regenerate credentials from SynapseFI dashboard.","cause":"Invalid or expired client_id/client_secret/fingerprint.","error":"Error: 401 Unauthorized"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"synapsenode","openapi_spec":null,"status_page":null,"smithery":null,"categories":["payments","finance"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}