A simple Express.js backend API for generating QRIS payments and retrieving transaction data from the Saweria platform, designed to support automated payment systems.
- Generate QRIS payment
- Check transaction status
- Get balance & available balance
- List transactions
- Stateless (no database)
- Node.js
- Express.js
- Axios
- Winston
- dotenv
src/
├── routes
├── controllers
├── services
├── middlewares
├── utils
Create .env from .env.example:
PORT=3000
SAWERIA_BEARER=your_bearer_token
SAWERIA_USER_ID=your_saweria_user_idnpm install
node app.js || nodemon app.jsServer:
http://localhost:3000
POST /api/payments/qris
{
"amount": 1000,
"message": "Testing payment",
"customer": {
"name": "Noname",
"email": "[email protected]",
"phone": "628xxxxxxxxxx"
}
}
GET /api/payments/transactions/:id
GET /api/payments/balance
GET /api/payments/available-balance
GET /api/payments/transactions
- Backend only
- No database & No Webhook
- Polling-based transaction check
- Bearer token is provided manually for learning purposes
This project is for learning and portfolio purposes only. Not an official Saweria integration.