Tatum
Search…
How to support fiat currencies
A fiat currency is a government-issued currency that isn't backed by a commodity such as gold.
In addition to crypto accounts, virtual accounts also support private virtual currencies. A virtual currency does not have to be connected to the blockchain. It can live within the virtual accounts alone. When you create your own virtual currency, you can then create accounts and send virtual account transactions.
A virtual currency is an entity in the virtual account distributed database. It is created with an initial supply of coins. This supply can be extended or reduced at any time.
Every virtual currency inside virtual accounts is pegged to a currency from the outside world. It can be a blockchain asset or FIAT currency. This means that one unit of the virtual currency is equal to one unit of the pegged currency.
When you create a virtual currency VC_USD with the base pair USD, 1 VC_USD = 1 USD, you can set your custom base rate, e.g., 1 VC_USD = 2 USD with the base rate 2.

Creating a virtual currency

To support FIAT currencies, you can create your own virtual currency with the base pair as the currency you want to support.
Request
Response
1
curl --location --request POST 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency' \
2
--header 'x-api-key: YOUR_API_KEY' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"name": "VC_USD",
6
"supply": "100000",
7
"basePair": "USD"
8
}'
Copied!
1
{
2
"balance": {
3
"accountBalance": "100000",
4
"availableBalance": "100000"
5
},
6
"active": true,
7
"frozen": false,
8
"currency": "VC_USD",
9
"accountingCurrency": "EUR",
10
"id": "5fbe46739045a09adbc3f590"
11
}
Copied!
The result of the call is a virtual account of the given virtual currency. The initial supply of the virtual currency is already credited to the account.

Increasing the supply of a virtual currency

When you want to increase the supply of a virtual currency, you have to mint new units. Minted units are credited to the specific virtual account, and the operation is visible as a new virtual account transaction for that account.
Request
Response
1
curl --location --request PUT 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency/mint' \
2
--header 'x-api-key: YOUR_API_KEY' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"accountId": "5fbe46739045a09adbc3f590",
6
"amount": "100"
7
}'
Copied!
1
{
2
"reference": "c7b8ca84-bab3-42d0-9115-90fad09e5f57"
3
}
Copied!
The result of the call is a reference to the virtual account transaction.

Destroying the supply of a virtual currency

When you want to destroy the supply of a virtual currency, you have to revoke some units. Destroyed units are debited from the specific virtual account, and the operation is visible as a new virtual account transaction for the account.
Request
Response
1
curl --location --request PUT 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency/revoke' \
2
--header 'x-api-key: YOUR_API_KEY' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"accountId": "5fbe46739045a09adbc3f590",
6
"amount": "100"
7
}'
Copied!
1
{
2
"reference": "e9574b40-4b25-4f03-be76-27cec5e564fc"
3
}
Copied!

Listing account transactions

The result of the call is a reference to the virtual account transaction. Now when we get the list of account transactions, we can see two operations - mint and revoke.
Request
Response
1
curl --location --request POST 'https://api-eu1.tatum.io/v3/ledger/transaction/account?pageSize=50' \
2
--header 'x-api-key: YOUR_API_KEY' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"id": "5fbe46739045a09adbc3f590"
6
}'
Copied!
1
[
2
{
3
"amount": "-100",
4
"operationType": "REVOKE",
5
"currency": "VC_USD",
6
"transactionType": "DEBIT_OUTGOING_PAYMENT",
7
"accountId": "5fbe46739045a09adbc3f590",
8
"anonymous": false,
9
"reference": "e9574b40-4b25-4f03-be76-27cec5e564fc",
10
"senderNote": null,
11
"recipientNote": null,
12
"paymentId": null,
13
"transactionCode": null,
14
"marketValue": {
15
"currency": "EUR",
16
"source": "Fixer.io",
17
"sourceDate": 1606302850000,
18
"amount": "-84.13613226199991586387"
19
},
20
"created": 1606305988347
21
},
22
{
23
"amount": "100",
24
"operationType": "MINT",
25
"currency": "VC_USD",
26
"transactionType": "CREDIT_INCOMING_PAYMENT",
27
"accountId": "5fbe46739045a09adbc3f590",
28
"anonymous": false,
29
"reference": "c7b8ca84-bab3-42d0-9115-90fad09e5f57",
30
"recipientNote": null,
31
"paymentId": null,
32
"transactionCode": null,
33
"marketValue": {
34
"currency": "EUR",
35
"source": "Fixer.io",
36
"sourceDate": 1606302850000,
37
"amount": "84.13613226199991586387"
38
},
39
"created": 1606305827044
40
}
41
]
Copied!

Typical integration steps

It is impossible to integrate Tatum directly into a specific bank or card processor to read and perform bank transactions. This is due to legislative restrictions. Bank integration must be done in your application and reflect your bank operations into Tatum.
The typical flow is as follows:
    When you receive a payment into your bank account or via a card transaction, you can mint a new supply on the connected user account.
    When you send a payment from your bank account, you can revoke the supply from the connected user account.
    You will then perform all internal transactions within the Tatum virtual accounts and your application ecosystem.
For more information on how to support virtual accounts in a crypto exchange, please refer to the following workshop:
Last modified 1mo ago