Skip to content

Node.js SDK

The Node.js SDK is intended for backend services, workers, payout processors, webhook tooling, and other server-side integrations.

Package

FieldValue
Package@f-wallet/node
Version0.1.0
Repositoryf-wallet/fwallet-js
Terminal window
npm install @f-wallet/node

Client setup

import { ApiKeyAuth, TransfersApi } from "@f-wallet/node";
const transfers = new TransfersApi("https://api.fwallet.co.ug");
transfers.setDefaultAuthentication(new ApiKeyAuth("header", "X-API-Key", "fwk_live_..."));
await transfers.transfersPostTransfers({
idempotencyKey: "transfer_001",
transfersPostTransfersRequest: {
fromWalletId: "wallet-a",
toWalletId: "wallet-b",
amount: 100000,
currencyCode: "UGX",
},
});

Resource clients

ResourceClass
AdminAdminApi
AuthAuthApi
DepositsDepositsApi
DeveloperDeveloperApi
HealthHealthApi
JournalJournalApi
PayoutsPayoutsApi
SystemSystemApi
TeamTeamApi
TenantsTenantsApi
TransfersTransfersApi
WalletsWalletsApi

Operation methods

The Node.js SDK uses the same generated operation names as the TypeScript SDK. See the TypeScript operation reference.

Signing

@f-wallet/node exports request signing helpers for HMAC signed server-to-server requests. Use this package for backend services such as Striker Market that keep FWALLET_STRIKER_KEY_ID and FWALLET_STRIKER_SIGNING_SECRET on the server and never expose signing secrets to the browser.