New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@highnoteplatform/highnote-nodejs-sdk

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@highnoteplatform/highnote-nodejs-sdk

Highnote Server SDK for Node.js — resource-oriented wrapper over the Highnote GraphQL API

latest
npmnpm
Version
0.1.0-alpha.5
Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

@highnoteplatform/highnote-nodejs-sdk

TypeScript server SDK for the Highnote GraphQL API. Resource-oriented — no GraphQL knowledge required.

Status: Alpha — available via GitHub Packages for internal testing.

Installation

# Configure GitHub Packages registry (one-time setup — see .npmrc.template)
npm install @highnoteplatform/highnote-nodejs-sdk

Quick Start

import {
  Highnote,
  PaymentCardClientTokenPermission,
  PhoneLabel,
} from "@highnoteplatform/highnote-nodejs-sdk";

const client = new Highnote({
  apiKey: "sk_test_...",
  environment: "test", // "test" | "live"
});

// Create an account holder
const holder = await client.accountHolders.createUSPerson({
  personAccountHolder: {
    name: { givenName: "Jane", familyName: "Doe" },
    dateOfBirth: "1990-01-15",
    email: "jane@example.com",
    billingAddress: {
      streetAddress: "123 Main St",
      locality: "San Francisco",
      region: "CA",
      postalCode: "94105",
      countryCodeAlpha3: "USA",
    },
    phoneNumber: {
      countryCode: "1",
      number: "5551234567",
      label: PhoneLabel.MOBILE,
    },
  },
});

// Issue a card
const card = await client.cards.issue({
  financialAccountId: "fa_...",
  options: { activateOnCreate: true, expirationDate: "2028-12-31T00:00:00Z" },
});

// Generate a client token for the frontend card viewer
const token = await client.clientTokens.createForPaymentCard({
  paymentCardId: card.id,
  permissions: [PaymentCardClientTokenPermission.READ_RESTRICTED_DETAILS],
});

// List card products (auto-paginated)
for await (const product of client.cardProducts.list()) {
  console.log(product.name);
}

Resources

ResourceMethodsStatus
cardProductslist(), get(id)Available
cardsissue(), activate(), suspend(), close(), reissue(), orderPhysical(), cancelPhysicalOrder(), findATMLocations(), get(id)Available
accountHolderscreateUSPerson(), get(id), listPersons(), listBusinesses(), searchPersons(), searchBusinesses()Available
applicationscreate(), get(id)Available
clientTokenscreateForPaymentCard(), createForTokenization()Available
financialAccountsissue(), get(id), suspend(), unsuspend()Available
transactionslist() with pagination and filteringAvailable
transfersinitiateBetweenAccounts()Available
spendRulescreateMerchantCategory(), createAmountLimit(), attachToCard(), detachFromCard()Available
webhooksadd(), deactivate()Available
documentsstartSession(), createUploadLink(), endSession()Available
digitalWalletsaddToApplePay(), addToGooglePay()Available
collaborativeAuthaddEndpoint(), deactivateEndpoint()Available
disputesinitiate(), get(id)Available
externalAccountsaddVerifiedThroughPlaid(), addVerifiedThroughFinicity(), addNonVerified()Available
achinitiateTransfer(), createOneTimeTransfer(), createRecurringTransfer(), cancelTransfer()Available

Configuration

OptionTypeDefaultDescription
apiKeystringrequiredHighnote API key (sk_test_... or sk_live_...)
environment"test" | "live""test"API environment
baseUrlstring—Override API URL (for proxies/mocking)
defaultPageSizenumber20Items per page for paginated queries

Exported Enums

The SDK exports enums for properly typing inputs — no as any needed:

