In order to send payouts, you will need to deposit funds to a liquidity provider to exchange fiat to stablecoins (i.e. on-ramp funds).
Tesser treats deposits via a liquidity provider as a special class of payments, so the structure of the deposits API experience will be similar to sending a payment.
Register the source fiat bank account
Liquidity providers require that funds are on-ramped from an account owned by your organization. Ensure you have registered the source bank account prior to beginning the deposit process. For more information on account creation, see Create an account.
Deposit workflow
Like a payment, a deposit will execute over multiple steps.
- A
transferstep indicates funds are moving from one account to another. Accounts can be a bank account, ledger, or wallet. Thefrom_currencyandto_currencymay be the same in a transfer step or different. - A
swapstep indicates currencies have been exchanged within an account. E.g. a trade was performed to sell USD and buy USDC or USDT within your ledger.
Each step has a status. For more information on the statuses of a transfer step, see Transfer steps statuses.
Deposit creation
Submit a request to the Deposit API.
- For all deposits, populate:
from_currency: Fiat currency you are on-ramping fromto_currency: Stablecoin currency you are on-ramping tofrom_amount: Fiat amount to depositfrom_account_id: Identifier of the bank account fiat funds will be sent from. Previously registered (see above).to_account_id: Identifier of the wallet or ledger account on the Tesser platform to deposit funds to.
When depositing funds to a ledger at a custodian, ensure the account identifier supplied is for a custodian that can support your requested from_currency and to_currency.
- For deposits to a wallet account:
to_network: Stablecoin network on-ramping to. Not applicable ifto_account_idhas a type of "ledger".
Example request for deposit creation to a ledger account using Circle:
Code
In the API response, Tesser will create and return an id for the deposit request.
Example response for deposit creation to a ledger account using Circle:
Code
Deposit updated with estimated amounts
After obtaining the exchange rate from the liquidity provider, Tesser will send a webhook notifying you of the updated deposit information. Based on the populated from_amount and to_amount fields, you can calculate an exchange rate between the fiat from_currency and stablecoin to_currency.
Also with this update, the steps for on-ramping will be articulated; each step will have a status of "created". If you want to proceed with the deposit, obtain the account information for the liquidity provider from Step 1 and send funds to the provider.
Example webhook schema for deposit to a ledger account using Circle:
Code
Obtain instructions from the liquidity provider
The to_account_id field in the first step will always be populated with the Tesser identifier of the bank account of the liquidity provider. Submit a subsequent request to the Get deposit instructions endpoint with the to_account_id as the path parameter.
The response will contain the bank account information you need to deposit funds to the liquidity provider, including the account number, bank identifier code (BIC/SWIFT/Routing number).
Once you have the account information, you will initiate a push of funds to the liquidity provider from your bank account. This happens outside of Tesser's system.
Tesser will track the receipt of the fiat funds to the liquidity provider and the exchange of fiat into stablecoins. The status of each step will reflect the step's progress, and any reasons for exception or failure will be identified in the status_reasons array.