Skip to content

Create Deposit ​

POST /api/v1/merchant/create-deposit

Creates a deposit with specific Steam items. Used in the API-only integration flow after fetching inventory.

Request ​

Headers ​

HeaderRequiredDescription
X-Api-Key✅Your merchant API key
Content-Type✅application/json

Body ​

ParameterTypeRequiredDescription
merchant_tx_idstring✅Your unique transaction/order ID
gamestring✅Game code: csgo, rust, dota2, tf2
partnerinteger✅Steam trade partner ID
tokenstring✅Steam trade token
asset_idsstring[]✅Item IDs from the inventory response. Must not exceed max_items (see Get Inventory)
result_urlstring—Webhook URL — overrides your merchant-level webhook URL for this deposit (must be valid URL)
success_urlstring—Success redirect URL (must be valid URL)
fail_urlstring—Failure redirect URL (must be valid URL)
custom_currencystring—Custom currency code (1–16 chars, e.g. BTC, EUR). Requires all 3 currency fields
custom_currency_multipliernumber—Currency multiplier (0.5–2.0)
custom_currency_ratenumber—Currency exchange rate (≥ 0.1, up to 4 decimal places)
min_pricesobject—Per-item price floor in USD, keyed by asset_id (e.g. {"38029384123": 19.50}). If an item's price at deposit time is below its floor (compared in whole cents), the deposit is rejected with item_specified_price_not_found and nothing is sent to the user. Entries ≤ 0 are ignored. See Price Lock
from_previewboolean—Credit the deposit at the prices shown by Deposit Preview. Defaults to false. Requires preview access on your account; without it the flag is ignored and the deposit runs the regular flow. See Deposit at Preview Prices

Pricing & Price Lock ​

The deposit amount is derived from the inventory snapshot of your most recent Get Inventory call for the same Steam account (partner + token). That snapshot is cached for 5 minutes.

  • If you call create-deposit more than 5 minutes after fetching the inventory, the request fails with inventory_reload — re-fetch the inventory and retry.
  • Every Get Inventory call replaces the snapshot, including a refresh with Cache-Control: no-cache. Show the user the prices from your latest call.
  • Without min_prices, the credited amount is the price cached at deposit time, not the moment you displayed it to the user.

Protect against price drift with min_prices

Pass the optional min_prices map (keyed by asset_id, in USD) to set a per-item floor. We recommend sending exactly the per-item prices from Get Inventory that you showed the user: prices are compared in whole cents, so a cart priced as shown always goes through. If any item's price at deposit time is below its floor, the deposit is rejected with item_specified_price_not_found and nothing is sent to the user — so you are never credited less than you displayed. The deposit is recorded as failed with that fail_reason. Prices are USD regardless of any custom_currency fields.

The rejection carries the cart at its current prices, so you can show the user the new amount right away:

json
{
  "success": false,
  "message": "item_specified_price_not_found",
  "data": {
    "asset_id": "38029384123",
    "min_price": 0.99,
    "price": 0.69,
    "items": [
      { "asset_id": "38029384123", "price": 0.69 },
      { "asset_id": "38029384124", "price": 12.40 }
    ]
  }
}

asset_id, min_price and price name the first item that fell below its floor; items is every item of the cart at the price it would be credited now. If the user agrees, send create-deposit again with a new merchant_tx_id and the new prices in min_prices.

Alternative: hash-name flow

Get Prices → Create Deposit by Hash Name offers the same per-item min_price protection plus a per-transaction quote snapshot (by id), so the quote cannot be overwritten by a concurrent inventory fetch.

Deposit at Preview Prices (from_preview) ​

Access on request

This flow is enabled per merchant account, together with Deposit Preview itself. Until we enable it for yours, from_preview is ignored: the deposit is still created, but through the regular flow described above — including its 5-minute Get Inventory snapshot rule. Ask your account manager to turn it on.

Set from_preview: true to credit the deposit at the prices Deposit Preview shows — the flow for carts built from the preview:

  1. Call Deposit Preview and show the user our prices.
  2. The user picks items ("the cart").
  3. Call create-deposit with the picked asset_ids and from_preview: true.

The credited amount equals the current preview pricing of exactly those items — if a price has updated since the user saw it, the current price is credited. No prior Get Inventory call is required, and the 5-minute inventory_reload snapshot rule does not apply.

Rejections ​

All rejections below happen before anything is created: no deposit record, no webhook, and your merchant_tx_id is not consumed — retry with the same ID.

ErrorMeaningRetry the same cart?
price_changedSome items can no longer be accepted — listed in data.rejectedNo — drop the rejected items first
preview_unavailableOur preview pricing is temporarily unavailableYes, a bit later
cart_not_acceptedWe cannot accept this cart as a whole right nowNo — change the cart

price_changed — an item in the cart can no longer be accepted. data carries the current pricing of the same cart, in the Deposit Preview response shape, and data.rejected names every item that blocks it — re-show these prices, drop the rejected items, and retry. No extra preview call is needed. Re-sending the cart with the rejected items still in it returns the same error:

