Skip to content

Integration with UI (Redirect Flow)

The simplest way to integrate Skinslink. Create a deposit intent, redirect the user, and listen for webhooks.

Flow Overview

Your Platform                     Skinslink
─────────────                     ─────────
     │                                 │
     │  1. POST /merchant/create-intent│
     │ ──────────────────────────────► │
     │                                 │
     │  { id, merchant_tx_id, url }    │
     │ ◄────────────────────────────── │
     │                                 │
     │  2. Redirect user to `url`      │
     │ ──────────────────────────────► │
     │                                 │
     │     User selects items,         │
     │     confirms trade on           │
     │     Skinslink deposit page      │
     │                                 │
     │  3. Webhook: trade status       │
     │ ◄────────────────────────────── │
     │                                 │
     │  4. User redirected back        │
     │ ◄────────────────────────────── │

Step 1: Create a Deposit Intent

bash
curl -X POST https://api.skinslink.com/api/v1/merchant/create-intent \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_tx_id": "order-12345",
    "result_url": "https://yoursite.com/deposit/complete",
    "success_url": "https://yoursite.com/deposit/success",
    "fail_url": "https://yoursite.com/deposit/failed"
  }'

Response:

json
{
  "success": true,
  "message": "Deposit intent created successfully",
  "data": {
    "id": 42,
    "merchant_tx_id": "order-12345",
    "url": "https://skinslink.com/deposit/d66pbg9uvduc73ba5n30"
  }
}

Parameters

ParameterTypeRequiredDescription
merchant_tx_idstringYour unique transaction ID
gamestringGame code: csgo, rust, dota2, tf2. If omitted, user selects on deposit page
partnerintegerSteam trade partner ID. If omitted, user enters on deposit page
tokenstringSteam trade token. If omitted, user enters on deposit page
result_urlstringWebhook URL — overrides your merchant-level webhook URL for this deposit
success_urlstringURL to redirect on success
fail_urlstringURL to redirect on failure
custom_currencystringCustom currency code (1–4 chars). Requires all 3 currency fields
custom_currency_multipliernumberCurrency multiplier (0.5–2.0)
custom_currency_ratenumberCurrency exchange rate (≥ 0.1)

TIP

You can pre-fill game, partner, and token if you already have the user's Steam trade URL. Otherwise, the deposit page will ask the user to provide them.

Step 2: Redirect the User

Take the url from the response and redirect the user:

javascript
// Express.js example
app.post('/deposit', async (req, res) => {
  const intent = await createDepositIntent({
    merchant_tx_id: generateOrderId(),
    result_url: 'https://yoursite.com/deposit/complete',
  })

  res.redirect(intent.data.url)
})

The user will see the Skinslink deposit page where they can:

  • Enter their Steam trade URL (if not pre-filled)
  • Browse their inventory with real-time pricing
  • Select items and confirm the deposit

Step 3: Receive Webhook

When the trade status changes, Skinslink sends a webhook to your configured callback URL.

→ See Webhooks for payload format and setup.

Step 4: Check Status (Optional)

You can also poll for status:

bash
curl "https://api.skinslink.com/api/v1/merchant/deposit/status?merchant_tx_id=order-12345" \
  -H "X-Api-Key: your-api-key"

→ See Deposit Status for full response format.