Skip to content

FurlPay/furlpay-node

Repository files navigation

Furlpay Node.js SDK

npm CI license

The official TypeScript/Node.js SDK for the Furlpay API — stablecoin payments, virtual cards, cross-chain swaps, and fractional investing.

Zero runtime dependencies. Node 18+.

Install

npm install @furlpay/furlpay-node

Quickstart

import { Furlpay } from "@furlpay/furlpay-node";

const furlpay = new Furlpay({ apiKey: process.env.FURLPAY_API_KEY! });

const wallet = await furlpay.wallets.retrieve();
const card = await furlpay.cards.issue({ kind: "virtual", settlementCurrency: "USD" });
const quote = await furlpay.swaps.quote({
  fromToken: "USDT",
  toToken: "USDC",
  fromChain: "arbitrum",
  amountIn: 500,
});

Webhook verification

Mirrors Stripe's webhooks.constructEvent — HMAC-SHA256, timestamped, replay-protected:

const event = Furlpay.webhooks.constructEvent(
  req.body, // raw string body
  req.headers["furlpay-signature"], // t=...,v1=...
  process.env.FURLPAY_ENDPOINT_SECRET!
);

if (event.type === "card.transaction.authorized") {
  // handle it
}

Signatures are verified with crypto.timingSafeEqual and a ±300s timestamp tolerance to block replays.

Sandbox

Every Furlpay environment runs in mock/sandbox mode by default — point baseUrl at your local app and use a sk_sandbox_... key:

new Furlpay({ apiKey: "sk_sandbox_demo", baseUrl: "http://localhost:3000" });

Related

License

MIT

About

Official Node.js/TypeScript SDK for the Furlpay API — stablecoin payments, cards, swaps, investing. Zero dependencies.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors