Skip to content

A Spring API for Financial account management built without a main stream DB

Notifications You must be signed in to change notification settings

bytemerger/digiFinance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

digicore

Indices


Ungrouped

1. Create Account

create a new account

Endpoint:

Method: POST
Type: RAW
URL: localhost:8080/api/v1/create_account

Body:

{
    "initialDeposit":800,
    "accountName":"Adamu Cheta",
    "accountPassword":"test1234"
}

More example Requests/Responses:

I. Example Request: Create Account Successfully

Body:

{
    "initialDeposit":800,
    "accountName":"Adamu Cheta",
    "accountPassword":"test1234"
}
I. Example Response: Create Account Successfully
{
    "responseCode": 200,
    "success": true,
    "message": "successfully created",
    "data": {
        "accountNumber": "0150254002"
    }
}

Status Code: 200


2. Deposit Cash

This route deposits cash

Endpoint:

Method: POST
Type: RAW
URL: localhost:8080/api/v1/deposit

Body:

{
    "accountNumber":"6513138112",
    "amount":100.00
}

3. Get Account

Get a particular account

Endpoint:

Method: GET
Type: RAW
URL: localhost:8080/api/v1/account_info/:accountNumber

URL variables:

Key Value Description
accountNumber 28387876445

Body:

{}

4. Get Statement

Get the statement of an account This is the list of all the transactions by the account

Endpoint:

Method: GET
Type: RAW
URL: localhost:8080/api/v1/account_statement/:accountNumber

URL variables:

Key Value Description
accountNumber 6513138112

Body:

{}

More example Requests/Responses:

I. Example Request: UnAuthoried Request

Query:

Key Value Description
accountNumber 6513138112

Body:

{}
I. Example Response: UnAuthoried Request
{
    "responseCode": 401,
    "success": false,
    "message": "401 UNAUTHORIZED \"JWT strings must contain exactly 2 period characters. Found: 0 Invalid JWT token, try logging in\""
}

Status Code: 401


5. Login

Login in to access protected routes

Endpoint:

Method: POST
Type: RAW
URL: localhost:8080/api/v1/login

Body:

{
    "accountNumber":"0150254002",
    "accountPassword":"test1234"
}

More example Requests/Responses:

I. Example Request: Login Successful

Body:

{
    "accountNumber":"0150254002",
    "accountPassword":"test1234"
}
I. Example Response: Login Successful
{
    "success": true,
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTUwMjU0MDAyIiwiYXV0aCI6eyJhY2NvdW50TmFtZSI6IkFkYW11IENoZXRhIiwiZW5hYmxlZCI6InRydWUifSwiZXhwIjoxNjQ2MTIyMjI3fQ.neYY2tKyYtFWnU-kd1qZoaTKk8gStF2fKIOmbb0POFM"
}

Status Code: 200


6. Withdraw Cash

This route Withdraws cash

Endpoint:

Method: POST
Type: RAW
URL: localhost:8080/api/v1/withdrawal

Body:

{
    "accountNumber":"6513138112",
    "amount":100.00,
    "accountPassword":"test1234"
}

Back to top

About

A Spring API for Financial account management built without a main stream DB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages