Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.circle.com/llms.txt

Use this file to discover all available pages before exploring further.

Deposit fiat to mint USDC, transfer USDC to a blockchain address, and redeem USDC back to fiat using the Circle Mint sandbox.

Prerequisites

Before you begin, complete the account and API key setup.

Step 1: Create a bank account

Replace ${YOUR_API_KEY} in the examples below with your sandbox API key. Register a mock bank account using the create a wire bank account endpoint. This bank account serves as the source for depositing fiat and the destination for redeeming USDC.
curl -X POST https://api-sandbox.circle.com/v1/businessAccount/banks/wires \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "idempotencyKey": "$(uuidgen)",
  "accountNumber": "12340010",
  "routingNumber": "121000248",
  "billingDetails": {
    "name": "Satoshi Nakamoto",
    "city": "Boston",
    "country": "US",
    "line1": "100 Money Street",
    "district": "MA",
    "postalCode": "01234"
  },
  "bankAddress": {
    "bankName": "WELLS FARGO BANK, NA",
    "city": "San Francisco",
    "country": "US",
    "line1": "420 Montgomery Street",
    "district": "CA"
  }
}
EOF
Expected response:
{
  "data": {
    "id": "9d1fa351-b24d-442a-8aa5-e717db1ed636",
    "status": "pending",
    "description": "WELLS FARGO BANK, NA ****0010",
    "trackingRef": "CIR2GKYL4B"
  }
}
Save the id and trackingRef values from the response. You need them in the following steps.

Step 2: Deposit fiat to mint USDC

Simulate a wire deposit using the create a mock wire payment endpoint. In the sandbox, this mints USDC into your Circle Mint account without moving real funds.
curl -X POST https://api-sandbox.circle.com/v1/mocks/payments/wire \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "amount": { "amount": "100.00", "currency": "USD" },
  "trackingRef": "CIR2GKYL4B",
  "beneficiaryBank": { "accountNumber": "123815146304" }
}
EOF
Expected response:
{
  "data": {
    "trackingRef": "CIR2GKYL4B",
    "amount": { "amount": "100.00", "currency": "USD" },
    "status": "pending"
  }
}
Sandbox mock wire deposits process in batches and may take up to 15 minutes to complete. Wait for the deposit to settle before continuing.
After the deposit settles, verify your balance using the list all balances endpoint:
curl https://api-sandbox.circle.com/v1/businessAccount/balances \
  -H "Authorization: Bearer ${YOUR_API_KEY}"
Expected response:
{
  "data": {
    "available": [{ "amount": "100.00", "currency": "USD" }],
    "unsettled": []
  }
}
The available balance confirms that your fiat deposit minted USDC successfully.

Step 3: Transfer USDC onchain

Send USDC from your Circle Mint account to an external blockchain address. This step requires two API calls: create a recipient address, then create a transfer.

3.1. Create a recipient address

Register a destination address using the create a recipient address endpoint. This example uses the Ethereum blockchain.
curl -X POST https://api-sandbox.circle.com/v1/businessAccount/wallets/addresses/recipient \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "idempotencyKey": "$(uuidgen)",
  "address": "0x493A9869E3B5f846f72267ab19B76e9bf99d51b1",
  "chain": "ETH",
  "currency": "USD",
  "description": "External Ethereum wallet"
}
EOF
Expected response:
{
  "data": {
    "id": "cfa01bb0-d166-5506-a48a-56f2beab559f",
    "address": "0x493a9869e3b5f846f72267ab19b76e9bf99d51b1",
    "chain": "ETH",
    "currency": "USD",
    "description": "External Ethereum wallet"
  }
}

3.2. Create a transfer

Send USDC to the recipient address using the create a transfer endpoint:
curl -X POST https://api-sandbox.circle.com/v1/businessAccount/transfers \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "idempotencyKey": "$(uuidgen)",
  "destination": {
    "type": "verified_blockchain",
    "addressId": "cfa01bb0-d166-5506-a48a-56f2beab559f"
  },
  "amount": { "currency": "USD", "amount": "25.00" }
}
EOF
Expected response:
{
  "data": {
    "id": "21fd4ec4-bad1-4eb2-9fc5-60320dedc7ea",
    "source": { "type": "wallet", "id": "1016875042" },
    "destination": {
      "type": "blockchain",
      "address": "0x493a9869e3b5f846f72267ab19b76e9bf99d51b1",
      "chain": "ETH"
    },
    "amount": { "amount": "25.00", "currency": "USD" },
    "status": "pending"
  }
}
The transfer starts in pending status, moves to running once broadcast onchain, and reaches complete after enough blockchain confirmations.

Step 4: Redeem USDC to fiat

Convert your remaining USDC balance back to fiat by creating a payout to the bank account you registered in Step 1. Use the create a payout endpoint:
curl -X POST https://api-sandbox.circle.com/v1/businessAccount/payouts \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "idempotencyKey": "$(uuidgen)",
  "destination": {
    "type": "wire",
    "id": "9d1fa351-b24d-442a-8aa5-e717db1ed636"
  },
  "amount": { "currency": "USD", "amount": "75.00" }
}
EOF
Expected response:
{
  "data": {
    "id": "9cf38c76-cac4-40d8-a516-f46e9a610a85",
    "amount": { "amount": "75.00", "currency": "USD" },
    "status": "pending",
    "sourceWalletId": "1016875042",
    "destination": {
      "type": "wire",
      "id": "9d1fa351-b24d-442a-8aa5-e717db1ed636",
      "name": "WELLS FARGO BANK, NA ****0010"
    }
  }
}

Step 5: Verify the round trip

Check your final balance to confirm both the transfer and payout processed:
curl https://api-sandbox.circle.com/v1/businessAccount/balances \
  -H "Authorization: Bearer ${YOUR_API_KEY}"
Expected response:
{
  "data": {
    "available": [{ "amount": "0.00", "currency": "USD" }],
    "unsettled": []
  }
}
You completed the full Circle Mint cycle:
  1. Deposited $100 USD via wire to mint 100 USDC.
  2. Transferred 25 USDC onchain to an Ethereum address.
  3. Redeemed 75 USDC back to fiat via wire payout.
Your available balance returns to zero, confirming every dollar is accounted for. In production, the same API calls work with real bank accounts and blockchain addresses. See Sandbox to Production for details on transitioning to production.