EnumUsed For
PhoneLabelAccount holder phone numbers (MOBILE, HOME, WORK, SUPPORT)
PaymentCardClientTokenPermissionClient token permissions (READ_RESTRICTED_DETAILS, SET_PAYMENT_CARD_PIN, etc.)
GeneratePaymentMethodTokenizationClientTokenPermissionTokenization permissions
PaymentCardStatusCard status (ACTIVE, SUSPENDED, CLOSED, ACTIVATION_REQUIRED)
PaymentCardOrderStatusPhysical card order status (NEW, APPROVED, SHIPPED, CANCELED, etc.)
CardFormFactorCard form factor (PHYSICAL, VIRTUAL)
FinancialAccountStatusAccount status (ACTIVE, SUSPENDED, CLOSED, PENDING_CLOSURE)
FinancialAccountSuspensionReasonInputSuspension reason (ACCOUNT_HOLDER_REQUEST, SUSPECTED_FRAUD, etc.)
AccountHolderApplicationStatusCodeApplication status (APPROVED, DENIED, IN_REVIEW, PENDING, CLOSED)
PaymentTransactionStatusTransaction status (AUTHORIZED, CAPTURED, etc.)
TransferPurposeTransfer purpose (GENERAL, LOAN_ADVANCE, REFUND_OR_REVERSAL, etc.)
InterFinancialAccountTransferStatusTransfer status
NotificationEventNameWebhook event subscriptions (50+ events)
NotificationTargetStatusWebhook target status (ACTIVE, PENDING_VERIFICATION, DEACTIVATED)
DocumentTypeDocument upload type (DRIVERS_LICENSE, BANK_STATEMENT, etc.)
DocumentUploadSessionStatusCodeUpload session status (CREATED, INITIATED, SUBMITTED, etc.)
PaymentCardDigitalWalletDeviceTypeDevice type for wallet provisioning (MOBILE, TABLET, WATCH)
CollaborativeAuthorizationEndpointStatusAuth endpoint status (ACTIVE, PENDING_VERIFICATION, DEACTIVATED)
PaymentCardDisputeStatusDispute status (INITIATED, IN_PROGRESS, WON, LOST, etc.)
PaymentCardDisputeCategoryTypeDispute category (FRAUD, CUSTOMER_DISPUTE, AUTHORIZATION, PROCESSING_ERROR)
PaymentCardDisputeCustomerClaimTypeCustomer claim type (VERBAL, WRITTEN)
PaymentCardChargebackStatusChargeback status (SUBMITTED, RECEIVED, WON, LOST, etc.)
BankAccountTypeExternal bank account type (CHECKING, SAVINGS)
AchTransferPurposeACH transfer purpose (DEPOSIT, WITHDRAWAL, PAYROLL, etc.)

Error Handling

The SDK throws typed exceptions when the API returns error union members:

import {
  HighnoteUserError,
  HighnoteAccessDeniedError,
} from "@highnoteplatform/highnote-nodejs-sdk";

try {
  await client.cardProducts.get("invalid_id");
} catch (err) {
  if (err instanceof HighnoteUserError) {
    // fieldErrors: Array<{ code?: string, description?: string }>
    console.error("Validation errors:", err.fieldErrors);
  } else if (err instanceof HighnoteAccessDeniedError) {
    console.error("Permission denied:", err.message);
  }
}

Pagination

All .list() methods return async iterables with lazy page fetching:

// Iterate all items (fetches pages on demand)
for await (const product of client.cardProducts.list()) {
  console.log(product.name);
}

// Custom page size
for await (const product of client.cardProducts.list({ pageSize: 10 })) {
  // ...
}

// Break early — no extra pages fetched
for await (const product of client.cardProducts.list()) {
  if (product.name === "Target") break;
}

Development

npm install                # Install dependencies
cp .env.template .env      # Fill in HIGHNOTE_API_KEY
npm run codegen            # Generate types from Highnote schema
npm run typecheck          # Type-check without emitting
npm run build              # Build CJS + ESM + .d.ts via tsup
npm run test:unit          # Run unit tests (no network needed)
npm run test:integration   # Run integration tests (requires API key in .env)
npm run lint               # Lint with eslint
npm run format             # Format with prettier

CI/CD

  • Pull requests and pushes to main — GitHub Actions runs unit tests (Node 18/20/22), typecheck, and build.
  • Publishing — a v* tag triggers the publish workflow (dormant until NPM_TOKEN secret is configured).

Contributing

See CONTRIBUTING.md for setup, development workflow, and how to add new resources.

Architecture

See .claude/PLAN.md for the full architecture spec, technical decisions, and implementation roadmap.

License

MIT

FAQs

Package last updated on 01 Apr 2026

Related posts