@fossapay/node package is the server-side SDK for FossaPay APIs. It requires Node.js 18 or newer.
Install and initialize
Recommended integration order
1
Verify the business
Confirm which business and environment are connected to the API key.
2
Create the customer
Create the individual who will own the wallet.
3
Create the wallet
Provision a dedicated NGN collection account or a supported stablecoin wallet.
4
Track transactions and webhooks
Store FossaPay IDs and your references, then reconcile state from signed webhooks and retrieval methods.
Customers
Wallets and collections
Transactions
Bank resolution and payouts
Resolve the account before creating a payout. Nigerian account numbers must contain exactly 10 digits.Verify webhooks
Usex-fossapay-signature-v2 and pass the exact raw request body to the SDK.
event.eventId and ignore an event already processed.
Idempotency and retries
Customer creation, wallet creation, payouts, and wallet transfers accept an optionalidempotencyKey and timeoutMs. The SDK generates a key when omitted, but you should provide a stable key whenever your system may recreate the request in another process.
GET requests and idempotent writes are retried for connection failures and retryable HTTP responses. Set maxRetries and timeoutMs when initializing the client to change the defaults.

