Mistertango API

Base API URL: https://bank.mistertango.com/api/v1

Note: this documentation contains placeholders (e.g. <replace_me>) - replace them in order to make proper API requests.

Preparation

Get an access client token

  1. Contact us to get an activation code of an access client token.

  2. Login to your account:

    1. go to your profile (user icon) > Passwords;

    2. setup a secondary password for API (note: it expires after 1 day).

  3. Make the following request to get a session token:

curl -X POST https://bank.mistertango.com/api/v1/auth/session \
  -H 'Authorization: Basic <base64_encode(username:password)>' \
  -H 'Channel: apiChannelTokenManagement' \
  -d 'fields=sessionToken'
  1. Confirm a session with a session token and a secondary password for API:
curl -X POST https://bank.mistertango.com/api/v1/auth/session/secondary-password \
  -H 'Session-Token: <session_token>' \
  -H 'Channel: apiChannelTokenManagement' \
  -H 'Content-Type: text/plain' \
  -d '<secondary_password_for_api>'
  1. Use an activation code to activate and get an access client token:
curl -X POST https://bank.mistertango.com/api/v1/clients/activate \
  -H 'Session-Token: <session_token>' \
  -H 'Channel: apiChannelTokenManagement' \
  -d 'code=<activation_code>'

Security

Revoke an access client token

If you think that your access client token is compromised, you can revoke it:

curl -X POST https://bank.mistertango.com/api/v1/clients/<token>/unassign \
  -H 'Session-Token: <session_token>' \
  -H 'Channel: apiChannelTokenManagement'

Disable a secondary password for API

Though a secondary password for API expires after 1 day, we strongly recommend to disable or enable it manually on demand:

  1. Login to your account;

  2. go to your profile (user icon) > Passwords;

  3. click Disable or Enable next to a secondary password for API.

Usage

Headers

These headers must be used in all requests:

API

Account information (IBAN, balance, currency, etc.)

Request example:

curl -X GET 'https://bank.mistertango.com/api/v1/self/accounts?fields=number&fields=currency.name&fields=currency.internalName&fields=currency.symbol&fields=currency.decimalDigits&fields=status.balance&fields=status.creditLimit&fields=status.reservedAmount&fields=status.availableBalance' \
  -H 'Authorization: Bearer <token>' \
  -H 'Channel: apiChannel'

Response example:

[
  {
    "number": "LT000000000000000000",
    "currency": {
      "name": "EUR",
      "internalName": "eur",
      "symbol": "€",
      "decimalDigits": 2
    },
    "status": {
      "balance": "49.99",
      "creditLimit": "0.00",
      "reservedAmount": "0.09",
      "availableBalance": "49.90"
    }
  }
]

Transactions history

Parameters (URL query; all optional):

Request example:

curl -X GET 'https://bank.mistertango.com/api/v1/self/accounts/clientsAccountEur/history?fields=id&fields=transactionNumber&fields=date&fields=amount&fields=customValues.payerName&fields=customValues.payerIban&fields=customValues.payeeName&fields=customValues.payeeIban&fields=customValues.paymentPurpose' \
  -H 'Authorization: Bearer <token>' \
  -H 'Channel: apiChannel' \
  -G \
  -d 'datePeriod=<date_period_start>&datePeriod=<date_period_end>&direction=<direction>&orderBy=<order_by>&page=<page>&pageSize=<page_size>&transactionNumber=<transaction_number>'

Response example:

[
  {
    "id": "1000000",
    "transactionNumber": "SNP000000000000000EUR",
    "date": "2021-12-31T16:17:02.902Z",
    "amount": "20.00",
    "customValues": {
      "payerName": "John Doe",
      "payerIban": "LT000000000000000000",
      "payeeName": "Your company Ltd",
      "payeeIban": "LT000000000000000000",
      "paymentPurpose": "Payment reference 321"
    }
  },
  {
    "id": "1000000",
    "transactionNumber": "SNP000000000000000EUR",
    "date": "2021-12-31T15:16:01.901Z",
    "amount": "-1337.01",
    "customValues": {
      "payerName": "Your company Ltd",
      "payerIban": "LT000000000000000000",
      "payeeName": "John Doe",
      "payeeIban": "LT000000000000000000",
      "paymentPurpose": "Payment reference 123"
    }
  }
]

