CryptoConnect Integration for MoR Mode

• This guide provides the end-to-end workflow for MOR mode integration with CryptoConnect.

• Before starting the integration, confirm your operating model: MoR (Merchant of Record) or Gateway Mode. Refer to the official documentation for guidance: Determine Your Integration Model.


Generate a Wallet Address

This section explains how to generate and retrieve crypto wallet addresses for your users, which is the first step to enabling crypto deposits.

Step 1 — Create a new wallet

Use the Create a wallet API to generate a new CryptoConnect wallet for a user. This API returns a unique wallet ID that will be used in all subsequent operations.

💡

Tip: You can assign a nickname to the wallet during creation to simplify management.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/wallets \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "idempotencyKey": "0c946a14-9962-4683-b0c5-23985bf22704",
         "nickname": "Developer"
     }'

Response Example

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "907d6edf-0033-4629-bcba-ee0363b5e737",
    "nickname": "Developer",
    "master": false,
    "balances": [
      {
        "currency": "USDC",
        "available": "0",
        "frozen": "0"
      },
      {
        "currency": "USDT",
        "available": "0",
        "frozen": "0"
      }
    ]
  }
}

Step 2 — Get a wallet address

Use the Get a wallet API to fetch wallet details, including balance and available addresses.

⚠️

Note: The request must include the wallet ID parameter.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request GET \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/wallets/907d6edf-0033-4629-bcba-ee0363b5e737 \
     --header 'accept: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}'

Response Example

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "907d6edf-0033-4629-bcba-ee0363b5e737",
    "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
    "nickname": "Developer",
    "master": false,
    "balances": [
      {
        "currency": "USDC",
        "available": "396531.791544",
        "frozen": "0"
      }
    ],
    "addresses": [
      {
        "currency": "USDC",
        "chain": "ETH",
        "address": "0x1634a0793da328321613587c69a0be987866648d",
        "selected": true
      }
    ]
  }
}

Step 3 — Generate an additional address (optional)

If no address is available, or if you need an address on a different blockchain, use the Create a blockchain address API to generate a new one.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/wallets/907d6edf-0033-4629-bcba-ee0363b5e737/addresses \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "currency": "USDC",
         "chain": "ETH"
     }'

Response Example

{
  "code": 0,
  "message": "ok",
  "data": {
    "walletId": "907d6edf-0033-4629-bcba-ee0363b5e737",
    "currency": "USDC",
    "chain": "ETH",
    "address": "0x1634a0793da328321613587c69a0be987866648d",
    "selected": true
  }
}



Deposit Crypto to Infinity Account (Stablecoin Top-up)

After a user deposits crypto to a generated wallet address, you can transfer the funds to your Infinity Account for easier access and use.

Step 1 — Transfer Funds to Your Infinity Account

After receiving the deposit webhook notification, use the Create a transfer API to move USDC or USDT into your Infinity Account.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v1/asset/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "source": {
             "currency": "USDC",
             "type": "crypto_assets"
         },
         "destination": {
             "type": "quantum_account"
         },
         "amount": "10"
     }'

Response Example

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "c32e92cb-49fe-4f2c-9598-492d31ea3b19",
    "accountId": "d37deed7-f0e7-4635-a43a-781af0cb59f0",
    "source": {
      "type": "crypto_assets",
      "currency": "USDC"
    },
    "destination": {
      "type": "quantum_account"
    },
    "amount": {
      "amount": "10",
      "currency": "USD"
    },
    "status": "Pending",
    "createTime": "2023-03-01T08:23:03.096Z",
    "updateTime": "2023-03-01T08:23:03.096Z"
  }
}

Step 2 — Funds Available

Once credited, funds can be used for:

  • Issuing cards
  • Prepaid card top-ups
  • Budget allocations



Convert & Withdraw Crypto (Redemption and Withdrawal)

To withdraw funds from your Infinity Account to an external wallet, follow these steps.

Step 1 — Move USD to CryptoConnect Wallet

Use the Create a transfer API to transfer USD from your Infinity Account into your CryptoConnect Wallet.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v1/asset/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "source": {
             "type": "quantum_account"
         },
         "destination": {
             "type": "crypto_assets",
             "currency": "USD"
         },
         "amount": "10"
     }'

Response Example

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "94c99871-024d-4c51-b23b-12bc0037461b",
    "accountId": "d37deed7-f0e7-4635-a43a-781af0cb59f0",
    "source": {
      "type": "quantum_account"
    },
    "destination": {
      "type": "crypto_assets",
      "currency": "USD"
    },
    "amount": {
      "amount": "10",
      "currency": "USD"
    },
    "status": "Closed",
    "createTime": "2023-03-01T08:23:10.096Z",
    "updateTime": "2023-03-01T08:23:10.096Z"
  }
}

