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
Contact us to get an activation code of an access client token.
Login to your account:
go to your profile (user icon) > Passwords;
setup a secondary password for API (note: it expires after 1 day).
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'
- 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>'
- 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:
Login to your account;
go to your profile (user icon) > Passwords;
click Disable or Enable next to a secondary password for API.
Usage
Headers
These headers must be used in all requests:
Authorization: Bearer <token>
- an access client token, which was obtained when an access client was activated.Channel: apiChannel
- a channel for a public API usage.
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):
datePeriod
- a start date- example:
2021-01-31T00:00:00.000Z
- example:
datePeriod
- an end date- example:
2021-12-31T23:59:59.999Z
- example:
direction
- a direction- available values:
credit|debit
- available values:
orderBy
- order by- available values:
amountAsc|amountDesc|dateAsc|dateDesc
- available values:
page
- a zero-based page number- default:
0
- default:
pageSize
- a maximum number of transactions that will be returned- default:
40
- default:
transactionNumber
- a transaction number- example:
SNP000000000000000EUR
- example:
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"
}
}
]
Transactions search
Parameters (URL query; all optional):
authorizationStatuses
- an authorization status- available multiple values:
authorized|canceled|denied|expired|pending
- example:
authorizationStatuses=canceled&authorizationStatuses=denied&...
- available multiple values:
datePeriod
- a start date- example:
2021-01-31T00:00:00.000Z
- example:
datePeriod
- an end date- example:
2021-12-31T23:59:59.999Z
- example:
orderBy
- order by- available values:
amountAsc|amountDesc|dateAsc|dateDesc
- available values:
page
- a zero-based page number- default:
0
- default:
pageSize
- a maximum number of transactions that will be returned- default:
40
- default:
transactionNumber
- a transaction number- example:
SNP000000000000000EUR
- example:
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):
transaction_number
- a transaction number- example:
SNP000000000000000EUR
- example:
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):
subject
- a payment to a system account- available value:
system
- available value:
type
- a payment type- available value:
clientsAccountEur.sepaWithdrawal
- available value:
amount
- a payment amount- example:
1337.01
- example:
customValues.payeeName
- a payment receiver's full name- examples:
John Doe
,Some company Ltd
- examples:
customValues.payeeIban
- a payment receiver's IBAN- example:
LT000000000000000000
- example:
customValues.paymentPurpose
- a payment description- example:
Thanks for coffee!
- example:
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"
}