The NamiPay API Middleware is a local Spring Boot application (wrapped as a Windows .exe) that exposes REST endpoints on port 9099.
- Java Runtime Environment (JRE 8+)
- Windows 10 or later
- Nami terminal connected via LAN or Serial
- Port 9099 available
# application.properties
server.port=9099
spring.application.name=nami-ecr-middleware
| Method | Endpoint | Description |
|---|
| POST | /performTransactionTCPIP | Execute any transaction via TCP/IP |
| POST | /tcp-ip/connect | Connect to terminal |
| POST | /tcp-ip/disconnect | Disconnect from terminal |
| GET | /getExistingConnections | List active connections |
| Method | Endpoint | Description |
|---|
| POST | /performTransactionCOM | Execute any transaction via COM port |
| POST | /com/connect | Connect via serial port |
| GET | /get-com-ports | List available COM ports |
{
"paymentRequest": {
"date": "130623193000",
"ecrReferenceNo": "12345678000002",
"amount": "002",
"txnType": "0"
},
"tcpipcomData": {
"ip": "192.168.0.102",
"port": "8888"
}
}
HTTP POST → Middleware → TCP/IP or COM → Terminal → Response → HTTP 200
| Code | Transaction Type |
|---|
| 0 | Purchase |
| 1 | Purchase with Naqd/Cashback |
| 2 | Refund |
| 3 | Authorization |
| 4 | Purchase Advice (Full) |
| 5 | Purchase Advice (Partial) |
| 6 | Auth Extension |
| 7 | Auth Void |
| 9 | Cash Advance |
| 10 | Reconciliation |
| 11 | Reversal |
| 15 | Bill Payment |
| 17 | Register |
| 18 | Start Session |
| 19 | End Session |
| 23 | Duplicate / Previous Txn |
| 24 | Check Status |
| 25 | Health Check |