Skip to content

Yorzoda/Test-wallet-API-

Repository files navigation

Test wallet API for alif

Before instalation

You need install docker and go

Installation

  • Run docker-compose up -d
  • Go to folder commands and run backup.sh to import DB data
  • Now you call APIs

API

All requests sent by POST - method. All requests except /login should have header X-UserId and X-Digest X-UserId - Id of user X-Digest - hash of body request with sha1 encondig

  • /login - login and auth user. Format:

Request:

{
 	"login": "username",      
    "password":"password",      
}

Response:

{
 	"messsage": "success" ,// string
} 
  • v1/checkwallet - check wallet for exist.

Request:

{
  "login": "wallet login", 
}

Response:

{
  "message": " wallet  SomeWallet exists" // string 
}
  • v1/charge - Charging wallet from one to another

Request:

{
    "src": "Source wallet login",
    "dest": "Destination wallet login",
    "sum": "some in float format"
}

Response:

{
    "message": {
    "Payment proccesed","transactionID": tranID // string
    } 
}
  • v1/gethistory - Total count and sum operations of wallet in current month

Request:

{
    "login": "wallet"
}

Response:

{
  "data": {
      "Count": "some count", // int
      "Sum": "some sum" // float
  }
}
  • v1/getbalance - Total balance of considering wallet

Request:

{
    "login": "wallet"
}

Response:

{
"message":{
    "WalletLogin":"SomeWallet", // string
    "balance":"wallet sum" // float
 }
}

About

Test wallet API for financial organizations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages