Money Service preview 1 Money Service preview 2 Money Service preview 3

MONEY service — service, that returns amount of money to the client, which are localized and displayed

Setup

In /metadata endpoint put this json field (omit the braces) into your response body:

{ "service_type": "MONEY" }

Look tutorial for reference

Response

In /process endpoint there is a predefined schema for a response, which has to look like this:

{
    "hint": String,
    "amount": Long,
    "currency_code": String
}
  • hint — string, that briefly describes the result
  • amount — numeric value, that is a result of your calculations in minimal fraction units of the currency (cents for EUR and so on)
  • currency_code — a 3-letter uppercase string identifier of the currency. Read more

No supported currency

There are some corner cases, where you service either does not support the currency or does not know what currency to return. Universal “test” (so to say) currency is defined as XXX. For example, user wants to calculate total balance, but there are no transactions to get currency code:

{
    "hint": "No transactions",
    "amount": 0,
    "currency_code": "XXX"
}

Example

Responses from the examples above would look like this:

{
    "hint": "Average income per month",
    "amount": 426900,
    "currency_code": "EUR"
}
{
    "hint": "Average income per month",
    "amount": 42690,
    "currency_code": "EUR"
}
{
    "hint": "Average income per month",
    "amount": 4269,
    "currency_code": "EUR"
}

Other services

  • Text - display short text