json
{
  "success": false,
  "message": "price_changed",
  "data": {
    "items": [
      { "id": "38029384123", "name": "AK-47 | Redline (Field-Tested)", "price": 12.10 }
    ],
    "rejected": [
      { "id": "51819053033", "reason": "not_in_inventory" }
    ],
    "total": 1,
    "sum": 12.10,
    "game": "csgo",
    "max_items": 50
  }
}
rejected[].reasonMeaning
not_in_inventoryThe asset ID is not in the user's inventory — drop it from the cart
not_quotedWe do not accept this item right now — drop it from the cart

data.items lists what we would still credit, with current prices — items in rejected are not part of it.

preview_unavailable — our preview pricing is temporarily unavailable; nothing is wrong with the cart. Retry the same request a bit later, or fall back to the regular Get Inventory → create-deposit flow.

cart_not_accepted — every item is priced, but we cannot accept this cart as a whole at these prices right now. Re-sending the same cart returns the same error: change it — for example, deposit fewer items at once — or fall back to the regular Get Inventory → create-deposit flow.

from_preview vs min_prices

min_prices protects a regular deposit against price drift with a floor you compute yourself. from_preview needs no floor: the cart is credited at our current preview prices.

Response ​

json
{
  "success": true,
  "message": "Deposit processing with selected items",
  "data": {
    "id": 42,
    "merchant_tx_id": "order-12345",
    "status": "active",
    "amount": 36.25,
    "bot_name": "Skinslink Bot #3",
    "bot_steam_id": 76561199012345678,
    "trade_offer_id": "6912345678",
    "trade_offer_expiry_at": "2026-02-16T12:30:00Z",
    "offers": [
      {
        "trade_offer_id": "6912345678",
        "bot_steam_id": "76561199012345678",
        "bot_name": "Skinslink Bot #3",
        "status": "active",
        "trade_offer_expiry_at": "2026-02-16T12:30:00Z",
        "amount": 36.25
      }
    ],
    "success_url": "https://yoursite.com/deposit/success",
    "fail_url": "https://yoursite.com/deposit/failed"
  }
}

Response Fields ​

FieldTypeDescription
idintegerInternal trade ID
merchant_tx_idstringYour transaction ID (echoed back)
statusstringTrade status (active on success, pending while the offer is still being sent, failed on error)
amountnumberTotal deposit amount (USD)
bot_namestring | nullName of the Steam bot sending the offer
bot_steam_idinteger | nullSteam ID of the bot
trade_offer_idstring | nullSteam trade offer ID
trade_offer_expiry_atstring | nullISO 8601 timestamp when the offer expires
offersobject[]Every Steam trade offer of the deposit — several when it is split between bots. Empty while the offers are still being sent (status: pending). See Deposits with Several Trade Offers
success_urlstringSuccess redirect URL (only present if provided in request)
fail_urlstringFailure redirect URL (only present if provided in request)

INFO

Custom currency fields (custom_currency, custom_currency_multiplier, custom_currency_rate, custom_currency_sum) are not included in the create-deposit response. Use Deposit Status to retrieve them once the trade reaches hold or completed status.

Example ​

bash
curl -X POST https://api.skinslink.com/api/v1/merchant/create-deposit \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_tx_id": "order-12345",
    "game": "csgo",
    "partner": 123456789,
    "token": "AbCdEfGh",
    "asset_ids": ["38029384123", "38029384124"]
  }'

To add a per-item price floor, include min_prices in the request body:

json
{
  "merchant_tx_id": "order-12346",
  "game": "csgo",
  "partner": 123456789,
  "token": "AbCdEfGh",
  "asset_ids": ["38029384123", "38029384124"],
  "min_prices": {
    "38029384123": 19.50,
    "38029384124": 4.20
  }
}

After Creating a Deposit ​

  1. Show the trade offer info to the user (bot name, offer ID)
  2. User accepts the trade offer in Steam
  3. Listen for webhooks or poll /merchant/deposit/status for updates

TIP

Store the trade_offer_expiry_at and remind users to accept before expiry. Expired offers are automatically canceled.

Errors ​

StatusMessageCause
400invalid request bodyMalformed JSON
400validation errorMissing or invalid fields (see data array for details). Includes inventory_reload — the inventory price snapshot expired (> 5 min since Get Inventory); re-fetch and retry
400item_specified_price_not_foundAn item's price at deposit time dropped below its min_prices floor. Nothing is sent to the user; data holds the cart at its current prices (see Price Lock). Retry with a new merchant_tx_id
400deposit exceeds the maximum of N items per depositasset_ids has more items than the per-deposit limit — read max_items from Get Inventory. No trade is created; split into smaller deposits
401missing authorization headerX-Api-Key header not provided
401invalid API keyAPI key not found or inactive
403merchant account is disabledMerchant account deactivated
403IP not whitelisted: <ip>Request IP not in whitelist
404not found errorTrade or items not found
409already exist errorDuplicate merchant_tx_id
500internal errorSomething went wrong on our side

→ For domain-specific validation codes (Steam account issues, trade eligibility), see Errors.