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
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Items to withdraw (min 1, max 50) |
items[].itemId | string | Yes | Item ID from market data (5-256 chars) |
items[].market | number | Yes | Marketplace source (from the item’s market field) |
items[].offer.price | number | Yes | Purchase price in USD (max $100,000) |
items[].offer.reference | string | Yes | Offer reference from market data (1-256 chars) |
game | string | No | "730" or "252490". Defaults to "730". |
externalId | string | No | Your unique tracking ID (max 128 chars). Must be unique per trade. |
Response
market and purchaseStatus fields.
How Balance Approval Works
After this endpoint is called, AssetPay sends anINITIATED 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 Status | Limit |
|---|---|
| Verified | 500 requests / min |
| Unverified | 5 requests / min |
Errors
| Code | Key | When |
|---|---|---|
| 1 | EXTERNAL_ID_EXISTS | The externalId is already in use |
| 2 | MISSING_ITEMS | Empty items array |
| 8 | TOO_MANY_ITEMS | More than 50 items |
| 9 | ITEMS_UNAVAILABLE | Items no longer available on market |
| 11 | PRICE_CHANGED | Offer price changed since fetch |
| 12 | MERCHANT_BALANCE_LOW | Your merchant balance can’t cover this withdrawal |
| 14 | INVALID_TRADEURL | User’s trade URL is invalid |
| 15 | LISTING_NOT_FOUND | Marketplace listing not found |
| 16 | LISTING_PRICE_INVALID | Listing has invalid price |
| 17 | INVALID_LISTING_ID | Invalid listing ID format |