Integration Tutorial

This section describes how to set up your environment, configure the MCP client, and start using Interlace Agent Card tools.


Integration Workflow

To start using the Interlace Agent Card, complete the following steps.


Step 1 — Create a Developer Account

  1. Visit the Agent Developer Page and register a developer account.
    1. Sandbox: https://agent-card-staging.interlace.money/
    2. Production: https://agent-card.interlace.money/
  2. Sign in to access the developer dashboard.

Step 2 — Generate an API Key

  1. In the Developer Page, navigate to API Key Management.
  2. Click Create New API Key. The system will generate an API key in the format: itl_sk_xxxxxxxx... .

Step 3 — Configure the MCP Client

  1. Configure the generated API key in your agent client. Supported clients include OpenCode, Codex, and other MCP-compatible clients.
  2. After configuration, restart your agent client. The agent will automatically connect to the MCP server and discover available tools.

Example Configuration (OpenCode)

{
  "mcpServers": {
    "interlace": {
      "type": "remote",
      "url": "https://mcp.interlace.money/sse",
      "headers": {
        "Authorization": "Bearer itl_sk_xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}


Usage Examples

The following examples illustrate how an agent can perform common tasks using natural language instructions and corresponding MCP tools.


1. Create a Card

  • User request: Create a $10 card.
  • Tool invoked: issue_card

Required Parameters

ParameterDescriptionRequired
currencyFunding currency. Supported values: USDC or USDTYes
chainBlockchain network (e.g., ETH, ARB). See the Supported Chains and Currencies for the full list.Yes
amountFunding amount. Maximum allowed amount: $20Yes

Response Fields

FieldTypeDescription
cardIdstringCard ID (returned if the card is issued immediately after funding)
currencystringFunding currency
chainstringBlockchain network
expectedAmountstringExpected funding amount
depositAddressstringFunding address
depositQrCodeUrlstringQR code URL for funding
messagestringResponse message

After the user transfers sufficient funds (USDC or USDT) to the depositAddress, the system will automatically load the balance onto the card. The card can then be used for online payments.
The funding address can be displayed as a static QR code for direct on-chain payment.



2. Get Card Details

When an online payment needs to be completed (for example, subscribing to a service), the agent invokes get_card to retrieve payment details such as the card number and CVV.


Response Fields

FieldTypeDescription
cardIdstringCard ID
panstringCard number
cvvstringCVV
expMonthstringExpiration month
expYearstringExpiration year
binstringCard BIN
cardLastFourstringLast four digits of the card number
statusstringCard status (e.g., ACTIVE)
balancestringCard balance


3. View Transaction History

  • User request: How much has my card spent?
  • Tool invoked: get_transactions

Request Parameters

ParameterDescription
limitNumber of recent transactions to return. Default: 10. Maximum: 100

Response Fields

FieldTypeDescription
cardIdstringCard ID
transactionsarrayList of transactions
transactions[].transactionIdstringTransaction ID
transactions[].amountstringTransaction amount
transactions[].currencystringTransaction currency (e.g., USD)
transactions[].merchantstringMerchant name
transactions[].statusstringTransaction status (e.g., SETTLED)
transactions[].occurredAtstringTransaction timestamp


4. Delete a Card

  • User request: Delete this card and return the remaining balance.
  • Tool invoked: delete_card

Response Fields

FieldTypeDescription
cardIdstringCard ID
deletedbooleanWhether the card was successfully deleted
refundAmountstringRefunded amount
messagestringResponse message

After the card is deleted, the remaining balance is automatically returned to the user's crypto wallet in the original funding currency (USDC or USDT). Withdrawal functionality will be introduced in a future release.



5. View On-Chain Top-Up History

  • User request: How much has been deposited into my wallet?
  • Tool invoked: list_topup

Request Parameters

ParameterDescription
limitNumber of recent top-up records to return. Default: 10. Maximum: 100

Response Fields

FieldTypeDescription
depositAddressstringFunding address from the most recent top-up record
topupsarrayList of top-up transactions
topups[].transferIdstringTransfer ID
topups[].amountstringTransfer amount
topups[].currencystringCurrency (e.g., USDC, USDT)
topups[].chainstringBlockchain network (e.g., BASE, ETH)
topups[].addressstringFunding address
topups[].statusstringTransfer status (e.g., COMPLETE, ONHOLD, PENDING)
topups[].transactionHashstringOn-chain transaction hash
topups[].riskResultstringRisk assessment result (e.g., PASS, HIGH, REJECTED)
topups[].createTimestringRecord creation time (format: yyyy-MM-dd HH:mm:ss)
topups[].completeTimestringTransfer completion time (format: yyyy-MM-dd HH:mm:ss)


6. Refund High-Risk Top-Up Funds

  • User request: Refund my funds on hold.
  • Tool invoked: refund_topup

Request Parameters

ParameterDescriptionRequired
addressBlockchain address to receive the refund. If multiple ONHOLD top-ups exist, all refunds will be sent to this address. Required.Yes

Response Fields

FieldTypeDescription
addressstringMasked refund address
refundedCountintegerNumber of refunds processed in this request
refundsarrayList of refund records
refunds[].transferIdstringOriginal transfer ID
refunds[].refundIdstringRefund ID (returned if successful)
refunds[].amountstringRefund amount
refunds[].currencystringCurrency
refunds[].statusstringRefund status (SUCCESS or FAILED)
refunds[].messagestringFailure reason; typically null if successful


Important Notes

  1. Card Limit
  • Only one active card is allowed per user. A new card cannot be created until the existing card is deleted.
  • Card with status CONTROL, ACTIVE, PENDING, or FROZEN is considered active. INACTIVE indicates a deleted card.

  1. Spending Limit
  • Each card has a lifecycle spending limit of $20. Once the limit is reached, the card is automatically disabled.

  1. Transaction Restrictions
  • Agent Card supports online transactions only, such as e-commerce, subscriptions, and other digital services.
  • POS and ATM transactions are not supported.
  • Merchant category restrictions (MCC controls) apply.

  1. Data Security
  • Full card details (e.g., PAN, CVV) are available only through MCP tools and are not displayed in the Developer Page.
  • Ensure your agent client securely stores and handles sensitive payment data.

  1. Balance Refund
  • After deletion, any remaining balance is automatically returned to the user's crypto wallet in the original funding currency (USDC or USDT).
  • Wallet withdrawal functionality will be provided in a future release.

  1. Funding Requirements
  • Use supported currencies (USDC / USDT) and networks. See the Supported Chains and Currencies for the full list.
  • The deposited amount must be equal to or greater than the expected funding amount. Funds are automatically credited once sufficient.
  • If the deposited amount is insufficient, funding will not be processed. You may send additional funds to the same address.
  • When the funding status is ONHOLD, the funds are temporarily held and can be refunded using the refund_topup tool.