Skip to content

Create Purchase ​

POST /api/v1/merchant/purchase

Creates a skin purchase. Skinslink sends a trade offer with the requested item to the specified Steam account.

Request ​

Headers ​

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

Body ​

ParameterTypeRequiredDescription
partnerinteger✅Steam trade partner ID (minimum: 8)
tokenstring✅Steam trade token (exactly 8 characters)
gamestring✅*Game code: csgo, rust, dota2, tf2
namestring✅*Item market name
asset_idstring✅*Catalogue item ID (items[].id from Available Items or Search Items) to buy exactly that item. Not a Steam asset ID, see Available Items
merchant_tx_idstring—Your unique transaction/order ID. Also the idempotency key — see Idempotency
max_pricenumber—Maximum price you're willing to pay (USD). Inclusive: an item priced exactly at max_price is bought. Use at most 2 decimal places

* Provide either (game + name) or asset_id (game is optional then).

Idempotency ​

merchant_tx_id is your idempotency key. If a purchase with that id already exists for your account, we return that purchase instead of creating a second one — the same response shape, carrying the purchase's current status.

Retries are therefore safe: repeating a request after a timeout, a dropped connection, or any answer you are unsure about can never create a duplicate purchase or charge you twice.

Requests sent without merchant_tx_id are not deduplicated — each one creates a new purchase.

WARNING

Use a fresh merchant_tx_id for every new order. Reusing the id of an earlier order returns that earlier order, even when the request body now asks for a different item.

Response ​

json
{
  "success": true,
  "message": "Purchase created successfully",
  "data": {
    "id": 178,
    "merchant_tx_id": "order-12345",
    "status": "pending",
    "steam_id": "76561198338314767",
    "date": "2026-03-24T10:30:00Z",
    "amount": 45.99,
    "item": {
      "id": "38029384123",
      "name": "AK-47 | Redline (Field-Tested)",
      "price": 45.99,
      "image_url": "https://steamcommunity-a.akamaihd.net/economy/image/class/730/..."
    }
  }
}

Response Fields ​

FieldTypeDescription
idintegerPurchase ID
merchant_tx_idstringYour transaction ID (only present if provided in request)
statusstringPurchase status (see Purchase Status)
fail_reasonstringFailure reason (present when status is failed, canceled or reverted, see Fail Reasons)
steam_idstringUser's Steam ID (64-bit, as string)
steam_namestringUser's Steam display name (only present if available)
steam_avatar_urlstringUser's Steam avatar URL (only present if available)
amountnumberPurchase amount (USD)
trade_offer_idstringSteam trade offer ID (only present if available)
datestringPurchase creation timestamp (ISO 8601)
itemobjectPurchased item details (only present if available)
item.idstringCatalogue item ID, see Available Items
item.namestringItem market name
item.pricenumberItem price (USD)
item.image_urlstringSteam CDN image URL

INFO

Optional fields (merchant_tx_id, fail_reason, steam_name, steam_avatar_url, trade_offer_id, item) are omitted from the response when not available — they will not appear as null.

Fail Reasons ​

ReasonDescription
insufficient_balanceNot enough balance in your merchant account
price_changedThe item's price moved since your catalogue lookup, including above your max_price
item_soldThe specific item was sold or withdrawn after your catalogue snapshot — refresh the catalogue and buy another listing
item_not_availableNo matching item is currently available to buy
duplicate_purchaseThe same item is already held by another of your in-progress purchases
item_specified_price_not_foundNo item found within the specified max_price
service_unavailableService temporarily unavailable

Example ​

bash
curl -X POST https://api.skinslink.com/api/v1/merchant/purchase \
  -H "X-Api-Key: your-api-key" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "partner": 123456789,
    "token": "AbCdEfGh",
    "game": "csgo",
    "name": "AK-47 | Redline (Field-Tested)",
    "merchant_tx_id": "order-12345"
  }'

After Creating a Purchase ​

  1. Track the purchase status via webhooks or poll Purchase Status
  2. User accepts the trade offer in Steam
  3. Purchase moves to completed once the trade is finalized

TIP

If the purchase fails immediately (e.g., insufficient_balance), the response will have status: "failed" with the fail_reason field populated.

Errors ​

StatusMessageCause
400invalid request bodyMalformed JSON
400validation errorMissing or invalid fields (see data array for details)
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
500internal errorSomething went wrong on our side

For trade link and Steam account validation codes, see Purchase Errors.