Skip to content

StarkTechBank is an all in one online banking suite designed for every type of customer. Instant Account Number generation, Free Email / SMS alert forever. No document needed for onboarding. StarkTechBank API.

License

Notifications You must be signed in to change notification settings

oyedotunsodiq045/StarkTechBank

Repository files navigation

StarkTechBank

Indices


Authentication

Routes for user authentication including register, login, reset password, etc

1. Forgot Password

Generate password token and send email

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/auth/forgotpassword

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "email": "[email protected]"
}

2. Get Logged in User via Token

Endpoint:

Method: GET
Type: RAW
URL: {{URL}}/api/v1/auth/me

3. Login User

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/auth/login

Headers:

Key Value Description
Content-Type application/json JSON Type

Body:

{
    "username": "oyedotunsodiq045",
    "password": "123456"
}

4. Logout User

Clear user token

Endpoint:

Method: GET
Type: RAW
URL: {{URL}}/api/v1/auth/logout

Headers:

Key Value Description
Content-Type application/json

5. Register User

Register a User, Auto creates Savings and Primary Account

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/auth/register

Headers:

Key Value Description
Content-Type application/json JSON Type

Body:

{
    "username": "sweetman",
    "firstname": "Major",
    "lastname": "Stark",
    "email": "[email protected]",
    "phone": "07058924457",
    "password": "123456"
}

6. Reset Password

Reset user password using token

Endpoint:

Method: PUT
Type: RAW
URL: {{URL}}/api/v1/auth/resetpassword/52f0e1e7291ff23cf390dd8a96cd3ecb0d5e60e9

Headers:

Key Value Description
Content-Type application/json JSON Type

Body:

{
    "password": "1234567"
}

7. Update Password

Endpoint:

Method: PUT
Type: RAW
URL: {{URL}}/api/v1/auth/updatepassword

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "currentPassword": "1234567",
    "newPassword": "123456"
}

8. Update User Details

Endpoint:

Method: PUT
Type: RAW
URL: {{URL}}/api/v1/auth/updatedetails

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "username": "abbey",
    "firstname": "Abiodun Omogbolahan",
    "lastname": "Oyedotun",
    "email": "[email protected]",
    "phone": "07058924457"
}

Recipient

Recipient CRUD functionality. Recipient are StarkTechBank account holders who you regularly transfer money to. Users can add, read and remove, while only Admin manage recipient (update)

1. Create Recipient

Recipient must be an account holder

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/recipients

Headers:

Key Value Description
Content-Type application/json JSON Type

Body:

{
    "username": "ifeoye",
    "accountNumber": "11223147",
    "type": "Primary",
    "description": "Fiancee"
}

2. Delete a Recipient

Delete a recipient.

Endpoint:

Method: DELETE
Type: 
URL: {{URL}}/api/v1/recipients/5f8246f1fcb2c42d0a279619

Headers:

Key Value Description
Content-Type application/json

3. Get a Recipient

Get a recipient from the database

Endpoint:

Method: GET
Type: 
URL: {{URL}}/api/v1/recipients/5f824698fcb2c42d0a279616

4. Get all Recipients

Get all recipients data. Admin only

Endpoint:

Method: GET
Type: 
URL: {{URL}}/api/v1/recipients

5. Update a Recipient

Update recipient data. Admin only

Endpoint:

Method: PUT
Type: RAW
URL: {{URL}}/api/v1/recipients/5f824698fcb2c42d0a279616

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "description": "only you"
}

Transactions

Users can make deposit, withdrawal, transfers in and out of their primary and savings account. Primary and Savings Transactions table are updated respectively for record keeping and statement request.

1. Deposit v3

Deposit into Primary or Savings Account

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/transactions/deposit

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "type": "Savings",
    "amount": 600
}

2. Withdraw v3

Withdraw from Primary or Savings Account

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/transactions/withdrawal

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "type": "Primary",
    "amount": 230
}

Transfers

Transfers between your account, (Primary to Savings) and vice versa, and to someone else.

1. Transfers Between Account - Primary to Savings

Make transaction between primary and savings accounts. Deduct from primary, auto add to savings

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/transfers

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "type": "Primary",
    "amount": 100
}

2. Transfers Between Account - Savings to Primary

Make transaction between savings and primary accounts. Deduct from savings, auto add to primary

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/transfers

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "type": "Savings",
    "amount": 390
}

3. Transfers To Someone Else

Transfer to another StarkTechBank account holder

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/transfers/out

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "accountNumber": 11223147,
    "type": "Primary",
    "transferFrom": "Primary",
    "amount": 999
}

Users

Users CRUD functionality. Admin only

1. Create User

Add user to database (admin)

Endpoint:

Method: POST
Type: RAW
URL: {{URL}}/api/v1/users

Headers:

Key Value Description
Content-Type application/json JSON Type

Body:

{
    "username": "test",
    "firstname": "Test",
    "lastname": "Microphone",
    "email": "[email protected]",
    "phone": "08123456789",
    "password": "123456"
}

2. Delete a User

Delete a user from database (admin)

Endpoint:

Method: DELETE
Type: 
URL: {{URL}}/api/v1/users/5f7e592e078929412a34a955

Headers:

Key Value Description
Content-Type application/json

3. Get a User

Get a user by id (admin)

Endpoint:

Method: GET
Type: 
URL: {{URL}}/api/v1/users/5f7df53b25f6723e4802cf2f

4. Get all Users

Get all users (admin)

Endpoint:

Method: GET
Type: 
URL: {{URL}}/api/v1/users

5. Update a User

Update a user by id (admin)

Endpoint:

Method: PUT
Type: RAW
URL: {{URL}}/api/v1/users/5f7df53b25f6723e4802cf2f

Headers:

Key Value Description
Content-Type application/json

Body:

{
    "email": "[email protected]"
}

Back to top

Made with ♥ by thedevsaddam | Generated at: 2020-10-28 20:47:49 by docgen

About

StarkTechBank is an all in one online banking suite designed for every type of customer. Instant Account Number generation, Free Email / SMS alert forever. No document needed for onboarding. StarkTechBank API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published