Buy EURR

Learn how to convert fiat money into EURR using the StablR API.

Converting fiat funds from your business bank account to EURR is one of the core functionalities of the API. On this page we will guide you through the steps to deposit Euros from your bank account and receive EURR in your institutional wallet.


1. Configure your StablR Account

To programmatically Buy EURR, make sure you have the basics configured in your StablR Account. You should have:

  • Created an API Key.
  • Registered your business bank account.
  • Whitelisted at least one (1) of your institutional wallets.

Get an API Key

StablR's API uses API Keys and Access Tokens as the mechanism to authenticate customer requests. When you have retrieved the Access Token for authentication, this Access Token must be set in the Authorization header of the API request for which the format of the header is Bearer secret-key-value.

How to Create an API Key!

Once you have generated your API key, store its respective {CLIENT_SECRET} and the {CLIENT_ID} in a secure place.

To be able to make valid requests from your backend server, you must retrieve an {ACCESS_TOKEN} using the {CLIENT_SECRET} and {CLIENT_ID} as explained in the Authentication section.

📘

API Access Tokens

StablR's Access Tokens for making secure API requests will expire five (5) minutes after creation. This means you have to request a new token after the respective token has expired to keep making valid requests from your backend server.

Register your Bank Account

Before you start using the StablR API, make sure you register your business bank account from which you wish to interact and convert fiat funds into EURR.

  • Navigate to the Account section in your StablR Account.
  • Go to Bank Accounts and click on Add Bank Account.
  • Enter the respective bank account details of your business bank account and upload a valid and recent account statement for verification purposes.

📘

Bank Account Validation

When adding the Bank Account to your StablR Account it will be in PENDING status. StablR will verify the registration of your business bank account which will mark it as APPROVED.

Whitelist your wallet

To be able to convert your fiat funds into digital currency, you must also at minimum whitelist one (1) institutional wallet which you own.

You can either do this manually via the StablR Account by:

  • Navigate to the Account section in your StablR Account.
  • Go to Wallets and click on Add Wallet.
  • Enter the respective wallet details and confirm the whitelisting.

Or you can programmatically manage your Wallets via the StablR API by:

  • Whitelisting a Wallet.
  • Retrieving your whitelisted wallet(s).
  • Removing your whitelisted wallet(s).

📘

Wallet Validation

When adding the Wallet to your StablR Account it will be in PENDING status. StablR will verify the whitelisting of your wallet which will mark it as APPROVED.


2. Initiate a Buy Order

To Buy EURR you will need to Create a Buy Order first.

Request

Replace {ACCESS_TOKEN} with the Access Token you retrieved when authenticating your API Key.

Insert Buy as the Type.

Insert the {AMOUNT} to indicate how much fiat funds you wish to convert to EURR.

Insert the {WALLET_ID} of a registered wallet you retrieved in the previous step when whitelisting your wallet or retrieving the list of whitelisted wallets in your StablR Account.

🚧

Wallet

Please make sure to insert the WalletId of the whitelisted wallet where you wish to receive the EURR on from StablR!

curl --request POST \
     --url https://api.stablr.com/v1/orders \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {ACCESS_TOKEN}' \
     --header 'content-type: application/*+json' \
     --data '
{
  "Type": "Buy",
  "Amount": "{AMOUNT}",
  "WalletId": "{WALLET_ID}",
  "CustomerReference": "OPTIONAL"
}
'

Response

The response should like like this:

{
  "OrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

3. Retrieve Payment Instructions

You can easily retrieve all necessary details to deposit fiat funds from your bank account by using the GET Order and GET Fiat Transfer details endpoints. The GET Order request will provide you with the Fiat Transfer Id and subsequently using this Id in the GET Fiat Transfer Details request returns the beneficiary details and bank details.

GET Order Request

Replace {ACCESS_TOKEN} with the Access Token you retrieved when authenticating your API Key.

Replace {orderId} with the Id of the Order you created in step 2.

curl --request GET \
     --url https://api.stablr.com/v1/orders/orderId \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {ACCESS_TOKEN}'

GET Order Response

The response looks as follows:

{
  "OrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Type": "string",
  "Amount": {AMOUNT},
  "WalletId": "2fa85f64-5717-4562-b3fc-2c963f66afa5",
  "CustomerReference": "OPTIONAL",
  "Status": "string",
  "FiatTransferId": "4fa85f64-5717-4562-b3fc-2c963f66afa7",
  "CryptoTransferId": 0,
  "CreatedAt": "2024-05-30T08:58:16.730Z"
}

GET Fiat Transfer Details Request

Replace {ACCESS_TOKEN} with the Access Token you retrieved when authenticating your API Key.

Replace {transferId} with the Fiat Transfer Id of the Order you retrieved in the previous step.

curl --request GET \
     --url https://api.stablr.com/v1/transfers/fiat/transferId \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {ACCESS_TOKEN}'

GET Fiat Transfer Details Response

The response looks like this:

{
  "Id": "4fa85f64-5717-4562-b3fc-2c963f66afa7",
  "OrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Beneficiary": "StablR Solutions DAC",
  "AccountNumber": "BANK ACCOUNT NUMBER",
  "Amount": {AMOUNT},
  "BankIdentifier": "BIC/SWIFT",
  "BlincId": 0,
  "BankName": "CUSTODIAN BANK",
  "BankAddress": "CUSTODIAN STREET 99",
  "BankPostalCode": "9999",
  "BankCity": "CUSTODIAN CITY",
  "BankCountry": "CUSTODIAN COUNTRY",
  "TransferStatus": "PENDING",
  "CreatedAt": "2024-05-30T08:58:16.730Z"
}

📘

BLINC

In case you are banking with BCB, are utilizing their BLINC instant settlement network, and have registered your BLINC account in your StablR Account the BlincId parameter substitutes the AccountNumber and BankIdentifier parameters you should use to initiate the deposit of the fiat funds to StablR.


4. Deposit the fiat funds to StablR

Bank transfer deposits of your fiat funds can only be initiated from your respective bank account so this part of the deposit process will take place within your own banking ecosystem.

By using the payment instructions retrieved in step 3., you are able to send the respective funds from your registered bank account to StablR's segregated bank account.

🚧

Bank Transfers

Please be aware that you are responsible and must ensure that the payment details are correctly utilized in the bank transfer initiated from your respective bank to avoid any delays or return of funds.


5. Receive EURR

After the fiat funds arrived in StablR's segregated bank account, StablR will instantly issue EURR and transfer it to your respective whitelisted wallet which you provided in the initiated Buy Order in step 2.


What’s Next