Skip to content

Backend API for generating QRIS payments and retrieving transaction data from the Saweria platform.

Notifications You must be signed in to change notification settings

rznive/SaweriaAPI-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEYM Saweria API Wrapper

A simple Express.js backend API for generating QRIS payments and retrieving transaction data from the Saweria platform, designed to support automated payment systems.


Features

  • Generate QRIS payment
  • Check transaction status
  • Get balance & available balance
  • List transactions
  • Stateless (no database)

Tech Stack

  • Node.js
  • Express.js
  • Axios
  • Winston
  • dotenv

Project Structure

src/
├── routes
├── controllers
├── services
├── middlewares
├── utils

Environment Variables

Create .env from .env.example:

PORT=3000
SAWERIA_BEARER=your_bearer_token
SAWERIA_USER_ID=your_saweria_user_id

Run Project

npm install
node app.js || nodemon app.js

Server:

http://localhost:3000

API Endpoints

Generate QRIS

POST /api/payments/qris
{
  "amount": 1000,
  "message": "Testing payment",
  "customer": {
    "name": "Noname",
    "email": "[email protected]",
    "phone": "628xxxxxxxxxx"
  }
}

Check Transaction Status

GET /api/payments/transactions/:id

Get Balance

GET /api/payments/balance

Get Available Balance

GET /api/payments/available-balance

List Transactions

GET /api/payments/transactions

Notes

  • Backend only
  • No database & No Webhook
  • Polling-based transaction check
  • Bearer token is provided manually for learning purposes

Disclaimer

This project is for learning and portfolio purposes only. Not an official Saweria integration.


About

Backend API for generating QRIS payments and retrieving transaction data from the Saweria platform.

Topics

Resources

Stars

Watchers

Forks