There is 3 entity in this case;
- userAccount
- Transactions
- Balances history
- Firstly create an account to http://localhost:3000/api/user
example payload: {
"email": "[email protected]",
"password": "yourpassword"
}
- Login with your account to http://localhost:3000/api/user/login
example payload: {
"email": "[email protected]",
"password": "yourpassword"
}
- you can create transactions to http://localhost:3000/api/transaction
example CR payload: {
"type": "DB",
"amount": 40000,
"to": "5d0bd05d1ea65e2a454753f3"
}
example DB payload: {
"type": "DB",
"amount": 10000,
"to": "5d0bd05d1ea65e2a454753f3"
}
example TRANSFER payload: {
"type": "TRANSFER",
"amount": 50000,
"from": "5d0a43ae5140c3185e9ba01a",
"to": "5d0bd05d1ea65e2a454753f3"
}
NOTE: to create a transaction you must be logged in