Skip to main content

Prerequisites

Before you begin, make sure you have:
  1. A source User with sufficient USDC balance
  2. Multiple destination Users or wallet addresses

Step 1: Check Source Wallet Balance

First, verify that the source wallet has sufficient USDC balance for all transfers: GET /v2/users/{userId}/wallets/balance
curl -X GET "https://production.hifibridge.com/v2/users/{userId}/wallets/balance?chain=POLYGON&currency=usdc" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "balances": [
    {
      "currency": "usdc",
      "chain": "POLYGON",
      "balance": "1000.00",
      "availableBalance": "1000.00"
    }
  ]
}

Step 2: Create Batch Transfer

Send USDC to multiple recipients in a single transaction: POST /v2/wallets/transfers/batches
curl --request POST \
     --url https://production.hifibridge.com/v2/wallets/transfers/batches \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "requestId": "batch-001",
  "currency": "usdc",
  "chain": "POLYGON",
  "source": {
    "userId": "sender-user-id"
  },
  "destination": {
    "batch": [
      {
        "userId": "recipient-1",
        "amount": "100.00"
      },
      {
        "userId": "recipient-2",
        "amount": "200.00"
      },
      {
        "walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
        "amount": "50.00"
      }
    ]
  },
  "requireApproval": false
}'
Response:
{
  "transferType": "WALLET.TRANSFER.BATCH",
  "transferDetails": {
    "id": "879af7af-67bf-469f-b718-d262a39d4857",
    "requestId": "batch-001",
    "createdAt": "2025-04-05T00:55:50.609Z",
    "updatedAt": "2025-04-05T00:56:33.236Z",
    "chain": "POLYGON",
    "currency": "usdc",
    "status": "PENDING",
    "source": {
      "userId": "sender-user-id",
      "walletAddress": "0x99a8c5ED386d217BC6ff0AA1b3585606D475432B",
      "walletType": "INDIVIDUAL"
    },
    "destination": {
      "batch": [
        {
          "amount": "100.00",
          "userId": "recipient-1"
        },
        {
          "amount": "200.00",
          "userId": "recipient-2"
        },
        {
          "amount": "50.00",
          "walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
        }
      ]
    },
    "receipt": {
      "transactionHash": null,
      "userOpHash": null
    }
  }
}

Step 3: Monitor Batch Status

Check the status of your batch transfer: GET /v2/wallets/transfers/batches/{batchId}
curl -X GET "https://production.hifibridge.com/v2/wallets/transfers/batches/879af7af-67bf-469f-b718-d262a39d4857" \
  -H "Authorization: Bearer YOUR_API_KEY"

Batch Transfer Statuses

Batch transfers progress through several statuses:
  • PENDING: Batch transfer has been created and is awaiting processing
  • PROCESSING: Batch transfer is being executed on the blockchain
  • COMPLETED: All transfers in the batch have been successfully completed
  • FAILED: Batch transfer failed (check failedReason for details)

Step 4: Verify Recipient Balances

Check that recipients received their funds: GET /v2/users/{userId}/wallets/balance
curl -X GET "https://production.hifibridge.com/v2/users/recipient-1/wallets/balance?chain=POLYGON&currency=usdc" \
  -H "Authorization: Bearer YOUR_API_KEY"
I