Parameters (URL query; all optional):

Request example:

curl -X GET 'https://bank.mistertango.com/api/v1/transactions?fields=id&fields=transactionNumber&fields=date&fields=amount&fields=authorizationStatus&fields=currency' \
  -H 'Authorization: Bearer <token>' \
  -H 'Channel: apiChannel' \
  -G \
  -d 'authorizationStatuses=<authorization_status_0>&authorizationStatuses=<authorization_status_1>&authorizationStatuses=<authorization_status_2>&datePeriod=<date_period_start>&datePeriod=<date_period_end>&orderBy=<order_by>&page=<page>&pageSize=<page_size>&transactionNumber=<transaction_number>'

Response example:

[
  {
    "id": "1000000",
    "transactionNumber": "SNP000000000000000EUR",
    "date": "2021-12-31T16:17:02.902Z",
    "amount": "20.00",
    "authorizationStatus": "pending",
    "currency": "eur"
  },
  {
    "id": "1000000",
    "transactionNumber": "SNP000000000000000EUR",
    "date": "2021-12-31T15:16:01.901Z",
    "amount": "1337.01",
    "authorizationStatus": "authorized",
    "currency": "eur"
  }
]

Transaction details

Parameters (URL path; all required):

Request example:

curl -X GET 'https://bank.mistertango.com/api/v1/transactions/<transaction_number>?fields=id&fields=transactionNumber&fields=date&fields=amount&fields=currency.name&fields=currency.internalName&fields=currency.symbol&fields=currency.decimalDigits&fields=authorizationStatus&fields=customValues.field.name&fields=customValues.field.internalName&fields=customValues.stringValue' \
  -H 'Authorization: Bearer <token>' \
  -H 'Channel: apiChannel'

Response example:

{
  "id": "1000000",
  "transactionNumber": "SNP000000000000000EUR",
  "date": "2021-12-31T17:18:05.405Z",
  "amount": "30.00",
  "currency": {
    "name": "EUR",
    "internalName": "eur",
    "symbol": "€",
    "decimalDigits": 2
  },
  "authorizationStatus": "authorized",
  "customValues": [
    {
      "stringValue": "John Doe",
      "field": {
        "name": "Payer name",
        "internalName": "payerName"
      }
    },
    {
      "stringValue": "LT000000000000000000",
      "field": {
        "name": "Payer IBAN",
        "internalName": "payerIban"
      }
    },
    {
      "stringValue": "Your company Ltd",
      "field": {
        "name": "Payee name",
        "internalName": "payeeName"
      }
    },
    {
      "stringValue": "LT000000000000000000",
      "field": {
        "name": "Payee IBAN",
        "internalName": "payeeIban"
      }
    },
    {
      "stringValue": "Payment reference 12345",
      "field": {
        "name": "Payment purpose",
        "internalName": "paymentPurpose"
      }
    }
  ]
}

Make payment

Parameters (JSON request body; all required):

Request example:

curl -X POST 'https://bank.mistertango.com/api/v1/self/payments?fields=id&fields=transactionNumber&fields=date&fields=amount&fields=currency.name&fields=currency.internalName&fields=currency.symbol&fields=currency.decimalDigits&fields=authorizationStatus' \
  -H 'Authorization: Bearer <token>' \
  -H 'Channel: apiChannel' \
  -H 'Content-Type: application/json' \
  -d '{
    "subject": "system",
    "type": "clientsAccountEur.sepaWithdrawal",
    "amount": "<amount>",
    "customValues": {
      "payeeName": "<payee_name>",
      "payeeIban": "<payee_iban>",
      "paymentPurpose": "<payment_purpose>"
    }
  }'

Response example:

{
  "id": "1000000",
  "transactionNumber": "SNP000000000000000EUR",
  "date": "2021-12-31T18:19:05.705Z",
  "amount": "1000.01",
  "currency": {
    "name": "EUR",
    "internalName": "eur",
    "symbol": "€",
    "decimalDigits": 2
  },
  "authorizationStatus": "pending"
}