This is RESTful API service that provides some abilities of making payments between accounts.
Run make run and compose will start the app with all dependencies(postgresql):
POST /api/v1/paymentsapplies the new payment to accounts. Note: if there is no "from" account in the system, it is considered that it has a balance of 1000.
curl --request POST \
--url http://127.0.0.1:80/api/v1/payments \
--header 'Content-Type: application/json' \
--data '{
"Amount": "1000",
"From": 1,
"To": 2
}'GET /api/v1/accounts/{id}returns an account by the given id.
curl --request GET \
--url http://127.0.0.1:80/api/v1/accounts/1GET /api/v1/payments/{accountId}returns all payments by the account id.
curl --request GET \
--url http://127.0.0.1:80/api/v1/payments/1