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-KeyYour merchant API key
Content-Typeapplication/json
Acceptapplication/json

Body

ParameterTypeRequiredDescription
partnerintegerSteam trade partner ID (minimum: 8)
tokenstringSteam trade token (exactly 8 characters)
gamestringGame code: csgo, rust, dota2, tf2
namestring✅*Item market name
asset_idstring✅*Specific asset ID to purchase
merchant_tx_idstringYour unique transaction/order ID
max_pricenumberMaximum price you're willing to pay (USD)

* Provide either (game + name) or (game + asset_id).

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 (only present when status is failed)
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.idstringAsset ID
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_changedItem price changed since lookup
item_not_availableRequested item is no longer available
item_specified_price_not_foundNo item found within the specified max_price
provider_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
403invalid IP: <ip>Request IP not in whitelist
500internal errorSomething went wrong on our side

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