Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "amount": "1.000"
}
Reponse

In case of success:

...

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.000",
  "allowed": true,
  "remainingAmount": "9.0.00"
}


In case if fee/fine was not found:

Status code: 422
Response body:

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.00",
  "allowed": false,
  "errorMessage": "Fee/fine was not found"
}


In case if fee/fine is already closed:

Status code: 422
Response body:

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.00",
  "allowed": false,
  "errorMessage": "Fee/fine is already closed"
}


In case if amount is zero or negative:

Status code: 422
Response body:

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.00",
  "allowed": false,
  "errorMessage": "Amount must be positive"
}


In case if the amount is too high:

...

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.000",
  "allowed": false,
  "errorMessage": "PaymentRequested amount exceeds the selectedremaining amount"
}


In case of invalid amount value (e.g. negative or not parsable):

...

POST /accounts/{accountId}/refund

Pay

Body:

Code Block
{
    "amount": "1.0"
}00",
  "comments": "STAFF : comment for staff \n PATRON : comment for patron",
  "transactionInfo": "check #3456",
  "notifyPatron": true,
  "servicePointId": "7c5abc9f-f3d7-4856-b8d7-6712462ca007",
  "userName": "Folio, James",
  "paymentMethod": "Cash"
}

(info) Fields comments and transactionInfo are optional


BE should take care of updating Account object and creating new FeeFineAction object.

...

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.000"
  "feeFineActionId": "8fe3026e-8eb0-49b3-8613-f889b8d0fe20"
}

...

Code Block
{
  "accountId": "e74d50c9-0c69-4f80-9e1b-a819719fc0c9"
  "amount": "1.000"
  "errorMessage": "Payment amount exceeds the selected amount"
}

...