Skip to main content

Prerequisites

Before you begin, make sure you have:
  1. A User with admin permissions to approve transfers
  2. A User with member permissions to create transfers
  3. API credentials configured

Step 1: Create Transfer Requiring Approval

Create a transfer that requires admin approval before execution: POST /v2/wallets/transfers
curl --request POST \
     --url https://production.hifibridge.com/v2/wallets/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "requestId": "transfer-001",
  "currency": "usdc",
  "chain": "POLYGON",
  "source": {
    "userId": "sender-user-id"
  },
  "destination": {
    "userId": "recipient-user-id",
    "amount": "1000.00"
  },
  "requireApproval": true
}'
Response:
{
  "transferType": "WALLET.TRANSFER",
  "transferDetails": {
    "id": "transfer-abc123",
    "requestId": "transfer-001",
    "status": "PENDING_APPROVAL",
    "chain": "POLYGON",
    "currency": "usdc",
    "amount": "1000.00",
    "source": {
      "userId": "sender-user-id",
      "walletAddress": "0x1234...5678"
    },
    "destination": {
      "userId": "recipient-user-id",
      "walletAddress": "0x8765...4321"
    },
    "approval": {
      "status": "PENDING",
      "requestedAt": "2025-02-24T17:44:54.781519+00:00"
    }
  }
}

Step 2: List Pending Approvals

Check for transfers awaiting approval: GET /v2/transfer-approvals/pending
curl -X GET "https://production.hifibridge.com/v2/transfer-approvals/pending" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "approvals": [
    {
      "id": "approval-123",
      "transferId": "transfer-abc123",
      "status": "PENDING",
      "requestedBy": "sender-user-id",
      "requestedAt": "2025-02-24T17:44:54.781519+00:00",
      "transfer": {
        "currency": "usdc",
        "amount": "1000.00",
        "chain": "POLYGON",
        "source": {
          "userId": "sender-user-id"
        },
        "destination": {
          "userId": "recipient-user-id",
          "amount": "1000.00"
        }
      }
    }
  ]
}

Step 3: Approve Transfer

Approve a pending transfer: POST /v2/transfer-approvals/{approvalId}/approve
curl --request POST \
     --url https://production.hifibridge.com/v2/transfer-approvals/approval-123/approve \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "reason": "Approved for payroll processing"
}'
Response:
{
  "id": "approval-123",
  "transferId": "transfer-abc123",
  "status": "APPROVED",
  "approvedBy": "admin-user-id",
  "approvedAt": "2025-02-24T17:45:30.123456+00:00",
  "reason": "Approved for payroll processing"
}

Step 4: Monitor Transfer Execution

Check the status of the approved transfer: GET /v2/wallets/transfers/{transferId}
curl -X GET "https://production.hifibridge.com/v2/wallets/transfers/transfer-abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "transferType": "WALLET.TRANSFER",
  "transferDetails": {
    "id": "transfer-abc123",
    "requestId": "transfer-001",
    "status": "COMPLETED",
    "chain": "POLYGON",
    "currency": "usdc",
    "amount": "1000.00",
    "source": {
      "userId": "sender-user-id",
      "walletAddress": "0x1234...5678"
    },
    "destination": {
      "userId": "recipient-user-id",
      "walletAddress": "0x8765...4321"
    },
    "approval": {
      "status": "APPROVED",
      "approvedBy": "admin-user-id",
      "approvedAt": "2025-02-24T17:45:30.123456+00:00",
      "reason": "Approved for payroll processing"
    },
    "receipt": {
      "transactionHash": "0x57f0cd3429ea425d982882243428ef4a1eda5f1be2157c1b34ea48b49b24fe7f"
    }
  }
}

Transfer Approval Statuses

Transfer approvals progress through several statuses:
  • PENDING: Transfer is awaiting approval
  • APPROVED: Transfer has been approved and will execute
  • REJECTED: Transfer has been rejected and will not execute
  • EXPIRED: Transfer approval request has expired

Advanced Options

Reject Transfer

Reject a pending transfer:
curl --request POST \
     --url https://production.hifibridge.com/v2/transfer-approvals/approval-123/reject \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "reason": "Insufficient documentation provided"
}'

Batch Transfer with Approval

Create a batch transfer requiring approval:
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": "1000.00"
      },
      {
        "userId": "recipient-2",
        "amount": "2000.00"
      }
    ]
  },
  "requireApproval": true
}'

Bridge Transfer with Approval

Create a bridge transfer requiring approval:
curl --request POST \
     --url https://production.hifibridge.com/v2/wallets/bridges \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "source": {
    "chain": "ETHEREUM",
    "currency": "usdc"
  },
  "destination": {
    "chain": "SOLANA",
    "currency": "usdc"
  },
  "amount": "5000.00",
  "requireApproval": true
}'

Webhook Events

Listen for approval events:
  • TRANSFER.APPROVAL.PENDING - Transfer requires approval
  • TRANSFER.APPROVAL.APPROVED - Transfer has been approved
  • TRANSFER.APPROVAL.REJECTED - Transfer has been rejected
I