NOTE: This is not yet released
This is a demonstration Spring Boot app to show how BitPay can be used in the
context of a retail kiosk. It utilizes the the pos
facade and with a simple
configuration file you can customize the posData
fields that are sent to
BitPay. This app uses Liquibase to manage the database schema and by default
uses an embedded H2 database to make it easy to start.
Note
If you'd like to utilize Instant Payment Notifications (IPN), you will need to either run the application somewhere publicly available, or use a tool such as ngrok to allow public traffic to tunnel to your local machine.
Prerequisites
- Node.js >= 18
- BitPay Account
Download
You can download or clone the project from GitHub.
Setup
Generate Test Token
- Log into https://test.bitpay.com/dashboard
- Go to
Payment Tools
- Click on
API Tokens
- Click the
Add New Token
button - Enter a label (this is just for your reference)
- Click the
Add Token
button - Copy the value of the
Token
field from theInformation
section
Update Configuration
- Copy the token generated above
- Copy
.env.example
to.env
and update the values - Copy
application-example.yaml
toapplication.yaml
and update as necessary - Update the other values in the configuration - see the project README
Run the Application
Run the following command
npm install
npm run migrate
npm run dev
View the Application
You should now be able to visit a browser at http://localhost:3000
or the port that you configured.