Crypto-as-a-Service: Fund Go Account with Fiat - JavaScript

Fund your Go Account with fiat currency using the BitGo JavaScript SDK. Includes flows for Wire transfer and ACH deposit. See the Guide.

  1. In the Wire tab: get bank account details for BitGo and a memo ID. All wire transfers must include a memo ID. This ID links your deposit to your account. The response includes BitGo's bank account information and the memo ID you must include in your wire transfer.

    API Reference

  2. In the Wire tab: depositing fiat currency from your bank account requires using your bank app or API to initiate a wire deposit. Review your bank documentation or contact them to learn more. Ensure to include the memo ID from Step 1 in order to prevent delays in accrediting deposits to your Go Account.

    The balance of fiat currency in your Go Account updates with the deposited amount. The deposited balance is immediately available for trades. You can verify successful deposits with the Get Account Balance endpoint.

  3. In the ACH tab: ACH deposits take 1–2 business days to settle, while digital assets can transfer almost instantly. Therefore, BitGo requires you to pre-fund a fiat reserve to cover potential unauthorized return claims (fraud) from your end-users. You set up your fraud reserve using the Go Account in the parent enterprise.

    Contact your BitGo Customer Success Manager (CSM) to designate an enterprise in your organization as your parent enterprise. Deposit a minimum of $25,000 into the parent Go Account. As your ACH deposit volume grows, maintain 25% of your peak 2-day volume as your reserve balance. If the balance dips due to fraud or unauthorized returns, you must replenish it to the required level within 5 business days.

  4. In the ACH tab: the transfer limit is the amount you can deposit using ACH per calendar day and resets every day at 12am EST. In the test environment, the limit for ACH deposits is $2,500/day and $10,000/week per enterprise.

    API Reference

  5. In the ACH tab: get the ACH agreement for a BitGo-approved bank by passing the bank ID. You can view all your bank accounts by calling the List Bank Accounts endpoint. The query parameter amount is in base units (cents), but the agreement shows an amount in dollars.

    API Reference

  6. In the ACH tab: if you agree to the ACH agreement, you can proceed to initiate an ACH deposit. The response includes a transaction ID that you can use to track the deposit status.

    API Reference

// 1. Get Deposit Details
const BitGoJS = require('bitgo');

const bitgo = new BitGoJS.BitGo({
  accessToken: '<SERVICE_USER_ACCESS_TOKEN>',
  env: 'test',
});

async function getDepositDetails() {
  const goAccountId = '<GO_ACCOUNT_ID>';
  const currency = 'tfiatusd';
  
  const depositInfo = await bitgo.get(
    `/api/v2/bankaccounts/deposit/info?goAccountId=${goAccountId}&currency=${currency}`
  ).send();

  console.log('Deposit Info:', depositInfo);
  return depositInfo;
}

getDepositDetails().catch(console.error);
// 2. Deposit Fiat Currency via Wire
// Use your bank's app or API to initiate a wire transfer
// Include the memo ID from Step 1 in your wire transfer
// Refer to your bank's documentation for wire transfer instructions
Response
// Wire: Get Deposit Details Response
{
    "memoId": "JVAIBEMHXT",
    "bankAccounts": [
        {
            "id": "64ae84bdb25d190007958872b5104a7f",
            "idHash": "cd303c82c4c74abf",
            "currency": "tfiatusd",
            "accountNumber": "5766400",
            "token": "tusd",
            "name": "Customers Bank ",
            "shortCountryCode": "US",
            "enterpriseId": "5bd795f1bf7435a503a0a647ec5d3b3d",
            "trustOrg": "BitGo Trust",
            "ownerName": "BitGo Trust Company, Inc",
            "verificationState": "approved",
            "createdAt": "2024-03-07T17:10:57.146Z",
            "ownerAddressLine1": "6216 S Pinnacle Pl Ste #101",
            "ownerAddressCityLocality": "Sioux Falls",
            "ownerAddressStateProvince": "SD",
            "ownerAddressPostalCode": "57108",
            "ownerAddressCountryCode": "US",
            "bankAddressLine1": "40 General Blvd Suite #200",
            "bankAddressCityLocality": "Malvern",
            "bankAddressStateProvince": "PA",
            "bankAddressPostalCode": "19355",
            "bankAddressCountryCode": "US",
            "virtualDepositOnly": false,
            "type": "wire",
            "routingNumber": "031302971",
            "accountType": "unknown",
            "fee": {
                "amount": "1600",
                "individualFees": [
                    {
                        "type": "static",
                        "amount": "1600"
                    }
                ]
            }
        }
    ]
}

// ACH: Get Transfer Limit Response
{
  "id": "string",
  "maximumTransferAllowed": "string",
  "maximumTransferAllowedBase": 0,
  "noLimit": true,
  "transferDirection": "in",
  "transferType": "ach-us"
}

// ACH: Get ACH Agreement Response
{
  "achAuthorizationLanguage": {
    "reviewAuthorization": "string",
    "accountInformation": {
      "accountHolderName": "string",
      "bankName": "string",
      "accountNumber": "string",
      "routingNumber": "string",
      "accountType": "checking"
    },
    "authorizationDetails": "string",
    "acknowledgment": "string"
  }
}

// ACH: Initiate ACH Deposit Response
{
  "txId": "string"
}