Skip to main content

POST /client/trading/withdraw

Initiates a withdrawal (buy) trade. AssetPay purchases the item from a marketplace supplier and delivers it to the user via Steam trade offer. Authentication: Client Token (Authorization header)

Request

POST https://api.assetpay.gg/client/trading/withdraw
Content-Type: application/json
Authorization: CLIENT_TOKEN

{
  "items": [
    {
      "itemId": "e5f6g7h8-i9j0-1234-abcd-ef5678901234",
      "price": 45.00
    }
  ],
  "game": "730",
  "externalId": "wd_unique_789"
}

Body Parameters

ParameterTypeRequiredDescription
itemsarrayYesItems to withdraw (min 1, max 50)
items[].itemIdstringYesSpecific listing ID from /client/market/item (the id field of a listing — a UUIDv8 for CS2, compound for Rust). 5–256 chars.
items[].pricenumberYesPurchase price in USD (max $100,000). Must equal the current price returned by /client/market/item.
gamestringNo"730" or "252490". Defaults to "730".
externalIdstringNoYour unique tracking ID (max 128 chars). Must be unique per trade.

Response

{
  "requestId": "...",
  "success": true,
  "data": {
    "id": "trade-uuid",
    "type": "withdraw",
    "source": "client",
    "status": "initiated",
    "game": "730",
    "externalId": "wd_unique_789",
    "merchantId": "merchant-uuid",
    "clientUserId": "client-uuid",
    "clientSteamID": "76561198012345678",
    "clientTradeUrl": "https://steamcommunity.com/tradeoffer/new/?partner=...",
    "items": [
      {
        "id": "e5f6g7h8-i9j0-1234-abcd-ef5678901234",
        "appid": 730,
        "tradable": true,
        "amount": 1,
        "status": "initiated",
        "offer": {
          "price": 45.00
        }
      }
    ],
    "totalPrice": 45.00,
    "createdAt": "2026-03-04T10:00:00.000Z",
    "updatedAt": "2026-03-04T10:00:00.000Z"
  }
}
The response is a full Trade object. Each withdrawal item carries its own status field that mirrors the trade-level status as it progresses. On a freshly initiated withdraw the items only carry the data you submitted (itemId, offer.price) — Steam-side fields like name, marketHashName, type, and iconUrl are omitted until AssetPay has fetched them from the marketplace. They populate on subsequent state changes; poll GET /client/trades/{id} or rely on callbacks for the resolved per-item view.

How Balance Approval Works

After this endpoint is called, AssetPay sends an initiated callback to your backend before purchasing anything. Your backend checks the user’s balance, deducts it, and responds with 2xx to approve. If the balance is insufficient, respond with 4xx (e.g. 402 Payment Required) to reject the trade. See the Withdrawals guide for details.
Withdrawals require your merchant account to have an active callback URL configured. Calling this endpoint without one immediately fails with MERCHANT_NO_CALLBACK_URL (1705).

Rate Limits

Merchant StatusLimit
Verified500 requests / min
Unverified5 requests / min
Shared across all clients of the same merchant.

Errors

CodeKeyWhen
1EXTERNAL_ID_EXISTSThe externalId is already in use
2MISSING_ITEMSEmpty items array
8TOO_MANY_ITEMSMore than 50 items
9ITEMS_UNAVAILABLEItems no longer available on market
11PRICE_CHANGEDOffer price changed since fetch
12MERCHANT_BALANCE_LOWYour merchant balance can’t cover this withdrawal
13INVALID_TRADEURLUser’s trade URL is invalid
14LISTING_NOT_FOUNDMarketplace listing not found
15LISTING_PRICE_INVALIDListing has invalid price
16INVALID_LISTING_IDInvalid listing ID format
20WITHDRAW_IN_PROGRESSAnother withdrawal is already processing for this user
1010NO_BOTS_AVAILABLENo Steam bots online; retry shortly
1011FLEET_DEGRADEDSteam fleet degraded; retry shortly
1601INVALID_AMOUNTOne of the offer amounts was zero or negative
1705MERCHANT_NO_CALLBACK_URLMerchant has no active callback URL configured