Furlpay Docs
Open App

Getting Started

Quickstart

Go from an empty folder to a live, webhook-driven integration in under five minutes.

1. Install the CLI

The @furlpay/cli scaffolds projects, tails logs and forwards webhooks. Run it withnpx or install it globally.

bash
npm i -g @furlpay/cli

furlpay login          # opens a browser to authorize the CLI
furlpay init my-app    # scaffold a Next.js + @furlpay/node project

2. Make your first call

typescript
import { Furlpay } from '@furlpay/node';

const client = new Furlpay(process.env.FURLPAY_SECRET_KEY!);

const order = await client.investing.order({
  symbol: 'AAPL',
  side: 'buy',
  notional: 25_00, // $25.00 in minor units — fractional via Alpaca
});

3. Forward webhooks with furlpay listen

During development, forward live events to your local server. The CLI prints a signing secret so you can verify payloads.

bash
furlpay listen --forward-to localhost:3000/api/webhooks/furlpay

# ⚡ ready — forwarding events
# whsec_… (use this to verify signatures)

4. Drop in the checkout widget

Add stablecoin checkout to any React app with the FurlpayCheckoutButton Element from@furlpay/react.

tsx
import { FurlpayCheckoutButton } from '@furlpay/react';

<FurlpayCheckoutButton
  amount={49_99}
  currency="USDC"
  onSuccess={(tx) => console.log('settled', tx.id)}
/>;

Verify every webhook

Always check the Furlpay-Signature header before trusting an event. See API Routes → Webhooks for the HMAC verification snippet.