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.co/client/trading/withdraw
Content-Type: application/json
Authorization: CLIENT_TOKEN

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

Body Parameters

ParameterTypeRequiredDescription
itemsarrayYesItems to withdraw (min 1, max 50)
items[].itemIdstringYesItem ID from market data (5-256 chars)
items[].marketnumberYesMarketplace source (from the item’s market field)
items[].offer.pricenumberYesPurchase price in USD (max $100,000)
items[].offer.referencestringYesOffer reference from market data (1-256 chars)
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",
    "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-...",
        "name": "AWP | Asiimov",
        "marketHashName": "AWP | Asiimov (Field-Tested)",
        "type": "Sniper Rifle",
        "iconUrl": "IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdEHOQ6UFc5FT_0NqFMOBBN-s...",
        "appid": 730,
        "contextid": 2,
        "tradable": true,
        "offer": {
          "price": 45.00,
          "reference": "ref_market_789",
          "delivery": "normal"
        },
        "market": 1,
        "purchaseStatus": "INITIATED"
      }
    ],
    "totalPrice": 45.00,
    "createdAt": "2026-03-04T10:00:00.000Z",
    "updatedAt": "2026-03-04T10:00:00.000Z"
  }
}
The response is a full ITrade object. Withdrawal items include market and purchaseStatus fields.

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 200 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.

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
14INVALID_TRADEURLUser’s trade URL is invalid
15LISTING_NOT_FOUNDMarketplace listing not found
16LISTING_PRICE_INVALIDListing has invalid price
17INVALID_LISTING_IDInvalid listing ID format