Move money to and from wallets

Create Wallet

Create a new custodial wallet for an individual user or for your company treasury.

  • All wallet users must have a country on file.
  • U.S. users must also have their state recorded.
  • To create a wallet for yourself, first create a customer ID that represents your company.

Request

curl --request POST \
     --url https://api.bridge.xyz/v0/customers/{customerId}/wallets \
     --header 'Api-Key: <API Key>' \
     --header 'Idempotency-Key: <Unique Idempotency Key>' \
     --header 'Content-Type: application/json' \
     --data '{
       "chain": "solana"
     }'

Response

{
  "id": "uuid",
  "chain": "solana",
  "address": "the-blockchain-address",
  "created_at": "2024-09-01T02:03:04.567Z",
  "updated_at": "2024-09-01T02:03:04.567Z"
}

💡 Save the wallet id. It’s required for all future transfers or orchestration calls.

⚠️ Do not send tokens directly to this address. Use a Liquidation Address and point it to a wallet endpoint for incoming funds.

💸 Moving money using orchestration

All fund movements into or out of a Bridge wallet must go through orchestration APIs. You can build flexible payment workflows to and from your Bridge wallet using any of the following APIs:

  • Transfers - Move money to and from a Bridge wallet. You can specify a Bridge wallet as a source or destination for a transfer.
  • Liquidation Address - Auto forward funds sent to a crypto address directly to your Bridge wallet. To do so, you can specify a Bridge wallet as the destination for the liquidation address.
  • Virtual Accounts - Automatically convert fiat currency sent to your customer's virtual account and send those funds to a Bridge wallet. Check out Onramp stablecoins using Bridge Wallet & Virtual Account.

Here's an example where of a transfer sending funds to a bridge wallet:

curl --location --request POST 'https://api.bridge.xyz/v0/transfers' \
--header 'Api-Key: <API Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "amount": "10.0",
  "on_behalf_of": "cust_alice",
  "developer_fee": "0.5",
  "source": {
    "payment_rail": "wire",
    "currency": "usd",
  },
  "destination": {
    "payment_rail": "solana",
    "currency": "usdb",
    "bridge_wallet_id": "the-wallet-uuid"
  },
}'

Get Wallet Balance

curl --request GET  
     --url <https://api.bridge.xyz/v0/customers/customerId/wallets/walletId>  
     --header 'Api-Key: <API Key>'  
     --header 'accept: application/json'
{  
  "id": "uuid",  
  "chain": "solana",  
  "address": "the-blockchain-address",  
  "created_at": "2024-09-01T02:03:04.567Z",  
  "updated_at": "2024-09-01T02:03:04.567Z",  
  "balances": [  
    {
      "balance": "123.456789",
      "currency": "usdb",  
      "chain": "solana",
      "contract_address": "ENL66PGy8d8j5KNqLtCcg4uidDUac5ibt45wbjH9REzB",  
    }  
  ]  
}

Get Total Wallet Balance

curl --request GET  
     --url <https://api.bridge.xyz/v0/wallets/total_balances>  
     --header 'Api-Key: <API Key>'  
     --header 'accept: application/json'
[  
  {  
    "balance": "123.456789",
    "currency": "usdb",  
    "chain": "solana",
    "contract_address": "ENL66PGy8d8j5KNqLtCcg4uidDUac5ibt45wbjH9REzB"
  }  
]

List All Wallets

  • Allows you to get all the wallets associated with your developer id.

List all wallets

Get all Bridge Wallets

curl --request GET \
     --url https://api.bridge.xyz/v0/wallets \
     --header 'Api-Key: <API Key>'

List all wallets for a specific customer

Get all Bridge Wallets for a customer

curl --request GET \
     --url https://api.bridge.xyz/v0/customers/{customerId}/wallets \
     --header 'Api-Key: <API Key>'