Next.js example app for accepting Bitcoin and Lightning payments with Nijipe.
This project demonstrates how to integrate Nijipe into a Next.js (App Router) application. It covers:
- Creating invoices via API route
- Redirecting to Nijipe Hosted Checkout
- Handling success and cancel callbacks
- Securely verifying incoming webhooks
- Clone this repository
- Install dependencies:
npm install
- Copy
.env.exampleto.env.localand add your API keys:cp .env.example .env.local
- Start the development server:
npm run dev
To test webhooks locally, use the Nijipe CLI:
nijipe listen --forward-to localhost:3000/api/nijipe/webhookMIT