Step 2 — Preview exchange rates and fees (optional)

Use the Get an estimate quote API to check rates and fees before conversion.

📘

Note: If skipped, the system will automatically request a quote in Step 3.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/convert/estimate-quote \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "baseCurrency": "USDC",
         "quoteCurrency": "USD",
         "side": "buy",
         "rfqCurrency": "USD",
         "rfqAmount": "10"
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "id": "0a192350-a015-4c30-92fc-23064839f935",
        "quoteTime": "1758276038706",
        "baseCurrency": "USDC",
        "baseAmount": "9.95",
        "quoteCurrency": "USD",
        "quoteAmount": "10",
        "side": "buy",
        "rate": "1",
        "rfqAmount": "10",
        "rfqCurrency": "USD",
        "fee": "0.05",
        "feeCurrency": "USD",
        "ttlMs": "60000"
    }
}

Step 3 — Convert USD to crypto

Use the Create a trade API to exchange USD for USDC/USDT.

📘

Note: Currently only conversions between USD ↔ USDC/USDT and USDC ↔ USDT are supported.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/convert/trades \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "idempotencyKey": "e27be9f8-2d59-4aa7-a9fd-f5571927637d",
         "baseCurrency": "USDC",
         "quoteCurrency": "USD",
         "side": "buy",
         "rfqCurrency": "USD",
         "rfqAmount": "10",
         "quoteId": "0a192350-a015-4c30-92fc-23064839f935"
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "id": "416ddde2-1503-443b-90f8-72751137b37f",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "symbol": "USDC-USD",
        "baseWalletId": "32aae8b7-4a69-474f-b7d5-337e190af878",
        "baseCurrency": "USDC",
        "baseAmount": "9.95",
        "quoteCurrency": "USD",
        "quoteAmount": "10",
        "side": "buy",
        "rate": "1",
        "fee": "0.05",
        "feeCurrency": "USD",
        "status": "Closed",
        "idempotencyKey": "e27be9f8-2d59-4aa7-a9fd-f5571927637d",
        "createTime": "1758276224868",
        "updateTime": "1758276225788",
        "completeTime": "1758276225787"
    }
}

Step 4 — Preview withdrawal fees (optional)

Use the Get transfer fee API to check fees before withdrawal.

📘

Note: If skipped, fees will be retrieved automatically in Step 5.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/transfers/fee-and-quota \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "source": {
             "type": "cryptoconnect_wallet",
             "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
         },
         "destination": {
             "type": "blockchain",
             "chain": "ETH",
             "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
         },
         "amount": {
             "amount": "9.95",
             "currency": "USDC"
         }
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "crossChainQuota": "10000",
        "crossChainFeeRate": "0.003",
        "crossChainAmount": "0",
        "fees": [
            {
                "amount": "0.2",
                "currency": "USDC",
                "type": "GAS"
            }
        ]
    }
}

Step 5 — Withdraw crypto

Use the Create a blockchain transfer API to withdraw crypto to an external wallet.

⚠️

Note: Ensure that both the wallet address and the blockchain network are correctly specified before initiating the withdrawal.


Withdrawal Status Flow 💰

  • When you initiate a withdrawal, Interlace first receives the request and assigns it a status of Pending, with the transactionHash set to null. This indicates that your request has been accepted and the on-chain transfer process has started.

  • Once the transaction is broadcast, Interlace monitors its progress. The status will update to Closed after 30 block confirmations, and a valid transactionHash will be available.

  • You can use this transactionHash to track the transfer directly on-chain, for example via Etherscan's tracker on Sepolia.


Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v2/cryptoconnect/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "idempotencyKey": "bfafe401-a54d-445a-a6c5-4b407b68a2cc",
         "source": {
             "type": "cryptoconnect_wallet",
             "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
         },
         "destination": {
             "type": "blockchain",
             "chain": "ETH",
             "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
         },
         "amount": {
             "amount": "9.95",
             "currency": "USDC"
         }
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "id": "aba46642-edcf-4faa-8942-7d63c967fb07",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "idempotencyKey": "bfafe401-a54d-445a-a6c5-4b407b68a2cc",
        "source": {
            "type": "cryptoconnect_wallet",
            "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
        },
        "destination": {
            "type": "blockchain",
            "chain": "ETH",
            "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
        },
        "amount": {
            "amount": "9.95",
            "currency": "USDC"
        },
        "fees": [
            {
                "amount": "0.2",
                "currency": "USDC",
                "type": "GAS"
            }
        ],
        "status": "Pending",
        "createTime": "1758276661923",
        "updateTime": "1758276662488"
    }
}

🎉 Congratulations! The cryptocurrency transfer has been successfully completed using Interlace APIs.