Wallets
Create a Wallet

Create a wallet

Provisions a reusable address you can hand out repeatedly — for a customer balance, a recurring subscriber, or any long-lived deposit destination. Unlike a collection, an API wallet does not expire and accepts any number of deposits.

POST
https://api-prod.useknit.io/api/v1/wallets
Scopewallets:writeAuthBearer token

Supported networks

NetworkIdentifier
PolygonMATIC_MAINNET
Polygon Amoy (testnet)MATIC_AMOY
BNB Smart ChainBSC_MAINNET
EthereumETHEREUM_MAINNET
BitcoinBITCOIN_MAINNET
TronTRON_MAINNET

Body

Provide either network or networks — not both.

networkstringoptional

A single network identifier. Required unless networks is supplied.

networksstring[]optional

One or more network identifiers, for an address usable across compatible chains. Required unless network is supplied; must contain at least one entry.

⚠️

Sending network and networks in the same request is a validation error. Pick one form.

Request

Single network
curl -X POST "https://api-prod.useknit.io/api/v1/wallets" \
  -H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "network": "MATIC_MAINNET" }'
Multiple networks
curl -X POST "https://api-prod.useknit.io/api/v1/wallets" \
  -H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "networks": ["MATIC_MAINNET", "BSC_MAINNET", "ETHEREUM_MAINNET"] }'

Response

Returns 201 with the new wallet.

201 Created
{
  "statusCode": 201,
  "message": "Wallet created successfully",
  "data": {
    "id": "d95143d2-c076-49da-b121-b3beed054bf3",
    "businessId": "a2667393-2c6c-43c9-a288-6167e2b2b591",
    "network": "MATIC_MAINNET",
    "networkId": "MATIC_MAINNET",
    "networks": ["MATIC_MAINNET"],
    "address": "0x1adb0a39bde00fa0957e519584cb5c51fefcb37f",
    "isActive": true,
    "createdAt": "2024-02-26T13:59:19.000000Z",
    "updatedAt": "2024-02-26T13:59:19.000000Z"
  },
  "success": true
}
idstring

Use this in every subsequent wallet request.

addressstring

The deposit address. Safe to display and reuse.

networkstring

The wallet's primary network. When you supplied networks, this is the first entry.

networksstring[]

Every network the address is usable on.

What happens on a deposit

Deposits into an API wallet are recorded as wallet transactions and credited to your API account, so the funds are immediately available to payouts. A WALLET_FUNDING_SUCCESSFUL webhook is delivered for each confirmed deposit.

Errors

StatusCause
401Missing or invalid token, IP not allow-listed, or missing wallets:write
400Neither network nor networks was supplied, both were supplied, or a network identifier is not supported