Here template REST application using Java Spring Boot + JWT+Postgre
- clone this source
- create database
- build and run
body
{
"email": "[email protected]",
"password": "1234567"
}
response
{
"success": true,
"errorCode": null,
"message": "User registered successfully. Please login",
"payloads": null
}
body
{
"email": "[email protected]",
"password": "1234567"
}
response
{
"success": true,
"errorCode": null,
"message": "token generated",
"payloads": {
"accessToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNTQwOTA3Nzk5LCJleHAiOjE1NDE1MTI1OTl9.pxu2epiXnXWKgzbA10RBpQpn6IF_57mzIVLZrsItOc6jmv8sTT2hzgynpvIsXqyCj054oj33PV84WEXPOXWM4Q",
"tokenType": "Bearer",
"lastLogin": null
}
}
header Authorization : Bearer [token]
body
{
"amount": 100,
"remark": "terminal_id|merchant_id|etc"
}
response
{
"success": true,
"errorCode": null,
"message": "deposit success",
"payloads": null
}
header Authorization : Bearer [token]
body
{
"amount": 10,
"otp": "123456",
"remark": "terminal_id|merchant_id|etc"
}
response
{
"success": true,
"errorCode": null,
"message": "withdrawal success",
"payloads": null
}
header Authorization : Bearer [token]
response
{
"success": true,
"errorCode": null,
"message": "",
"payloads": {
"currency": "USD",
"balance": 190,
"transactions": [
{
"id": 10,
"side": "CREDIT",
"type": "DEPOSIT",
"amount": 100,
"trxDate": "2018-10-30T13:56:28.654+0000",
"remark": "initiate"
},
{
"id": 11,
"side": "CREDIT",
"type": "DEPOSIT",
"amount": 100,
"trxDate": "2018-10-30T13:57:00.814+0000",
"remark": "terminal_id|merchant_id|etc"
},
{
"id": 12,
"side": "DEBET",
"type": "WITHDRAWAL",
"amount": 10,
"trxDate": "2018-10-30T13:57:14.763+0000",
"remark": "terminal_id|merchant_id|etc"
}
]
}
}