Skip to main content

Prerequisites

Before you begin, make sure you have:
  1. A User with USD Rail enabled
  2. Valid payment method (bank account, card, etc.)

Step 1: Create Account

Create a US account for the offramp: POST /v2/users/{userId}/accounts
curl --request POST \
     --url https://production.hifibridge.com/v2/users/{userId}/accounts \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "rail": "onramp",
  "type": "us",
  "accountHolder": {
    "name": "John Smith",
    "type": "individual",
    "address": {
      "city": "New York",
      "country": "US",
      "postalCode": "10001",
      "addressLine1": "123 Main St",
      "addressLine2": "Apt 4B",
      "stateProvinceRegion": "NY"
    },
    "dateOfBirth": "1990-05-15",
    "idNumber": "123-45-6789",
    "nationality": "USA"
  },
  "us": {
    "transferType": "ach",
    "accountType": "Checking",
    "currency": "usd"
  }
}'
Response:
{
  "id": "acc_123456789",
  "type": "us",
  "rail": "onramp",
  "status": "ACTIVE",
  "accountHolder": {
    "name": "John Smith",
    "type": "individual"
  },
  "us": {
    "transferType": "ach",
    "accountType": "Checking",
    "currency": "usd"
  },
  "createdAt": "2025-02-03T17:15:31.927121+00:00"
}

Step 2: Create Offramp

Create the offramp transaction directly: POST /v2/offramps
curl --request POST \
     --url https://production.hifibridge.com/v2/offramps \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "requestId": "string",
  "purposeOfPayment": "gift",
  "isInstant": false,
  "source": {
    "amount": 1000,
    "currency": "usdc",
    "transferType": "crypto",
    "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "destination": {
    "amount": 1000,
    "currency": "usd",
    "chain": "POLYGON_AMOY",
    "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "externalWalletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "virtualAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "fee": {
    "type": "FIX",
    "value": 0
  }
}'
Response:
{
  "transferType": "OFFRAMP",
  "transferDetails": {
    "id": "b26927e6-2771-423c-af44-a3c7a3e815c5",
    "requestId": "e1047def-6942-4fd7-be04-e62eb41813b6",
    "createdAt": "2025-02-03T17:15:31.927121+00:00",
    "updatedAt": "2025-02-03T17:15:35.882+00:00",
    "status": "AWAITING_FUNDS",
    "failedReason": null,
    "source": {
      /* source wallet details */
    },
    "destination": {
      /* destination account details */
    },
    "receipt": {
      /* transaction receipt */
    },
    "developerFee": null,
    "quoteInformation": {
      /* exchange rate and fees */
    }
  }
}

Refresh Quote

While the quote is still valid, you can refresh it to get updated rates: POST /v2/offramps/{transferId}/quote/refresh
curl --request POST \
     --url https://production.hifibridge.com/v2/offramps/{transferId}/quote/refresh \
     --header 'accept: application/json'
Info: You can only refresh quotes while the offramp is in AWAITING_FUNDS status and before the quote expires.

Step 3: Accept Quote

Once you’re satisfied with the quote, accept it to proceed with the offramp: POST /v2/offramps/{transferId}/quote/accept
curl --request POST \
     --url https://production.hifibridge.com/v2/offramps/{transferId}/quote/accept \
     --header 'accept: application/json'
Info: Once you accept the quote, you cannot refresh it again. Make sure you’re ready to proceed with the withdrawal.

Step 4: Process Withdrawal

The offramp will be processed automatically once the quote is accepted. Monitor the transaction status.

Step 5: Confirm Transaction

Listen for Webhooks

Set up webhook notifications to track status changes: Webhook Events:
  • OFFRAMP.CREATE - Creation for offramps
  • OFFRAMP.UPDATE - Updates for offramps

Check Bank Account

Verify the USD has been received in your bank account: GET /v2/users/{userId}/accounts/{accountId}/balance
curl -X GET "https://production.hifibridge.com/v2/users/{userId}/accounts/{accountId}/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"
I