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, Tatum Private Ledger also supports private virtual currencies. A virtual currency does not have to be connected to the blockchain. It can live within the private ledger alone. When you create your own virtual currency, you can then create accounts and send ledger transactions.

A virtual currency is an entity in the ledger's 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 the ledger 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
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "VC_USD",
"supply": "100000",
"basePair": "USD"
}'
Response
{
"balance": {
"accountBalance": "100000",
"availableBalance": "100000"
},
"active": true,
"frozen": false,
"currency": "VC_USD",
"accountingCurrency": "EUR",
"id": "5fbe46739045a09adbc3f590"
}

The result of the call is a ledger 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 ledger account, and the operation is visible as a new ledger transaction for that account.

Request
Response
Request
curl --location --request PUT 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency/mint' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"accountId": "5fbe46739045a09adbc3f590",
"amount": "100"
}'
Response
{
"reference": "c7b8ca84-bab3-42d0-9115-90fad09e5f57"
}

The result of the call is a reference to the ledger 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 ledger account, and the operation is visible as a new ledger transaction for the account.

Request
Response
Request
curl --location --request PUT 'https://api-eu1.tatum.io/v3/ledger/virtualCurrency/revoke' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"accountId": "5fbe46739045a09adbc3f590",
"amount": "100"
}'
Response
{
"reference": "e9574b40-4b25-4f03-be76-27cec5e564fc"
}

Listing account transactions

The result of the call is a reference to the ledger transaction. Now when we get the list of account transactions, we can see two operations - mint and revoke.

Request
Response
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/ledger/transaction/account?pageSize=50' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "5fbe46739045a09adbc3f590"
}'
Response
[
{
"amount": "-100",
"operationType": "REVOKE",
"currency": "VC_USD",
"transactionType": "DEBIT_OUTGOING_PAYMENT",
"accountId": "5fbe46739045a09adbc3f590",
"anonymous": false,
"reference": "e9574b40-4b25-4f03-be76-27cec5e564fc",
"senderNote": null,
"recipientNote": null,
"paymentId": null,
"transactionCode": null,
"marketValue": {
"currency": "EUR",
"source": "Fixer.io",
"sourceDate": 1606302850000,
"amount": "-84.13613226199991586387"
},
"created": 1606305988347
},
{
"amount": "100",
"operationType": "MINT",
"currency": "VC_USD",
"transactionType": "CREDIT_INCOMING_PAYMENT",
"accountId": "5fbe46739045a09adbc3f590",
"anonymous": false,
"reference": "c7b8ca84-bab3-42d0-9115-90fad09e5f57",
"recipientNote": null,
"paymentId": null,
"transactionCode": null,
"marketValue": {
"currency": "EUR",
"source": "Fixer.io",
"sourceDate": 1606302850000,
"amount": "84.13613226199991586387"
},
"created": 1606305827044
}
]

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 Private Ledger and your application ecosystem.