Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 2.2 KB

README.md

File metadata and controls

36 lines (24 loc) · 2.2 KB

btcpayserver-nextjs

Usage

Install Node.js and pnpm.

Use clovyr.app's free plan (7-day free trial) for testing BTCPayServer. Or maybe don't as Clovyr doesn't update BTCPayServer often. Use Voltage Cloud only even for testing because I had a webhook error as Clovyr was using old BTCPayServer version. Or use kyun host to deploy your own BTCPayServer on a Linux VPS for $15/month.

After testing, you can use Lunanode or Voltage Cloud's hosted BTCPayServer Plan for $8/month or buy a VPS from Kyun Host ($16/month) to self-host it yourself using btcpayserver-docker.

Use Sparrow Wallet to test Bitcoin Payments using testnet with bitcoin testnet faucet.

.env.development

NODE_ENV=development
NEXT_PUBLIC_BASE_URL=http://localhost:3000

# BTCPayServer Testnet Keys
# Go to `Account > Manage Account > API Keys under Account Settings > Generate API Key > Give Permissions btcpay.store.canviewinvoices & btcpay.store.cancreateinvoice`
BTCPAY_API_KEY=xxxx
# Root URL in Web Browser suffixed with `/api/v1`
BTCPAY_URL=<https-base-url-of-hosted-btcpayserver>/api/v1
# Create Store (or select already existing Store) & go to `Settings` to find `Store ID` under `Store Settings > General`
BTCPAY_STORE_ID=xxxx
# Under `Settings > Store Settings > Webhooks` => Payload URL = http://localhost:3000/api/btcpayserver/webhook (replace http://localhost:3000 with ngrok url as localhost (specifically, http) won't work with webhooks) & Events > Send Me Everything
BTCPAY_WEBHOOK_SECRET=xxxx

NEXT_PUBLIC_EBOOK_PRICE=107

NEXT_TELEMETRY_DISABLED=1

Run pnpm dev (or pnpm turbo) in one terminal and pnpm ngrok:listen in another terminal. ngrok is needed for webhooks as webhooks don't work on http, they need https.

Make sure to set up ngrok with static domain.