SkinsGateway API documentation

Accept skins with one API call, follow every payment with signed webhooks, and send skins out from your balance. REST over HTTPS, JSON in and out.

Introduction

The SkinsGateway API lets your website accept CS2, Dota 2 and Rust skins as payment, and spend the resulting balance on skins for your customers. Every request is made to one base URL:

https://skinsgateway.com/api/v1

You need a SkinsGateway account and a project (one per website). Each project has its own API keys, webhook URL, bonus multiplier and USD balance. You can create projects and keys right away, and live payments work from the first minute.

Authentication

Authenticate every request with your project's credentials in two headers. Find them in the dashboard on your project's page.

HeaderValue
X-Client-IdYour project's client ID, sg_…. Not secret.
X-Client-SecretYour project's secret, sk_live_…. Shown once when created; rotate it in the dashboard. Use the test secret sk_test_… to work in test mode.
Example
curl https://skinsgateway.com/api/v1/project \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Keep the secret on your server. Never put it in browser or app code, and never commit it. If it leaks, rotate it in the dashboard; the old secret stops working at once.

You can restrict a project to your server IPs (single addresses or CIDR ranges) in its settings. Requests from other IPs get 403 ip_not_allowed.

Test modu

Tüm entegrasyonunu gerçek skin ya da para olmadan kur ve test et. Her projenin bunun için canlı anahtarın yanında ikinci bir gizli anahtarı vardır.

KalemTest modunda
SecretX-Client-Secret: sk_test_… aynı client ID ile. Proje sayfasında oluştur ya da yenile.
livemodeHer nesne, liste ve webhook "livemode": false der. Canlı nesneler true der. Test secret'ı canlı nesneleri asla görmez, canlı secret da test nesnelerini asla görmez.
ParaHer projeye ayrı bir test bakiyesi, $1,000.00 ile başlar. Test yatırımları onu artırır, test alımları harcar. Gerçek bakiyenle asla karışmaz.
Ödeme sayfasıpay_url, belirgin bir "Test modu" bandıyla test ödeme sayfasını açar. Her Steam takas bağlantısı çalışır, envanter gerçek fiyatlarla gerçek eşyaları gösterir ve test düğmeleri müşteriyi oynar: kabul et, Trade Protection ile kabul et, onayla, iade et, reddet, süresini doldur.
PazarArama ve alımlar, simüle tekliflerle gerçek eşya adları ve fiyatları kullanır. Yalnızca test modundaki bir aramadan gelen eşya ID'lerini kullan. test_outcome: accepted (varsayılan), waiting_accept, failed, unknown.
Webhook'larAynı olaylar, aynı URL, aynı imza secret'ı. Gövdede "livemode": false var ve istekte ek bir başlık bulunur: SkinsGateway-Test: 1.

Simulate uç noktalarıyla nesneleri sunucundan yönet (yalnızca test secret'ı; canlı secret 403 test_mode_only alır):

Simulate a deposit
curl -X POST https://skinsgateway.com/api/v1/test/deposits/dep_5f0c2a9e7b1d4c3a8e6f0b12/simulate \
  -H "X-Client-Id: sg_…" \
  -H "X-Client-Secret: sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"outcome": "in_hold"}'
  • POST /test/deposits/{id}/simulate, outcome: pending, in_hold, hold_approved, success, fail, hold_returned, expired. Yeni bir yatırıma önce min_amount ve max_amount aralığında örnek eşyalar gönderilir.
  • POST /test/purchases/{id}/simulate, outcome: reconcile, failed, waiting_accept, accepted, canceled, timeout, trade_create_error, rollback_user, rollback_supplier.

Gerçekte olamayacak geçişler 409 invalid_transition alır. Test ve canlı mod ayrı order_id ve custom_id listeleri tutar, yani gerçek sipariş numaralarını test modunda yeniden kullanabilirsin.

Webhook işleyicinde livemode'u kontrol et. Canlı sitende "livemode": false olan bir olay için müşteriye asla bir şey yatırma.

Requests & responses

  • Send POST bodies as JSON with Content-Type: application/json (recommended) or as form fields.
  • Responses are always JSON, with Cache-Control: no-store.
  • Every object has an object field and a prefixed ID: dep_… deposits, pur_… purchases, whd_… webhook deliveries, prj_… projects.
  • Times are unix timestamps in seconds (UTC).
  • Fields ending in _usd are US dollars. amount fields on a deposit are in the deposit's currency.
  • Games are cs2, dota2 and rust.

List endpoints accept page (from 1) and limit (1–100, default 25) and return:

{
    "object": "list",
    "data": [
        "…"
    ],
    "page": 1,
    "limit": 25,
    "total": 123,
    "has_more": true
}

Errors

Errors use HTTP status codes and a JSON body with a stable, machine-readable code, a human message and, for validation errors, the param at fault.

{
    "error": {
        "code": "invalid_request",
        "message": "order_id is required (1–128 printable characters: no spaces, quotes or < >).",
        "param": "order_id"
    }
}
HTTPcodeMeaning
401unauthenticatedCredentials missing.
401invalid_credentialsClient ID or secret is wrong.
402insufficient_fundsBalance too low for a purchase.
403ip_not_allowedRequest IP is not on the project allow-list.
403project_disabledThe project or business is disabled.
403project_inactiveThe project or its business is switched off by our staff.
404not_foundUnknown endpoint or object.
409duplicate_order_idA deposit with this order_id exists.
409not_in_holdOnly in_hold deposits can be approved.
409not_cancelableThe withdrawal was already confirmed by the user.
422invalid_requestA parameter is missing or invalid; see param.
422(network codes)e.g. user_inventory_is_hidden, inventory_is_outdated, user_not_tradable, skin_unavailable.
429rate_limitedToo many requests; see retry_after.
500server_errorOur fault. Logged; safe to retry with the same order_id / custom_id.
502(network codes)The payment network did not answer. Retry later.
503(network codes)The payment network is under maintenance.

Show message to your team, not to customers, and branch on code. New codes may be added; treat unknown ones like the HTTP status they come with.

Rate limits

  • 600 requests per minute per project. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining.
  • 1,200 requests per minute per IP address, across projects.
  • Over the limit you get 429 rate_limited with Retry-After and retry_after (seconds) in the body. Back off and try again.

Don't poll. Use webhooks to learn about status changes, and GET an object only when you need to double-check.

Idempotency

Network calls fail. Your own references make create calls safe to repeat:

  • Deposits: order_id. Unique per project. Repeating a POST /deposits (or /deposits/direct) with the same order_id never creates a second deposit: with the same parameters you get the first one back with 200 and Idempotent-Replayed: true; with different parameters 409 duplicate_order_id, and you fetch the original with GET /deposits?order_id=….
  • Purchases: custom_id. Unique per project. Repeating POST /market/purchases with the same custom_id returns the existing purchase with 200 instead of buying twice.

Use your own order or withdrawal ID for these fields, so a retry after a timeout always lands on the same object.

Deposit flow

  1. Your server calls POST /deposits with your order_id.
  2. You send the customer to pay_url (or open embed_url in an iframe).
  3. The customer pastes their trade link, picks items and sees the value, bonus included.
  4. We send a Steam trade offer: status pending, webhook deposit.pending.
  5. The customer accepts in Steam. The deposit becomes success (credited), or in_hold when Steam Trade Protection applies.
  6. You receive a webhook for every change, and the customer returns to your success_url or fail_url.

Credit your customer on deposit.success or deposit.hold_approved, never on the redirect alone. The redirect carries deposit_id, order_id and status query parameters for display, but only a signed webhook (or a GET /deposits/{id}) is proof.

Deposit statuses

created ──► pending ──► success
   │           ├──────► fail
   │           └──► in_hold ──► success
   │                   ├──────► fail
   │                   └──► hold_approved ──► success
   │                                └──────► hold_returned
   └──► expired
StatusMeaningFinal
createdLink created. The customer has not sent a trade yet.No
pendingTrade offer sent. Waiting for the customer to accept it in Steam.No
in_holdAccepted, but Steam Trade Protection applies. Not credited yet; see hold_until and user_risk. You may release it early.No
hold_approvedReleased early (by you or your automatic rules). Credited, held until the trade is final. Can still become hold_returned or success.No
successCompleted. Credited (net_usd = amount_usd − fee_usd).Yes
failDeclined, cancelled or timed out. See fail_reason. Nothing credited.Yes
hold_returnedSteam returned the items during protection. If it was released early, the credit is reversed.Yes
expiredThe link was never used before expires_at.Yes

Statuses only move forward. A deposit is credited exactly once, when it first reaches success or hold_approved; credited tells you whether it currently counts towards your balance.

Hosted checkout

The simplest integration. Create a deposit, redirect, wait for the webhook.

PHP
<?php
// Create the payment on your server
$ch = curl_init('https://skinsgateway.com/api/v1/deposits');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
        'X-Client-Id: ' . getenv('SKINSGATEWAY_CLIENT_ID'),
        'X-Client-Secret: ' . getenv('SKINSGATEWAY_CLIENT_SECRET'),
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'order_id'    => $order->id,
        'success_url' => 'https://shop.example/orders/' . $order->id,
        'metadata'    => ['user_id' => (string) $user->id],
    ]),
]);
$deposit = json_decode(curl_exec($ch), true);

// Send the customer to the checkout
header('Location: ' . $deposit['pay_url']);
  • Pass trade_url if you already know the customer's trade link; the checkout then opens straight on their inventory.
  • Use min_amount / max_amount to bound the total, for example for a fixed-price product.
  • Links expire after expires_in seconds if unused (default 24 hours), then become expired.

Embedding in an iframe

Load embed_url (pay_url + ?embed=1) in an iframe to keep customers on your page. The checkout is allowed in any frame and works without third-party cookies.

HTML
<iframe src="https://skinsgateway.com/pay/d/9c1e…?embed=1"
        title="Pay with skins"
        style="width:100%;min-height:720px;border:0;border-radius:14px"
        allow="clipboard-write"></iframe>

In embedded mode the checkout does not redirect when it finishes. Instead it posts a message to the parent window on load and at every status change:

{
    "source": "skinsgateway",
    "type": "deposit.status",
    "status": "pending",
    "deposit_id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
    "order_id": "order-10293"
}
JavaScript
window.addEventListener('message', (event) => {
  if (event.origin !== 'https://skinsgateway.com/pay') return;   // only trust our checkout
  const msg = event.data;
  if (!msg || msg.source !== 'skinsgateway' || msg.type !== 'deposit.status') return;

  if (msg.status === 'success' || msg.status === 'in_hold' || msg.status === 'hold_approved') {
    showThankYou(msg.order_id);          // UI only: credit on the webhook
  } else if (msg.status === 'fail' || msg.status === 'expired') {
    showRetry(msg.order_id);
  }
});

Messages are for your UI. Credit the customer only after the matching webhook, which is signed.

The pay button script does all of this for you: it opens the checkout in a window over your page and calls your callbacks.

Direct deposits

Want the item picker inside your own interface? Use the API end to end:

  1. GET /inventory with the customer's trade link returns their items with prices and availability.
  2. Show the items and let the customer choose. Use price_with_bonus if you display your bonus.
  3. POST /deposits/direct with the chosen asset_ids creates the trade offer.
  4. Send the customer to trade_offer_url to accept it in Steam, then follow the webhooks.

If the inventory changed between the two calls, you get 422 inventory_is_outdated: reload it and ask the customer to pick again.

Trade protection

Steam applies Trade Protection to some trades: for up to 7 days the customer can reverse the trade. Such deposits get status in_hold and are not credited yet. You receive deposit.in_hold with:

  • hold_until: when protection ends and the deposit settles on its own;
  • user_risk: risk signals about the customer's Steam account, as provided by the network (only while in_hold).

You can wait, or release it early (by hand, or automatically for trusted customers) so your customer is credited right away. The amount joins your withdrawable balance when the trade is final. If items come back after an early release, the deposit becomes hold_returned, the held credit is reversed (deposit_reversal in your balance history) and you get deposit.hold_returned, so you can take back what you gave the customer.

Early release & customer trust

Every deposit carries customer.trust: high, medium, low or new (plus trust_score, 0–100). It is built from the customer's payment history across all of SkinsGateway and the payment network, their account age and how recently they paid; any trade reversed in the past keeps it at low, and an account that never completed a payment is new.

Turn on automatic early release with POST /project/settings (or on the project page in the dashboard). When a deposit enters in_hold we release it right away if the customer's trust is at least min_trust, its USD value is at most max_amount_usd, and the early-released value still waiting for final trades stays within max_open_usd. You then get deposit.hold_approved exactly as for a manual release, with early_release.by = "auto".

Released early, manually or automatically, the net amount is credited to your project and reserved: it shows in reserved, cannot be paid out or spent on the market, and joins your available balance once the original hold end plus 24 hours has passed without a reversal (early_release.available_at). A reversal inside that window is taken from the reserve. Your balance history shows a reserve and later a release entry for the deposit.

Hosted skin withdrawals

Let your users cash out in skins without building a market UI: create a withdrawal with a USD budget, send the user to url (or load embed_url in an iframe). They paste their trade link, browse the live market up to the budget, pick skins and confirm. We buy each skin with your balance (a normal purchase per skin, purchase.* webhooks included) and send it to their Steam account.

  • Money: the budget is held from your available balance at creation; each skin is charged at its real price; whatever is left goes back when the withdrawal completes, fails, expires or is canceled.
  • Approval: with withdrawals.require_approval on, we send the signed withdrawal.approval_requested event right before buying and wait up to 5 seconds for {"approve": true} (HTTP 200). Check that the user still has the balance on your side.
  • Result: withdrawal.completed (at least one skin delivered), withdrawal.failed, withdrawal.expired, withdrawal.canceled.
  • Test mode: with your sk_test_ secret everything is simulated on your test balance; test_outcome and test_approval pick what happens.
Pay button script
<script src="https://skinsgateway.com/pay/js/v1.js" defer></script>
<button data-skinsgateway-withdraw="https://skinsgateway.com/pay/w/7d2a…">Withdraw skins</button>

<script>
  // or from your own script:
  SkinsGateway.withdraw({
    url: withdrawal.url,
    onSuccess: function () { location.reload(); },   // completed
    onFail: function () { location.reload(); }       // failed, expired or canceled
  });
</script>
Approve a withdrawal (PHP)
// Your webhook endpoint (signature verified first)
if ($event['event'] === 'withdrawal.approval_requested') {
    $ok = cashoutStillValid($event['data']['custom_id'], $event['data']['user_reference']);
    header('Content-Type: application/json');
    echo json_encode(['approve' => $ok]);
    exit;
}

Customer wallets

Run a casino, a case site or a marketplace? Give every user a skin balance without building a ledger: create a customer for each user, then deposits, your own game logic and skin withdrawals all move money in and out of that customer's USD wallet.

  • Always covered: wallet money is held for your users on your balance (it shows in reserved). Payouts, purchases and prize codes only use available, so you can never spend or pay out your users' money by mistake.
  • Deposits: pass customer to POST /deposits (or /deposits/direct). The net lands in the wallet once the trade is final. If you release a deposit early, it shows as pending_usd and joins the wallet when Steam Trade Protection is over, never earlier.
  • Your logic: POST /customers/{id}/transfers debits a bet or credits a win. reference makes every call safe to retry; a debit never takes a wallet below zero.
  • Skins out: pass customer to POST /withdrawals. The budget comes out of the wallet; the unspent budget, the change of a cheaper skin and refunds of skins that were not delivered go back to it.
  • Returned deposits: if a trade comes back after the wallet was credited, the net is taken from the wallet. Below zero, the wallet is frozen (customer.frozen) until a credit brings it back to zero; the difference comes from your balance.
  • Hosted wallet page: POST /customers/{id}/session gives a short-lived link (or embed_url) where the user sees their balance, deposits skins, withdraws skins and reads their history.
  • Webhooks: customer.balance_updated after every change (data.customer + data.transaction) and customer.frozen.
  • Test mode: with your sk_test_ secret customers live on your test balance and everything is simulated.
The whole loop
# 1. A wallet for your user
curl https://skinsgateway.com/api/v1/customers \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" -d '{"reference": "user-42"}'

# 2. Skins in: a deposit for that customer
curl https://skinsgateway.com/api/v1/deposits … -d '{"order_id": "dep-1001", "customer": "cus_2e7b…"}'

# 3. A bet and a win
curl https://skinsgateway.com/api/v1/customers/cus_2e7b…/transfers … -d '{"direction": "debit", "amount_usd": 2.5, "reference": "bet-1"}'
curl https://skinsgateway.com/api/v1/customers/cus_2e7b…/transfers … -d '{"direction": "credit", "amount_usd": 7.1, "reference": "win-1"}'

# 4. Skins out, paid from the wallet
curl https://skinsgateway.com/api/v1/withdrawals … -d '{"custom_id": "cash-1", "budget_usd": 20, "customer": "cus_2e7b…"}'

The customer object

FieldTypeDescription
idstringcus_…
livemodebooleanfalse for test customers.
referencestringYour user id.
steam_id, trade_urlstring|nullUsed for their deposits and skin withdrawals.
statusstringactive or frozen.
frozen_reasonstring|nullnegative (a returned deposit), merchant (you) or staff (us).
balance_usdnumberWhat the user can spend now. Below zero only after a returned deposit.
pending_usdnumberDeposits released early that join the wallet once the trade is final.
metadataobjectYour key/value pairs.
created_at, updated_atintegerUnix seconds.

A customer transaction (ctx_…) has type, amount_usd (+ in, − out), balance_after_usd, your reference, description, the deposit or withdrawal behind it, metadata and created_at.

Entegrasyonlar ve SDK'lar

Mağaza platformları için hazır eklentiler ve kendi kodun için bağımlılıksız küçük kitler. Hepsi bu API ile yatırım oluşturur ve webhook imzalarını senin yerine kontrol eder.

KitKimler içinİndirRehber
WooCommerce WordPress 6.0+, WooCommerce 7.6+, PHP 7.4+, HTTPS skinsgateway-woocommerce.zip 17 KB Kurulum rehberi
PrestaShop PrestaShop 1.7.8+ or 8.x, PHP 7.1+, HTTPS skinsgateway-prestashop.zip 35 KB Kurulum rehberi
OpenCart OpenCart 4.0.x or 3.0.x, PHP 7.1+, HTTPS skinsgateway-opencart.zip 49 KB Kurulum rehberi
CS-Cart CS-Cart or Multi-Vendor 4.3+, PHP 7.1+, HTTPS skinsgateway-cs-cart.zip 23 KB Kurulum rehberi
PHPShop PHPShop 6, PHP 7.1+, HTTPS skinsgateway-phpshop.zip 34 KB Kurulum rehberi
Easy Digital Downloads WordPress 6.0+, Easy Digital Downloads 3.x, PHP 7.1+, HTTPS skinsgateway-easy-digital-downloads.zip 20 KB Kurulum rehberi
WHMCS WHMCS 8+, PHP 7.4+, HTTPS skinsgateway-whmcs.zip 10 KB Kurulum rehberi
Invision Community Invision Community 4.7 with Commerce, PHP 8.0+, HTTPS skinsgateway-invision-community.zip 30 KB Kurulum rehberi
XenForo XenForo 2.2 or 2.3, PHP 7.2+, HTTPS skinsgateway-xenforo.zip 22 KB Kurulum rehberi
Lineage 2 PHP 8.0+ with curl and PDO, L2J (MySQL / MariaDB) or L2OFF (SQL Server), HTTPS skinsgateway-lineage-2.zip 92 KB Kurulum rehberi
MU Online PHP 8.0+ with curl and PDO, MU database on SQL Server or MySQL, HTTPS skinsgateway-mu-online.zip 91 KB Kurulum rehberi
Metin2 PHP 8.0+ with curl and PDO, Metin2 MySQL database, HTTPS skinsgateway-metin2.zip 90 KB Kurulum rehberi
Ragnarok Online PHP 8.0+ with curl and PDO, rAthena, Hercules or eAthena MySQL database, HTTPS skinsgateway-ragnarok-online.zip 91 KB Kurulum rehberi
World of Warcraft PHP 8.0+ with curl and PDO, TrinityCore, AzerothCore or CMaNGOS, HTTPS skinsgateway-world-of-warcraft.zip 94 KB Kurulum rehberi
PHP SDK PHP 8.0+, ext-curl and ext-json, Composer optional skinsgateway-php-sdk.zip 41 KB Kurulum rehberi
Node.js SDK Node.js 18+, TypeScript optional, No dependencies skinsgateway-node-sdk.zip 16 KB Kurulum rehberi
Python SDK Python 3.9+, No dependencies, Works with any framework skinsgateway-python-sdk.zip 20 KB Kurulum rehberi
Pay button Any website, A server that creates payments, HTTPS https://skinsgateway.com/pay/js/v1.js Kurulum rehberi

Test modu: aynı client ID ile sk_test_ secret'ını kullan. Nesneler o zaman "livemode": false taşır, test webhook'ları da SkinsGateway-Test: 1 başlığını taşır (SDK'larda isTest()).

Ödeme düğmesi

Barındırılan ödeme sayfasını sayfanın üzerinde erişilebilir bir pencerede (ya da popup veya yönlendirmeyle) açar ve ödemenin nasıl sonuçlandığını sayfana bildirir. Bağımlılık yok, sıkı bir Content Security Policy altında çalışır.

HTML
<script src="https://skinsgateway.com/pay/js/v1.js" defer></script>

<!-- pay_url from the deposit your server just created -->
<button data-skinsgateway-pay="https://skinsgateway.com/pay/d/9c1e…"
        data-skinsgateway-success-url="/orders/1001">
  Pay with skins
</button>

Ya da kendi script'inden:

JavaScript
const checkout = SkinsGateway.open({
  url: deposit.pay_url,          // or token: '…' (64 hex characters)
  mode: 'modal',                 // 'modal' (default) | 'popup' | 'redirect'
  onStatus(status, msg) { console.log(status, msg.deposit_id, msg.order_id); },
  onSuccess(msg) { showThankYou(msg.order_id); },   // success, in_hold, hold_approved
  onFail(msg) { showRetry(msg.order_id); },         // fail, expired, hold_returned
  onClose(info) { /* info.status, info.reason: user | success | fail | api */ },
});
// checkout.close();
  • Modal: odak tuzağı olan, Esc ile kapanan ve telefonlarda tam ekran açılan bir pencere. Popup: ayrı bir pencere; tarayıcı engellerse yerine modal açılır.
  • Pencere, son durumdan 2 saniye sonra kapanır. closeDelay (ms) ile değiştir ya da autoClose: false ile kapat.
  • Bildirimsel düğmeler dinleyebileceğin DOM olayları da tetikler: skinsgateway:status, skinsgateway:success, skinsgateway:fail ve skinsgateway:close.
  • Content Security Policy'n script'e ve çerçeveye izin vermeli: script-src https://skinsgateway.com/pay; frame-src https://skinsgateway.com/pay

Tarayıcı mesajları yalnızca senin sayfan içindir. Siparişi, sunucun imzalı webhook'u aldığında onayla.

PHP SDK

PHP 8.0 veya daha yenisi, ext-json ve ext-curl. Composer ile kullan (PSR-4, SkinsGateway namespace) ya da tek dosya skinsgateway.php'yi kopyala. skinsgateway-php-sdk.zip 41 KB

PHP
require __DIR__ . '/skinsgateway.php';      // or Composer's autoloader

$skinsgateway = new \SkinsGateway\Client([
    'client_id'     => getenv('SKINSGATEWAY_CLIENT_ID'),
    'client_secret' => getenv('SKINSGATEWAY_CLIENT_SECRET'),   // sk_live_… or sk_test_…
]);

$deposit = $skinsgateway->deposits->create([
    'order_id'    => 'order-10293',
    'min_amount'  => 25,
    'success_url' => 'https://shop.example/orders/10293',
]);
header('Location: ' . $deposit['pay_url']);

// Also: deposits->retrieve / list / findByOrderId / approve / createDirect, purchases->create / batch /
// cancel / retrieve / list, market->items / search, balance->retrieve / history, webhooks->list / test /
// resend, status(), project(), currencies(), inventory()

Hatalar, API hata gövdesini taşıyan exception'lardır: InvalidRequestException (400/422), AuthenticationException (401), InsufficientFundsException (402), PermissionException (403), NotFoundException (404), ConflictException (409), RateLimitException (429), ServerException (5xx); hepsi getErrorCode() ve getParam() içeren ApiException'dan türer. API'ye ulaşılamazsa NetworkException; GET istekleri ağ hatalarında yeniden denenir.

Node.js SDK

Node.js 18 veya daha yenisi, bağımlılık yok. CommonJS ve ES modülleri, TypeScript tipleri dahil. skinsgateway-node-sdk.zip 16 KB

Shell
npm install ./skinsgateway-node
JavaScript
import { SkinsGateway } from 'skinsgateway';   // or: const { SkinsGateway } = require('skinsgateway')

const skinsgateway = new SkinsGateway({
  clientId: process.env.SKINSGATEWAY_CLIENT_ID,
  clientSecret: process.env.SKINSGATEWAY_CLIENT_SECRET,   // sk_live_… or sk_test_…
});

const deposit = await skinsgateway.deposits.create({ order_id: 'order-10293', min_amount: 25 });
res.redirect(deposit.pay_url);

PHP SDK ile aynı yüzey (camelCase seçenekler). Hatalar: InvalidRequestError, AuthenticationError, InsufficientFundsError, PermissionError, NotFoundError, ConflictError, RateLimitError, ServerError (hepsi status, code, param, body içeren ApiError), NetworkError.

WooCommerce

Klasik ve blok ödeme sayfasına "Skinle öde (CS2, Dota 2, Rust)" ekler. High-Performance Order Storage ile uyumlu. skinsgateway-woocommerce.zip 17 KB

  1. WordPress: Eklentiler > Yeni Ekle > Eklenti Yükle, zip dosyasını seç, etkinleştir.
  2. WooCommerce > Ayarlar > Ödemeler > SkinsGateway: client ID, API secret ve webhook imza secret'ını yapıştır. İsteğe bağlı: test secret'ınla test modu, yönlendirmeli ya da pencereli ödeme, en düşük ve en yüksek sipariş toplamı.
  3. Projenin webhook URL'sini şuna ayarla: https://your-store.example/?wc-api=skinsgateway

Ödeme sırasında eklenti, order_id = sipariş numarası ve min_amount = sipariş toplamı olacak şekilde mağaza para biriminde bir yatırım oluşturur. Sipariş sonra yatırımı izler (her webhook doğrulanır ve yatırım önce API'den yeniden okunur):

YatırmaSipariş
success, hold_approvedÖdendi (processing / completed). Toplamdan azsa inceleme için beklemeye alınır.
in_holdSteam Trade Protection bitene kadar beklemede.
fail, expiredBaşarısız. Müşteri hesabından yeniden ödeyebilir.
hold_returnedİnceleme notuyla beklemede (ödenmediyse başarısız).

WHMCS

Üçüncü taraf bir ödeme modülü: ödenmemiş her faturaya "Skinle öde" düğmesi eklenir. skinsgateway-whmcs.zip 10 KB

  1. WHMCS kök klasörüne çıkar (içinde modules/gateways/… var).
  2. Setup > Payments > Payment Gateways > All Payment Gateways > SkinsGateway: client ID, API secret ve webhook imza secret'ını yapıştır.
  3. Projenin webhook URL'sini şuna ayarla: https://your-whmcs.example/modules/gateways/callback/skinsgateway.php

Düğme sunucunda fatura bakiyesi için bir yatırım oluşturur (order_id INV-<invoice id>) ve müşteriyi yönlendirir. İmzalı webhook geldiğinde modül yatırımı yeniden okur ve ödemeyi işlem ID'si olarak dep_ ID'siyle kaydeder.

Tutarlar: bakiyen USD cinsindendir. Ödemeler fatura para biriminde kaydedilir: yatırım o birimi kullandıysa birebir, yoksa WHMCS kurlarınla çevrilir (kabul etmediğimiz para birimleri için "Convert To For Processing" ayarla). SkinsGateway komisyonu işlem ücreti olarak kaydedilir.

Webhook doğrulama

Her kit SkinsGateway-Signature başlığını sabit sürede kontrol eder ve 5 dakikadan eski imzaları reddeder. Ham gövdeyi ver. Sonra bir şey teslim etmeden önce nesneyi yeniden oku.

PHP SDK
use SkinsGateway\Webhook;
use SkinsGateway\Exception\SkinsGatewayException;

try {
    $event = Webhook::verify(
        file_get_contents('php://input'),
        $_SERVER['HTTP_SKINSGATEWAY_SIGNATURE'] ?? '',
        getenv('SKINSGATEWAY_WEBHOOK_SECRET')                  // whsec_…
    );
} catch (SkinsGatewayException $e) {
    http_response_code(400);
    exit;
}
if ($event->isPaid()) {                                     // deposit.success / deposit.hold_approved
    $deposit = $skinsgateway->deposits->retrieve($event->data['id']);
}
http_response_code(200);
Node.js SDK
import express from 'express';
import { verifyWebhook } from 'skinsgateway';

app.post('/webhooks/skinsgateway', express.raw({ type: 'application/json' }), async (req, res) => {
  let event;
  try {
    event = verifyWebhook(req.body, req.get('SkinsGateway-Signature'), process.env.SKINSGATEWAY_WEBHOOK_SECRET,
      { testHeader: req.get('SkinsGateway-Test') });
  } catch (err) {
    return res.sendStatus(400);
  }
  res.sendStatus(200);
  if (event.isPaid()) {
    const deposit = await skinsgateway.deposits.retrieve(event.data.id);
  }
});
Python
import hashlib, hmac, json, time

def verify_skinsgateway(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> dict:
    parts = [p.split("=", 1) for p in header.split(",") if "=" in p]
    t = next((v for k, v in parts if k.strip() == "t"), "")
    sigs = [v.strip() for k, v in parts if k.strip() == "v1"]
    if not t.isdigit() or not sigs or abs(time.time() - int(t)) > tolerance:
        raise ValueError("bad signature")
    expected = hmac.new(secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    if not any(hmac.compare_digest(expected, s) for s in sigs):
        raise ValueError("bad signature")
    return json.loads(raw_body)

Referans ve OpenAPI

Tam referans, API'nin makinece okunabilir tek bir açıklamasından üretilir. Postman, Insomnia veya kod üretecine aktar ya da yapay zekâ asistanına ver.

Olay kaydı ve canlı akış

Webhook ile gönderdiğimiz her olay, webhook URL'i olmasa bile 30 gün boyunca projenin olay kaydında tutulur. Kesintiden sonra yetişmek için oku ya da bir akışı açık tut ve herkese açık uç nokta olmadan olayları bir saniye içinde al.

Yetiş
curl "https://skinsgateway.com/api/v1/events?after=evt_0b1c2d3e4f5a6b7c8d9e0f1a&type=deposit.success,deposit.hold_returned" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Yanıt
{
    "object": "list",
    "livemode": true,
    "data": [
        {
            "id": "evt_1c2d3e4f5a6b7c8d9e0f1a2b",
            "object": "event",
            "livemode": true,
            "type": "deposit.success",
            "created": 1793635340,
            "data": {
                "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
                "object": "deposit",
                "…": "…"
            },
            "webhook": {
                "id": "whd_1a2b3c4d5e6f7a8b9c0d1e2f",
                "status": "delivered"
            }
        }
    ],
    "has_more": false,
    "next_after": "evt_1c2d3e4f5a6b7c8d9e0f1a2b"
}

Olaylar eskiden yeniye gelir. İşlediğin son id'yi sakla ve bir dahaki sefere after olarak gönder; next_after aldığın sayfa için bu id'dir.

Canlı akış (Server-Sent Events)
curl -N "https://skinsgateway.com/api/v1/events/stream" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Last-Event-ID: evt_1c2d3e4f5a6b7c8d9e0f1a2b"

id: evt_2d3e4f5a6b7c8d9e0f1a2b3c
event: deposit.in_hold
data: {"id":"evt_2d3e4f5a6b7c8d9e0f1a2b3c","object":"event","type":"deposit.in_hold",…}

: ping 1793635360
  • Bağlantı başına 25 saniye, her 10 saniyede bir heartbeat yorumu; ardından akış kapanır ve istemcin Last-Event-ID ile yeniden bağlanır. Arada hiçbir şey kaçmaz.
  • Last-Event-ID (veya ?after=) olmadan akış bir sonraki yeni olayla başlar. ?type=a,b ile filtrele.
  • Her webhook gövdesi aynı event_id'yi taşır; böylece webhook'ları ve kaydı birlikte kullanıp tekrarları atlayabilirsin.
  • Akışı asla tarayıcıdan açma: secret değerine ihtiyaç duyar. Sunucunda SDK'ları veya herhangi bir Server-Sent Events istemcisini kullan.
Node.js SDK
// Node.js SDK: list, then follow live (reconnects by itself, resumes after the last event)
const page = await skinsgateway.events.list({ after: lastId, type: 'deposit.success' });
for await (const event of skinsgateway.events.stream({ after: lastId })) {
  handle(event);            // { id, type, created, livemode, data, webhook }
  lastId = event.id;
}
PHP SDK
// PHP SDK: one connection (about 25 seconds); run it from a worker loop
$lastId = $skinsgateway->events->stream(function (array $event) {
    handle($event);
}, ['after' => $lastId]);

Başarısız webhook'lar

Yaklaşık iki günlük denemeden sonra hâlâ başarısız olan bir teslimat failed olarak işaretlenir. Bunları listele, uç noktanı düzelt, sonra tek tek yeniden gönder.

Talep
curl "https://skinsgateway.com/api/v1/webhooks/failed" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"

curl -X POST "https://skinsgateway.com/api/v1/webhooks/whd_1a2b3c4d5e6f7a8b9c0d1e2f/resend" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"

General

Payment network status

GET/v1/status

Whether deposits can be taken right now. Check it before showing skins as a payment option, or to explain a temporary outage to your customers. Cached for 30 seconds.

Request
curl https://skinsgateway.com/api/v1/status \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "status",
    "deposits_available": true,
    "reason": null,
    "checked_at": 1793635200
}

reason is maintenance or no_capacity when deposits_available is false.

Your project

GET/v1/project

The project the credentials belong to: status, defaults, fees and balance.

Request
curl https://skinsgateway.com/api/v1/project \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "project",
    "id": "prj_…",
    "name": "Main store",
    "status": "active",
    "live": true,
    "website": "https://shop.example",
    "default_currency": "usd",
    "default_game": "cs2",
    "bonus_multiplier": 1.1,
    "webhook_url": "https://shop.example/webhooks/skinsgateway",
    "success_url": "https://shop.example/paid",
    "fail_url": "https://shop.example/cart",
    "fees": {
        "deposit_percent": 0.0,
        "market_percent": 0.0
    },
    "balance": {
        "available_usd": 1250.4,
        "reserved_usd": 45.0
    }
}

Balance

GET/v1/balance

Available and reserved balance in USD. Reserved money is held for market purchases that are still in progress.

ParameterTypeDescription
currency string Also return the balance converted to this currency (display only), e.g. eur.
Request
curl "https://skinsgateway.com/api/v1/balance?currency=eur" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "balance",
    "currency": "usd",
    "available": 1250.4,
    "reserved": 45.0,
    "total": 1295.4,
    "converted": {
        "currency": "eur",
        "available": 1119.11,
        "reserved": 40.28,
        "rate": 0.895
    }
}

Balance history

GET/v1/balance/history

Every movement on the project balance, newest first.

ParameterTypeDescription
type string One of deposit, deposit_reversal, reserve, release, purchase, purchase_refund, adjustment, payout, referral (your share of our fee from a business you referred), referral_reversal.
from integer Unix timestamp, inclusive.
to integer Unix timestamp, inclusive.
page integer Page number, from 1.
limit integer 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/balance/history?type=deposit&limit=50" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": 18231,
            "type": "deposit",
            "amount_usd": 93.74625,
            "balance_after_usd": 1250.4,
            "reserved_after_usd": 45.0,
            "reference": {
                "object": "deposit",
                "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12"
            },
            "description": "Deposit order-10293",
            "created_at": 1793635340
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 1,
    "has_more": false
}

Currencies

GET/v1/currencies

Currencies accepted in currency fields, with their rate per 1 USD. Balances are always kept in USD.

Request
curl https://skinsgateway.com/api/v1/currencies \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "code": "usd",
            "per_usd": 1.0
        },
        {
            "code": "eur",
            "per_usd": 0.8951
        },
        {
            "code": "…",
            "per_usd": null
        }
    ]
}

Supported codes: usd, eur, gbp, cad, aud, nzd, brl, cny, mxn, rub, uah, kzt, ars, clp, pen, cop.

Risk settings

POST/v1/project/settings

Automatic early release rules and skin withdrawal approval for this project. Every key is optional; the answer is the project object (early_release, withdrawals).

ParameterTypeDescription
early_release.auto boolean Release in_hold deposits automatically when the rules below allow it.
early_release.min_trust string high (default) or medium: the customer trust needed.
early_release.max_amount_usd number Largest single deposit (USD value) released automatically. Default 100.
early_release.max_open_usd number Most early-released value that may wait for final trades at once, per project. At least max_amount_usd. Default 1000.
withdrawals.require_approval boolean Send withdrawal.approval_requested and wait for your answer before buying skins.
Request
curl https://skinsgateway.com/api/v1/project/settings \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"early_release": {"auto": true, "min_trust": "high", "max_amount_usd": 100, "max_open_usd": 1000}}'
Response
{
    "object": "project",
    "id": "prj_…",
    "…": "…",
    "early_release": {
        "auto": true,
        "min_trust": "high",
        "max_amount_usd": 100.0,
        "max_open_usd": 1000.0
    },
    "withdrawals": {
        "require_approval": false
    }
}

422 invalid_request for an unknown trust level or limits that do not fit.

Deposits

Create a deposit (hosted checkout)

POST/v1/deposits

Creates a payment and returns a checkout link. Send the customer to pay_url, or load embed_url in an iframe.

ParameterTypeDescription
order_idrequired string Your reference for this payment. Unique per project, 1–128 printable characters (no spaces, quotes or < >).
currency string Currency shown to the customer and used for amount fields. Default: project setting.
game string cs2, dota2 or rust: the inventory opened first. Default: project setting.
trade_url string The customer's Steam trade link, if you already have it. Skips that step in the checkout.
steam_id string SteamID64, as an alternative to trade_url.
trade_token string The 8-character token from the trade link, used with steam_id.
min_amount number Lowest total the customer may send, in currency.
max_amount number Highest total the customer may send, in currency.
success_url string https URL the customer returns to after paying. Default: project setting.
fail_url string https URL the customer returns to after a failed or cancelled payment. Default: project setting.
result_url string https URL for this deposit's webhooks. Default: project webhook URL.
metadata object Up to 20 flat key/value pairs (keys ≤ 40 chars, values ≤ 500 chars). Returned in every response and webhook.
expires_in integer Seconds until an unused link expires: 300–604800, default 86400.
customer string A customer (cus_…): the net goes to their wallet once the trade is final. Their trade link fills in when you send none.
Request
curl https://skinsgateway.com/api/v1/deposits \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order-10293",
    "currency": "usd",
    "min_amount": 5,
    "success_url": "https://shop.example/paid",
    "metadata": { "user_id": "4821" }
  }'
Response
{
    "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
    "object": "deposit",
    "livemode": true,
    "order_id": "order-10293",
    "status": "created",
    "flow": "hosted",
    "pay_url": "https://skinsgateway.com/pay/d/9c1e…",
    "embed_url": "https://skinsgateway.com/pay/d/9c1e…?embed=1",
    "game": "cs2",
    "steam_id": null,
    "currency": "usd",
    "amount": null,
    "amount_with_bonus": null,
    "bonus_multiplier": 1.1,
    "amount_usd": null,
    "fee_usd": null,
    "net_usd": null,
    "credited": false,
    "min_amount": 5.0,
    "max_amount": null,
    "required_amount": 5.0,
    "overpayment_usd": null,
    "fulfillment_allowed": false,
    "trade_offer_id": null,
    "trade_offer_url": null,
    "fail_reason": null,
    "hold_until": null,
    "user_risk": null,
    "customer": {
        "steam_id": "76561198000000000",
        "trust": "high",
        "trust_score": 82
    },
    "early_release": null,
    "items": [],
    "metadata": {
        "user_id": "4821"
    },
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635200,
    "completed_at": null
}

Returns 201 with a deposit in status created. Safe to retry: the same order_id with the same parameters returns the first deposit with 200 and the header Idempotent-Replayed: true. 409 duplicate_order_id if the order ID was used before with other parameters. 403 project_inactive only if our staff switched the project or business off.

Create a direct deposit

POST/v1/deposits/direct

For your own item picker: load the customer's inventory with GET /inventory, let them choose, then send the asset IDs. We create the Steam trade offer immediately.

ParameterTypeDescription
order_idrequired string Your unique reference, as above.
gamerequired string cs2, dota2 or rust.
trade_urlrequired string The customer's Steam trade link (or steam_id + trade_token).
asset_idsrequired string[] 1–200 inventory asset IDs from GET /inventory.
currency string Default: project setting.
result_url string https URL for this deposit's webhooks.
metadata object As above.
Request
curl https://skinsgateway.com/api/v1/deposits/direct \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order-10294",
    "game": "cs2",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "asset_ids": ["38291029381", "38291029417"]
  }'
Response
{
    "id": "dep_…",
    "object": "deposit",
    "livemode": true,
    "order_id": "order-10294",
    "status": "pending",
    "flow": "direct",
    "pay_url": null,
    "embed_url": null,
    "game": "cs2",
    "steam_id": "76561198000000000",
    "currency": "usd",
    "amount": 96.15,
    "amount_with_bonus": 105.77,
    "bonus_multiplier": 1.1,
    "amount_usd": 96.15,
    "fee_usd": null,
    "net_usd": null,
    "credited": false,
    "min_amount": 5.0,
    "max_amount": null,
    "required_amount": 5.0,
    "overpayment_usd": null,
    "fulfillment_allowed": false,
    "trade_offer_id": "7123456789",
    "trade_offer_url": "https://steamcommunity.com/tradeoffer/7123456789/",
    "fail_reason": null,
    "hold_until": null,
    "user_risk": null,
    "customer": {
        "steam_id": "76561198000000000",
        "trust": "high",
        "trust_score": 82
    },
    "early_release": null,
    "items": [
        {
            "asset_id": "38291029381",
            "name": "AWP | Asiimov (Battle-Scarred)",
            "image": "https://community.akamai.steamstatic.com/economy/image/…",
            "price": 96.15,
            "price_usd": 96.15
        }
    ],
    "metadata": {
        "user_id": "4821"
    },
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635340,
    "completed_at": null
}

Returns 201 with status pending. Send the customer to trade_offer_url to accept the offer in Steam. Items that cannot be accepted return 422 with a code such as inventory_is_outdated or user_not_tradable.

List deposits

GET/v1/deposits

Deposits of this project, newest first.

ParameterTypeDescription
status string Filter by status.
order_id string Find a deposit by your order ID.
steam_id string Deposits from one Steam account.
from integer Created at or after (unix).
to integer Created at or before (unix).
page integer From 1.
limit integer 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/deposits?status=success&limit=10" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
            "object": "deposit",
            "…": "…"
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 128,
    "has_more": false
}

Retrieve a deposit

GET/v1/deposits/{id}

One deposit by its dep_… ID. Deposits still in flight are refreshed from the payment network when you read them.

ParameterTypeDescription
idrequired string The deposit ID (path).
Request
curl https://skinsgateway.com/api/v1/deposits/dep_5f0c2a9e7b1d4c3a8e6f0b12 \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
    "object": "deposit",
    "livemode": true,
    "order_id": "order-10293",
    "status": "success",
    "flow": "hosted",
    "pay_url": "https://skinsgateway.com/pay/d/9c1e…",
    "embed_url": "https://skinsgateway.com/pay/d/9c1e…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "currency": "usd",
    "amount": 96.15,
    "amount_with_bonus": 105.77,
    "bonus_multiplier": 1.1,
    "amount_usd": 96.15,
    "fee_usd": 0.0,
    "net_usd": 96.15,
    "credited": true,
    "min_amount": 5.0,
    "max_amount": null,
    "required_amount": 5.0,
    "overpayment_usd": 91.15,
    "fulfillment_allowed": true,
    "trade_offer_id": "7123456789",
    "trade_offer_url": "https://steamcommunity.com/tradeoffer/7123456789/",
    "fail_reason": null,
    "hold_until": null,
    "user_risk": null,
    "customer": {
        "steam_id": "76561198000000000",
        "trust": "high",
        "trust_score": 82
    },
    "early_release": null,
    "items": [
        {
            "asset_id": "38291029381",
            "name": "AWP | Asiimov (Battle-Scarred)",
            "image": "https://community.akamai.steamstatic.com/economy/image/…",
            "price": 96.15,
            "price_usd": 96.15
        }
    ],
    "metadata": {
        "user_id": "4821"
    },
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635340,
    "completed_at": 1793635340
}

404 not_found for an unknown ID or a deposit of another project.

Release a held deposit

POST/v1/deposits/{id}/approve

Releases a deposit in status in_hold now instead of waiting for Steam Trade Protection to end: you get deposit.hold_approved right away and can credit your customer (your choice and your risk). The net amount is credited to your project but stays reserved until the original hold end has passed without a reversal; then it joins your available balance (see Early release). If the customer reverses the trade, it is taken from that reserve and you receive deposit.hold_returned.

ParameterTypeDescription
idrequired string The deposit ID (path).
Request
curl -X POST https://skinsgateway.com/api/v1/deposits/dep_5f0c2a9e7b1d4c3a8e6f0b12/approve \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
    "object": "deposit",
    "livemode": true,
    "order_id": "order-10293",
    "status": "hold_approved",
    "flow": "hosted",
    "pay_url": "https://skinsgateway.com/pay/d/9c1e…",
    "embed_url": "https://skinsgateway.com/pay/d/9c1e…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "currency": "usd",
    "amount": 96.15,
    "amount_with_bonus": 105.77,
    "bonus_multiplier": 1.1,
    "amount_usd": 96.15,
    "fee_usd": 0.0,
    "net_usd": 96.15,
    "credited": true,
    "min_amount": 5.0,
    "max_amount": null,
    "required_amount": 5.0,
    "overpayment_usd": 91.15,
    "fulfillment_allowed": false,
    "trade_offer_id": "7123456789",
    "trade_offer_url": "https://steamcommunity.com/tradeoffer/7123456789/",
    "fail_reason": null,
    "hold_until": 1794240000,
    "user_risk": null,
    "customer": {
        "steam_id": "76561198000000000",
        "trust": "high",
        "trust_score": 82
    },
    "early_release": null,
    "items": [
        {
            "asset_id": "38291029381",
            "name": "AWP | Asiimov (Battle-Scarred)",
            "image": "https://community.akamai.steamstatic.com/economy/image/…",
            "price": 96.15,
            "price_usd": 96.15
        }
    ],
    "metadata": {
        "user_id": "4821"
    },
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635340,
    "completed_at": null
}

409 not_in_hold if the deposit is not on hold.

Customer inventory

GET/v1/inventory

A customer's inventory with prices, for direct deposits. price_with_bonus includes your project's bonus multiplier.

ParameterTypeDescription
trade_urlrequired string The customer's Steam trade link (or steam_id + trade_token).
game string Default: project setting.
currency string Default: project setting.
Request
curl -G https://skinsgateway.com/api/v1/inventory \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  --data-urlencode "trade_url=https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12" \
  -d game=cs2
Response
{
    "object": "inventory",
    "game": "cs2",
    "currency": "usd",
    "steam_id": "76561198000000000",
    "items": [
        {
            "asset_id": "38291029381",
            "name": "AWP | Asiimov (Battle-Scarred)",
            "image": "https://community.akamai.steamstatic.com/economy/image/…",
            "price": 96.15,
            "price_with_bonus": 105.77,
            "price_usd": 96.15,
            "available": true,
            "stickers": []
        }
    ],
    "total_available": 96.15
}

Items with available: false cannot be accepted (not tradable, or not supported). The inventory must be public.

Market

Market price list

GET/v1/market/items

Every skin currently available to buy, grouped by name with the lowest price and the number of offers. Cached for 2 minutes; large for CS2.

ParameterTypeDescription
game string cs2 (default), dota2 or rust.
Request
curl "https://skinsgateway.com/api/v1/market/items?game=rust" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "game": "rust",
    "updated_at": 1793635200,
    "data": [
        {
            "name": "Tempered AK47",
            "price_usd": 31.2,
            "count": 4
        }
    ]
}

Buy a skin

POST/v1/market/purchases

Buys one skin with your project balance and sends it to a Steam trade link. We hold max_price from your available balance, charge the real price when the item is bought and release the rest. Failed or returned deliveries are refunded automatically.

ParameterTypeDescription
custom_idrequired string Your unique reference (1–128 printable characters; no spaces, quotes or < >). Sending the same value again returns the existing purchase.
trade_urlrequired string The customer's Steam trade link.
max_pricerequired number The most you are willing to pay, in USD. Protects you from price moves.
item_id integer An exact item from /market/search.
name string Instead of item_id: market hash name. The cheapest matching offer is bought.
game string Required with name.
delivery_types integer[] With name: [1] instant only, [2] slow only, [1,2] both.
Request
curl https://skinsgateway.com/api/v1/market/purchases \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "custom_id": "withdraw-5512",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "item_id": 482910233,
    "max_price": 45
  }'
Response
{
    "id": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
    "object": "purchase",
    "livemode": true,
    "custom_id": "withdraw-5512",
    "status": "creating_trade",
    "game": "cs2",
    "item_name": "AK-47 | Redline (Field-Tested)",
    "item_id": 482910233,
    "delivery_type": 1,
    "steam_id": "76561198000000000",
    "max_price_usd": 45.0,
    "price_usd": 42.8,
    "fee_usd": 0.0,
    "charged_usd": 42.8,
    "refunded_usd": 0.0,
    "trade_offer_id": null,
    "error_reason": null,
    "in_hold": false,
    "in_hold_until": null,
    "created_at": 1793635200,
    "updated_at": 1793635200
}

201 for a new purchase (status creating_trade, or unknown if the network did not answer in time: it settles within minutes). 200 with the existing purchase when custom_id was used before. 402 insufficient_funds. 422 skin_unavailable, skins_not_found_at_specified_price, invalid_token_value and similar, with the failed purchase object included.

Buy several skins

POST/v1/market/purchases/batch

Buys up to 50 items (by item_id) for one trade link in one call.

ParameterTypeDescription
trade_urlrequired string The customer's Steam trade link.
itemsrequired object[] 1–50 of {"item_id": 123, "max_price": 5.5, "custom_id": "r-1"}. All three fields are required.
Request
curl https://skinsgateway.com/api/v1/market/purchases/batch \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "items": [
      { "item_id": 482910233, "max_price": 45, "custom_id": "r-1" },
      { "item_id": 482910871, "max_price": 3.2, "custom_id": "r-2" }
    ]
  }'
Response
{
    "object": "batch",
    "purchases": [
        {
            "id": "pur_…",
            "object": "purchase",
            "custom_id": "r-1",
            "status": "creating_trade",
            "…": "…"
        }
    ],
    "unavailable": [
        {
            "id": 482910871,
            "error": "skin_unavailable"
        }
    ]
}

Cancel purchases

POST/v1/market/purchases/cancel

Cancels purchases that are still waiting for a trade and at least 30 minutes old. Cancelled purchases are refunded.

ParameterTypeDescription
ids string[] Purchase IDs (pur_…), up to 100.
custom_ids string[] Your custom IDs, up to 100. Pass ids, custom_ids or both.
Request
curl https://skinsgateway.com/api/v1/market/purchases/cancel \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "custom_ids": ["withdraw-5512"] }'
Response
{
    "object": "cancel",
    "purchases": [
        {
            "id": "pur_…",
            "object": "purchase",
            "status": "failed",
            "…": "…"
        }
    ],
    "unavailable": {}
}

unavailable lists purchases that could not be cancelled, with the reason (for example cancel_request_too_early).

List purchases

GET/v1/market/purchases

Purchases of this project, newest first.

ParameterTypeDescription
status string Filter by status.
custom_id string Find a purchase by your custom ID.
from, to integer Unix timestamps.
page, limit integer Paging; limit 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/market/purchases?status=accepted" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
            "object": "purchase",
            "…": "…"
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 12,
    "has_more": false
}

Retrieve a purchase

GET/v1/market/purchases/{id}

One purchase by its pur_… ID, refreshed from the network while still in progress.

ParameterTypeDescription
idrequired string The purchase ID (path).
Request
curl https://skinsgateway.com/api/v1/market/purchases/pur_8a2b4c6d8e0f1a2b3c4d5e6f \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
    "object": "purchase",
    "livemode": true,
    "custom_id": "withdraw-5512",
    "status": "accepted",
    "game": "cs2",
    "item_name": "AK-47 | Redline (Field-Tested)",
    "item_id": 482910233,
    "delivery_type": 1,
    "steam_id": "76561198000000000",
    "max_price_usd": 45.0,
    "price_usd": 42.8,
    "fee_usd": 0.0,
    "charged_usd": 42.8,
    "refunded_usd": 0.0,
    "trade_offer_id": "7123456790",
    "error_reason": null,
    "in_hold": false,
    "in_hold_until": null,
    "created_at": 1793635200,
    "updated_at": 1793635295
}

Withdrawals

Create a skin withdrawal

POST/v1/withdrawals

A hosted page where one of your users cashes out in skins: they pick skins from the live market up to budget_usd and we send them to their Steam account. The budget is held from your available balance now; whatever is not spent goes back when the withdrawal ends.

ParameterTypeDescription
custom_idrequired string Your unique reference (1–128 printable characters; no spaces, quotes or < >). Repeating it returns the same withdrawal.
budget_usdrequired number The most the user may spend, in USD (0.50–100000). Prices on the page are what each skin costs you.
user_reference string Your user's id, returned everywhere and shown in the dashboard.
trade_url string The user's Steam trade link, if you have it. They can change it on the page.
game string cs2, dota2 or rust: opened first. Default: project setting.
return_url string https URL the user goes back to when done (with withdrawal_id, custom_id, status).
customer string A customer (cus_…): the budget comes out of their wallet and everything unspent goes back to it. 402 insufficient_customer_funds, 409 customer_frozen.
result_url string https URL for this withdrawal's webhooks. Default: project webhook URL.
metadata object Up to 20 flat key/value pairs.
expires_in integer Seconds until an unused link expires: 300–604800, default 86400.
test_outcome string Test mode only: accepted (default), waiting_accept or failed for the simulated skins.
test_approval string Test mode only: approve or decline answers the approval step without calling your server.
Request
curl https://skinsgateway.com/api/v1/withdrawals \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "custom_id": "cashout-981",
    "budget_usd": 25,
    "user_reference": "user-42",
    "return_url": "https://shop.example/account"
  }'
Response
{
    "id": "wdr_4b1d9e2c7a5f3b8d6e0c1a2f",
    "object": "withdrawal",
    "livemode": true,
    "custom_id": "cashout-981",
    "user_reference": "user-42",
    "status": "created",
    "url": "https://skinsgateway.com/pay/w/7d2a…",
    "embed_url": "https://skinsgateway.com/pay/w/7d2a…?embed=1",
    "game": "cs2",
    "steam_id": null,
    "budget_usd": 25.0,
    "spent_usd": 0.0,
    "held_usd": 25.0,
    "fail_reason": null,
    "picked": [],
    "items": [],
    "return_url": "https://shop.example/account",
    "metadata": {},
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635200,
    "completed_at": null
}

201 new, 200 existing custom_id. 402 insufficient_funds when the budget is more than your available balance.

List withdrawals

GET/v1/withdrawals

Skin withdrawals of this project, newest first.

ParameterTypeDescription
status string created, processing, delivering, completed, failed, expired or canceled.
custom_id string Find one by your reference (or user_reference).
page, limit integer Paging; limit 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/withdrawals?status=completed" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "wdr_4b1d9e2c7a5f3b8d6e0c1a2f",
            "object": "withdrawal",
            "…": "…"
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 4,
    "has_more": false
}

Retrieve a withdrawal

GET/v1/withdrawals/{id}

One withdrawal by its wdr_… ID, refreshed while skins are on their way.

ParameterTypeDescription
idrequired string The withdrawal ID (path).
Request
curl https://skinsgateway.com/api/v1/withdrawals/wdr_4b1d9e2c7a5f3b8d6e0c1a2f \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "wdr_4b1d9e2c7a5f3b8d6e0c1a2f",
    "object": "withdrawal",
    "livemode": true,
    "custom_id": "cashout-981",
    "user_reference": "user-42",
    "status": "completed",
    "url": "https://skinsgateway.com/pay/w/7d2a…",
    "embed_url": "https://skinsgateway.com/pay/w/7d2a…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "budget_usd": 25.0,
    "spent_usd": 22.47,
    "held_usd": 0.0,
    "fail_reason": null,
    "picked": [
        {
            "item_id": 482910233,
            "name": "AK-47 | Slate (Field-Tested)",
            "game": "cs2",
            "cost_usd": 22.47
        }
    ],
    "items": [
        {
            "purchase": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
            "name": "AK-47 | Slate (Field-Tested)",
            "status": "accepted",
            "delivered": true,
            "cost_usd": 22.47,
            "refunded_usd": 0.0,
            "trade_offer_id": "7123456791"
        }
    ],
    "return_url": "https://shop.example/account",
    "metadata": {},
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635380,
    "completed_at": 1793635380
}

Cancel a withdrawal

POST/v1/withdrawals/{id}/cancel

Cancels a withdrawal the user has not confirmed yet; the link stops working and the budget goes back to your available balance.

ParameterTypeDescription
idrequired string The withdrawal ID (path).
Request
curl -X POST https://skinsgateway.com/api/v1/withdrawals/wdr_4b1d9e2c7a5f3b8d6e0c1a2f/cancel \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "wdr_4b1d9e2c7a5f3b8d6e0c1a2f",
    "object": "withdrawal",
    "livemode": true,
    "custom_id": "cashout-981",
    "user_reference": "user-42",
    "status": "canceled",
    "url": "https://skinsgateway.com/pay/w/7d2a…",
    "embed_url": "https://skinsgateway.com/pay/w/7d2a…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "budget_usd": 25.0,
    "spent_usd": 0.0,
    "held_usd": 0.0,
    "fail_reason": null,
    "picked": [],
    "items": [],
    "return_url": "https://shop.example/account",
    "metadata": {},
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635380,
    "completed_at": 1793635380
}

409 not_cancelable once the user confirmed.

Customers

Create a customer

POST/v1/customers

One of your users with a USD wallet. Money in the wallet is held for them on your balance (it shows in reserved): you can never pay it out or spend it by mistake.

ParameterTypeDescription
referencerequired string Your own user id, unique per project and mode (1–128 printable characters). Repeating it returns the existing customer.
trade_url string Their Steam trade link: used for their deposits and skin withdrawals, so they never type it twice.
steam_id string SteamID64, when you have no trade link yet.
metadata object Up to 20 flat key/value pairs.
Request
curl https://skinsgateway.com/api/v1/customers \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"reference": "user-42", "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12"}'
Response
{
    "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "object": "customer",
    "livemode": true,
    "reference": "user-42",
    "steam_id": "76561198000000000",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "status": "active",
    "frozen_reason": null,
    "balance_usd": 0.0,
    "pending_usd": 0.0,
    "metadata": {
        "tier": "vip"
    },
    "created_at": 1793635200,
    "updated_at": 1793635200
}

201 new, 200 existing reference.

List customers

GET/v1/customers

Customers of this project and mode, newest first.

ParameterTypeDescription
reference string Find one by your reference (or its cus_… ID).
steam_id string Customers with this SteamID64.
status string active or frozen.
page, limit integer Paging; limit 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/customers?reference=user-42" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
            "object": "customer",
            "livemode": true,
            "reference": "user-42",
            "steam_id": "76561198000000000",
            "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
            "status": "active",
            "frozen_reason": null,
            "balance_usd": 61.25,
            "pending_usd": 0.0,
            "metadata": {
                "tier": "vip"
            },
            "created_at": 1793635200,
            "updated_at": 1793635800
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 1,
    "has_more": false
}

Retrieve a customer

GET/v1/customers/{id}

One customer: balance_usd is what they can spend now; pending_usd is deposits you released early that join the wallet once Steam Trade Protection is over.

ParameterTypeDescription
idrequired string The customer ID (path).
Request
curl https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "object": "customer",
    "livemode": true,
    "reference": "user-42",
    "steam_id": "76561198000000000",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "status": "active",
    "frozen_reason": null,
    "balance_usd": 61.25,
    "pending_usd": 0.0,
    "metadata": {
        "tier": "vip"
    },
    "created_at": 1793635200,
    "updated_at": 1793635800
}

Update a customer

POST/v1/customers/{id}

Change reference, trade_url (an empty string removes it), steam_id or metadata (replaced as a whole). Keys you leave out stay as they are.

ParameterTypeDescription
idrequired string The customer ID (path).
reference, trade_url, steam_id, metadata mixed As on create.
Request
curl https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"metadata": {"tier": "gold"}}'
Response
{
    "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "object": "customer",
    "livemode": true,
    "reference": "user-42",
    "steam_id": "76561198000000000",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "status": "active",
    "frozen_reason": null,
    "balance_usd": 61.25,
    "pending_usd": 0.0,
    "metadata": {
        "tier": "gold"
    },
    "created_at": 1793635200,
    "updated_at": 1793635800
}

409 duplicate_reference when another customer has that reference.

Move money in or out of a wallet

POST/v1/customers/{id}/transfers

Your game or shop logic: debit moves money from the wallet to your available balance (a bet, a case, an order on your site); credit moves it from your available balance into the wallet (a win, a refund, a bonus).

ParameterTypeDescription
idrequired string The customer ID (path).
directionrequired string credit or debit.
amount_usdrequired number 0.01 or more.
referencerequired string Your unique id for this movement. Repeating it returns the same transaction (200) and never moves money twice; the same reference with another direction or amount is 409 idempotency_mismatch.
description string Shown in the wallet history (up to 255 characters).
metadata object Up to 20 flat key/value pairs.
Request
curl https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a/transfers \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"direction": "debit", "amount_usd": 2.5, "reference": "bet-99812", "description": "Case: Spring Collection"}'
Response
{
    "id": "ctx_9a8b7c6d5e4f3a2b1c0d9e8f",
    "object": "customer_transaction",
    "livemode": true,
    "customer": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "type": "debit",
    "amount_usd": -2.5,
    "balance_after_usd": 58.75,
    "reference": "bet-99812",
    "description": "Case: Spring Collection",
    "deposit": null,
    "withdrawal": null,
    "metadata": {},
    "created_at": 1793635860
}

402 insufficient_customer_funds (a debit never takes a wallet below zero) or insufficient_funds (a credit your available balance cannot cover). 409 customer_frozen for a debit from a frozen wallet.

Wallet history

GET/v1/customers/{id}/transactions

Every movement of one wallet, newest first. type: deposit, deposit_reversal, credit, debit, withdrawal, withdrawal_return, adjustment.

ParameterTypeDescription
idrequired string The customer ID (path).
type string Only this type.
page, limit integer Paging; limit 1–100, default 25.
Request
curl https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a/transactions \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "ctx_9a8b7c6d5e4f3a2b1c0d9e8f",
            "object": "customer_transaction",
            "livemode": true,
            "customer": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
            "type": "debit",
            "amount_usd": -2.5,
            "balance_after_usd": 58.75,
            "reference": "bet-99812",
            "description": "Case: Spring Collection",
            "deposit": null,
            "withdrawal": null,
            "metadata": {},
            "created_at": 1793635860
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 12,
    "has_more": false
}

Freeze a wallet

POST/v1/customers/{id}/freeze

Money still comes in (deposits, credits); debits and skin withdrawals are refused until you unfreeze it.

ParameterTypeDescription
idrequired string The customer ID (path).
Request
curl -X POST https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a/freeze \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "object": "customer",
    "livemode": true,
    "reference": "user-42",
    "steam_id": "76561198000000000",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "status": "frozen",
    "frozen_reason": "merchant",
    "balance_usd": 61.25,
    "pending_usd": 0.0,
    "metadata": {
        "tier": "vip"
    },
    "created_at": 1793635200,
    "updated_at": 1793635800
}

Unfreeze a wallet

POST/v1/customers/{id}/unfreeze

Lifts your freeze, or the automatic one after a returned deposit once the wallet is back at zero or more.

ParameterTypeDescription
idrequired string The customer ID (path).
Request
curl -X POST https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a/unfreeze \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "object": "customer",
    "livemode": true,
    "reference": "user-42",
    "steam_id": "76561198000000000",
    "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=39734272&token=AbCdEf12",
    "status": "active",
    "frozen_reason": null,
    "balance_usd": 61.25,
    "pending_usd": 0.0,
    "metadata": {
        "tier": "vip"
    },
    "created_at": 1793635200,
    "updated_at": 1793635800
}

409 below_zero while the wallet is below zero (credit it first); frozen_by_staff when we froze it.

Open the hosted wallet page

POST/v1/customers/{id}/session

A short-lived link to a wallet page with your name on it: balance, deposit skins, withdraw skins and history. Embeddable (embed_url). Create a new link every time your user opens their wallet.

ParameterTypeDescription
idrequired string The customer ID (path).
return_url string https URL of the "Back" button.
expires_in integer Seconds the link works: 300–86400, default 3600.
allow_deposit, allow_withdraw boolean Show the deposit / withdraw buttons (default both).
Request
curl https://skinsgateway.com/api/v1/customers/cus_2e7b9c1d4f6a8b0c3d5e7f9a/session \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"return_url": "https://shop.example/account"}'
Response
{
    "id": "css_5d4c3b2a1f0e9d8c7b6a5f4e",
    "object": "customer_session",
    "livemode": true,
    "customer": "cus_2e7b9c1d4f6a8b0c3d5e7f9a",
    "url": "https://skinsgateway.com/pay/c/5d4c…",
    "embed_url": "https://skinsgateway.com/pay/c/5d4c…?embed=1",
    "return_url": "https://shop.example/account",
    "allow": {
        "deposit": true,
        "withdraw": true
    },
    "expires_at": 1793638800,
    "created_at": 1793635200
}

Payouts

List payouts

GET/v1/payouts

Payouts from this project, newest first. Payouts are requested in the dashboard (with a two-factor code); the API is read-only.

ParameterTypeDescription
status string pending, paid or rejected.
from, to integer Unix timestamps.
page, limit integer Paging; limit 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/payouts?status=paid" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "po_3c9d1e7a5b2f4a6c8e0d2b4f",
            "object": "payout",
            "status": "paid",
            "project": "prj_…",
            "method": "sepa",
            "destination": {
                "id": "dst_8f2a4c6e1b3d5f70",
                "label": "Main EUR account",
                "summary": "IBAN DE •••• 3000"
            },
            "amount_usd": 500.0,
            "fee_usd": 0.0,
            "net_usd": 500.0,
            "reference": "SEPA-20261102-48213",
            "reason": null,
            "created_at": 1793635200,
            "completed_at": 1793721600
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 3,
    "has_more": false
}

Retrieve a payout

GET/v1/payouts/{id}

One payout by its po_… ID.

ParameterTypeDescription
idrequired string The payout ID (path).
Request
curl https://skinsgateway.com/api/v1/payouts/po_3c9d1e7a5b2f4a6c8e0d2b4f \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "po_3c9d1e7a5b2f4a6c8e0d2b4f",
    "object": "payout",
    "status": "paid",
    "project": "prj_…",
    "method": "sepa",
    "destination": {
        "id": "dst_8f2a4c6e1b3d5f70",
        "label": "Main EUR account",
        "summary": "IBAN DE •••• 3000"
    },
    "amount_usd": 500.0,
    "fee_usd": 0.0,
    "net_usd": 500.0,
    "reference": "SEPA-20261102-48213",
    "reason": null,
    "created_at": 1793635200,
    "completed_at": 1793721600
}

404 not_found for an unknown ID or a payout of another project.

Codes

Create prize codes

POST/v1/codes

A batch of gift codes that turn into skins (tournaments, giveaways, streams). The batch total (quantity × value) is held on your balance at once, so every winner gets their skin. Winners redeem at https://skinsgateway.com/redeem, sign in with Steam and pick a skin; each skin is an ordinary purchase of this project. The plain codes are in this answer only: store them now.

ParameterTypeDescription
quantityrequired integer Number of codes, 1–1000.
value_usdrequired number The most one code may cost you (market fee included), $0.50–$5,000.00. A cheaper pick gives the difference back.
kind string value (default: any skin up to the value) or skin (one skin, given by game + name).
game, name string For kind: skin: game code and exact market name.
expires_in_days integer 1–365, default 90. Unused codes give their value back when they expire.
label string Your own name for the batch.
Idempotency-Key header 8–64 of A-Z a-z 0-9 _ -. A repeat returns the same batch (200, without codes).
Request
curl https://skinsgateway.com/api/v1/codes \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET" \
  -H "Idempotency-Key: cup-2026-spring" \
  -H "Content-Type: application/json" \
  -d '{"quantity":2,"value_usd":10,"label":"Spring cup"}'
Response
{
    "object": "prize_code_batch",
    "id": "pcb_4f1a2b3c4d5e6f7a8b9c0d1e",
    "livemode": true,
    "project": "prj_…",
    "label": "Spring cup",
    "kind": "value",
    "value_usd": 10.0,
    "skin": null,
    "quantity": 2,
    "status": "active",
    "counts": {
        "unused": 2,
        "redeeming": 0,
        "redeemed": 0,
        "expired": 0,
        "void": 0,
        "failed": 0
    },
    "held_usd": 20.0,
    "expires_at": 1801411200,
    "created": 1793635200,
    "codes": [
        "7KQM-2XHD-9PRA-QR12",
        "C4NW-8JTE-5LVB-ZK47"
    ]
}

402 insufficient_funds when the balance cannot hold the batch. A test secret creates test codes on the test balance; they redeem with a simulated delivery.

List prize code batches

GET/v1/codes

Batches of this project, newest first, without codes.

ParameterTypeDescription
page, limit integer Paging; limit 1–100, default 25.
Request
curl https://skinsgateway.com/api/v1/codes \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "object": "prize_code_batch",
            "id": "pcb_4f1a2b3c4d5e6f7a8b9c0d1e",
            "livemode": true,
            "project": "prj_…",
            "label": "Spring cup",
            "kind": "value",
            "value_usd": 10.0,
            "skin": null,
            "quantity": 2,
            "status": "active",
            "counts": {
                "unused": 2,
                "redeeming": 0,
                "redeemed": 0,
                "expired": 0,
                "void": 0,
                "failed": 0
            },
            "held_usd": 20.0,
            "expires_at": 1801411200,
            "created": 1793635200
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 1,
    "has_more": false
}

Retrieve a batch

GET/v1/codes/{id}

One pcb_… batch with every code masked (last 4 characters), its status and the purchase it became.

ParameterTypeDescription
idrequired string The batch ID (path).
Request
curl https://skinsgateway.com/api/v1/codes/pcb_4f1a2b3c4d5e6f7a8b9c0d1e \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "prize_code_batch",
    "id": "pcb_4f1a2b3c4d5e6f7a8b9c0d1e",
    "livemode": true,
    "project": "prj_…",
    "label": "Spring cup",
    "kind": "value",
    "value_usd": 10.0,
    "skin": null,
    "quantity": 2,
    "status": "active",
    "counts": {
        "unused": 1,
        "redeeming": 0,
        "redeemed": 1,
        "expired": 0,
        "void": 0,
        "failed": 0
    },
    "held_usd": 10.0,
    "expires_at": 1801411200,
    "created": 1793635200,
    "codes": [
        {
            "id": "prc_9a8b7c6d5e4f3a2b1c0d9e8f",
            "code": "••••-••••-••••-QR12",
            "last4": "QR12",
            "status": "redeemed",
            "purchase": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
            "redeemed_at": 1793638800
        },
        {
            "id": "prc_1b2c3d4e5f6a7b8c9d0e1f2a",
            "code": "••••-••••-••••-ZK47",
            "last4": "ZK47",
            "status": "unused",
            "purchase": null,
            "redeemed_at": null
        }
    ]
}

Void a batch

POST/v1/codes/{id}/void

Unused codes stop working at once and their value goes back to your available balance. Codes being redeemed finish.

ParameterTypeDescription
idrequired string The batch ID (path).
Request
curl -X POST https://skinsgateway.com/api/v1/codes/pcb_4f1a2b3c4d5e6f7a8b9c0d1e/void \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "prize_code_batch",
    "id": "pcb_4f1a2b3c4d5e6f7a8b9c0d1e",
    "livemode": true,
    "project": "prj_…",
    "label": "Spring cup",
    "kind": "value",
    "value_usd": 10.0,
    "skin": null,
    "quantity": 2,
    "status": "voided",
    "counts": {
        "unused": 2,
        "redeeming": 0,
        "redeemed": 0,
        "expired": 0,
        "void": 0,
        "failed": 0
    },
    "held_usd": 20.0,
    "expires_at": 1801411200,
    "created": 1793635200,
    "codes": []
}

Webhooks

List deliveries

GET/v1/webhooks

Webhook deliveries we sent to this project, newest first.

ParameterTypeDescription
status string pending, delivered or failed.
page, limit integer Paging; limit 1–100, default 25.
Request
curl "https://skinsgateway.com/api/v1/webhooks?status=failed" \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "object": "list",
    "data": [
        {
            "id": "whd_1a2b3c4d5e6f7a8b9c0d1e2f",
            "object": "webhook_delivery",
            "livemode": true,
            "event": "deposit.success",
            "url": "https://shop.example/webhooks/skinsgateway",
            "status": "delivered",
            "attempts": 1,
            "last_http_code": 200,
            "last_error": null,
            "next_attempt_at": null,
            "delivered_at": 1793635341,
            "created_at": 1793635340
        }
    ],
    "page": 1,
    "limit": 25,
    "total": 1,
    "has_more": false
}

Send a test event

POST/v1/webhooks/test

Sends test.ping to your project webhook URL and returns the delivery.

Request
curl -X POST https://skinsgateway.com/api/v1/webhooks/test \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "whd_…",
    "object": "webhook_delivery",
    "livemode": true,
    "event": "test.ping",
    "url": "https://shop.example/webhooks/skinsgateway",
    "status": "delivered",
    "attempts": 1,
    "last_http_code": 200,
    "last_error": null,
    "next_attempt_at": null,
    "delivered_at": 1793635341,
    "created_at": 1793635340
}

422 no_webhook_url if the project has no webhook URL yet.

Resend a delivery

POST/v1/webhooks/{id}/resend

Sends a delivery again right away, for example after you fixed your endpoint.

ParameterTypeDescription
idrequired string The delivery ID, whd_… (path).
Request
curl -X POST https://skinsgateway.com/api/v1/webhooks/whd_1a2b3c4d5e6f7a8b9c0d1e2f/resend \
  -H "X-Client-Id: $SKINSGATEWAY_CLIENT_ID" \
  -H "X-Client-Secret: $SKINSGATEWAY_CLIENT_SECRET"
Response
{
    "id": "whd_1a2b3c4d5e6f7a8b9c0d1e2f",
    "object": "webhook_delivery",
    "livemode": true,
    "event": "deposit.success",
    "url": "https://shop.example/webhooks/skinsgateway",
    "status": "delivered",
    "attempts": 1,
    "last_http_code": 200,
    "last_error": null,
    "next_attempt_at": null,
    "delivered_at": 1793635341,
    "created_at": 1793635340
}

The deposit object

FieldTypeDescription
idstringDeposit ID, dep_….
objectstringAlways deposit.
order_idstringYour reference.
statusstringSee deposit statuses.
flowstringhosted or direct.
pay_url, embed_urlstring|nullCheckout links (hosted flow only).
gamestringcs2, dota2 or rust.
steam_idstring|nullThe customer's SteamID64, once known.
currencystringCurrency of the amount fields.
amountnumber|nullMarket value of the items in currency.
amount_with_bonusnumber|nullValue shown to the customer, including your bonus.
bonus_multipliernumberYour project bonus at the time of the deposit (0.5–2).
amount_usdnumber|nullMarket value in USD.
fee_usdnumber|nullSkinsGateway fee, set when credited.
net_usdnumber|nullAmount credited to your balance.
creditedbooleanWhether the deposit currently counts towards your balance.
required_amountnumber|nullThe amount you asked for (min_amount, in currency); null without a minimum.
overpayment_usdnumber|nullValue received above required_amount, in USD. 0 when exactly the minimum came in; null without a minimum or before the items are valued.
fulfillment_allowedbooleanTrue only when the deposit is final (success) and credited. Deliver the order when this is true; it is never true during Steam Trade Protection.
min_amount, max_amountnumber|nullLimits you set.
trade_offer_id, trade_offer_urlstring|nullThe Steam trade offer.
fail_reasonstring|nullWhy it failed, e.g. trade_timeout, trade_canceled, timeout.
hold_untilinteger|nullEnd of Steam Trade Protection (unix).
user_riskobject|nullRisk signals, only while in_hold.
customerobject|nullsteam_id, trust (high, medium, low, new) and trust_score (0–100) of the paying Steam account, across all of SkinsGateway.
early_releaseobject|nullSet once released before Trade Protection ended: by (manual | auto), held_usd, state (held | released | reversed), available_at (unix, when it joins your available balance).
itemsarrayItems in the trade: asset_id, name, image, price, price_usd.
metadataobjectYour key/value pairs.
expires_at, created_at, updated_at, completed_atinteger|nullUnix timestamps.
Example
{
    "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
    "object": "deposit",
    "livemode": true,
    "order_id": "order-10293",
    "status": "success",
    "flow": "hosted",
    "pay_url": "https://skinsgateway.com/pay/d/9c1e…",
    "embed_url": "https://skinsgateway.com/pay/d/9c1e…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "currency": "usd",
    "amount": 96.15,
    "amount_with_bonus": 105.77,
    "bonus_multiplier": 1.1,
    "amount_usd": 96.15,
    "fee_usd": 0.0,
    "net_usd": 96.15,
    "credited": true,
    "min_amount": 5.0,
    "max_amount": null,
    "required_amount": 5.0,
    "overpayment_usd": 91.15,
    "fulfillment_allowed": true,
    "trade_offer_id": "7123456789",
    "trade_offer_url": "https://steamcommunity.com/tradeoffer/7123456789/",
    "fail_reason": null,
    "hold_until": null,
    "user_risk": null,
    "customer": {
        "steam_id": "76561198000000000",
        "trust": "high",
        "trust_score": 82
    },
    "early_release": null,
    "items": [
        {
            "asset_id": "38291029381",
            "name": "AWP | Asiimov (Battle-Scarred)",
            "image": "https://community.akamai.steamstatic.com/economy/image/…",
            "price": 96.15,
            "price_usd": 96.15
        }
    ],
    "metadata": {
        "user_id": "4821"
    },
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635340,
    "completed_at": 1793635340
}

The purchase object

FieldTypeDescription
idstringPurchase ID, pur_….
objectstringAlways purchase.
custom_idstringYour reference.
statusstringSee purchase statuses.
game, item_name, item_idstring, string, integer|nullWhat was bought.
delivery_typeinteger|null1 instant, 2 slow.
steam_idstringRecipient SteamID64.
max_price_usdnumberYour price limit.
price_usdnumber|nullActual item price.
fee_usdnumber|nullMarket fee (currently 0).
charged_usdnumber|nullTotal taken from your balance.
refunded_usdnumberTotal given back after a failure or return.
trade_offer_idstring|nullThe Steam trade offer to the customer.
error_reasonstring|nullWhy it failed.
in_hold, in_hold_untilboolean, integer|nullTrade Protection on the delivered item.
created_at, updated_atintegerUnix timestamps.
Example
{
    "id": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
    "object": "purchase",
    "livemode": true,
    "custom_id": "withdraw-5512",
    "status": "accepted",
    "game": "cs2",
    "item_name": "AK-47 | Redline (Field-Tested)",
    "item_id": 482910233,
    "delivery_type": 1,
    "steam_id": "76561198000000000",
    "max_price_usd": 45.0,
    "price_usd": 42.8,
    "fee_usd": 0.0,
    "charged_usd": 42.8,
    "refunded_usd": 0.0,
    "trade_offer_id": "7123456790",
    "error_reason": null,
    "in_hold": false,
    "in_hold_until": null,
    "created_at": 1793635200,
    "updated_at": 1793635295
}

Purchase statuses

StatusMeaning
pendingAccepted by us, being processed.
unknownThe network did not answer in time. We are checking; it settles within minutes.
creating_tradeItem bought, trade offer being created.
waiting_acceptTrade offer sent to the customer.
acceptedDelivered. Final.
canceledCustomer declined the offer. Refunded.
timeoutOffer not accepted in time. Refunded.
invalid_trade_tokenBad trade link. Refunded.
user_not_tradableCustomer cannot trade. Refunded.
trade_create_errorThe trade could not be created. Refunded.
rollback_userReturned by the customer (Trade Protection). Refunded.
rollback_supplierReturned by the seller. Refunded.
failedFailed before a trade was made, or cancelled by you. Refunded.

The withdrawal object

FieldTypeDescription
idstringWithdrawal ID, wdr_….
objectstringAlways withdrawal.
custom_id, user_referencestring, string|nullYour references.
statusstringcreated (link open) → processing → delivering → completed | failed; or expired / canceled.
url, embed_urlstringThe page for your user.
steam_idstring|nullThe user's SteamID64, once known.
budget_usdnumberThe budget you set.
spent_usdnumberCharged for delivered skins, minus refunds.
held_usdnumberStill held from your balance (0 once finished).
fail_reasonstring|nullnot_approved, not_delivered, not_bought.
pickedarrayWhat the user confirmed: item_id, name, game, cost_usd.
itemsarrayOne entry per skin bought: purchase (pur_…), status, delivered, cost_usd, refunded_usd, trade_offer_id.
return_url, metadatastring|null, objectAs you sent them.
expires_at, created_at, updated_at, completed_atinteger|nullUnix timestamps.
Example
{
    "id": "wdr_4b1d9e2c7a5f3b8d6e0c1a2f",
    "object": "withdrawal",
    "livemode": true,
    "custom_id": "cashout-981",
    "user_reference": "user-42",
    "status": "completed",
    "url": "https://skinsgateway.com/pay/w/7d2a…",
    "embed_url": "https://skinsgateway.com/pay/w/7d2a…?embed=1",
    "game": "cs2",
    "steam_id": "76561198000000000",
    "budget_usd": 25.0,
    "spent_usd": 22.47,
    "held_usd": 0.0,
    "fail_reason": null,
    "picked": [
        {
            "item_id": 482910233,
            "name": "AK-47 | Slate (Field-Tested)",
            "game": "cs2",
            "cost_usd": 22.47
        }
    ],
    "items": [
        {
            "purchase": "pur_8a2b4c6d8e0f1a2b3c4d5e6f",
            "name": "AK-47 | Slate (Field-Tested)",
            "status": "accepted",
            "delivered": true,
            "cost_usd": 22.47,
            "refunded_usd": 0.0,
            "trade_offer_id": "7123456791"
        }
    ],
    "return_url": "https://shop.example/account",
    "metadata": {},
    "expires_at": 1793721600,
    "created_at": 1793635200,
    "updated_at": 1793635380,
    "completed_at": 1793635380
}

The payout object

A payout sends money from a project balance to one of your payout destinations (bank account, PayPal, Revolut or crypto wallet). Request payouts in the dashboard; read them with the payout endpoints and follow them with payout.* webhooks.

FieldTypeDescription
idstringPayout ID, po_….
objectstringAlways payout.
statusstringpending (requested, not sent yet), paid (sent; final) or rejected (not sent; the amount is back on your balance).
projectstringThe project the money came from, prj_….
methodstringcrypto, sepa, ach, paypal or revolut.
destinationobjectid (dst_…), label and a masked summary. Full details never leave the dashboard.
amount_usdnumberTaken from your balance.
fee_usdnumberOur payout fee.
net_usdnumberWhat we send (amount_usd − fee_usd). For crypto, network and conversion fees come out of this amount.
referencestring|nullWhen paid: bank / PayPal / Revolut reference or the transaction hash.
reasonstring|nullWhen rejected: why.
created_at, completed_atinteger, integer|nullUnix timestamps. completed_at is set once paid or rejected.
Example
{
    "id": "po_3c9d1e7a5b2f4a6c8e0d2b4f",
    "object": "payout",
    "status": "paid",
    "project": "prj_…",
    "method": "sepa",
    "destination": {
        "id": "dst_8f2a4c6e1b3d5f70",
        "label": "Main EUR account",
        "summary": "IBAN DE •••• 3000"
    },
    "amount_usd": 500.0,
    "fee_usd": 0.0,
    "net_usd": 500.0,
    "reference": "SEPA-20261102-48213",
    "reason": null,
    "created_at": 1793635200,
    "completed_at": 1793721600
}

The webhook delivery object

Returned by the webhook endpoints. It describes one event we sent you and how delivery went.

FieldTypeDescription
idstringDelivery ID, whd_…. Same as id in the payload and the SkinsGateway-Delivery header. The event itself is event_id in the payload and the SkinsGateway-Event-Id header.
eventstringEvent name.
urlstringWhere we sent it.
statusstringpending (will retry), delivered or failed (gave up).
attemptsintegerAttempts so far.
last_http_code, last_errorinteger|null, string|nullResult of the last attempt.
next_attempt_atinteger|nullNext retry (unix), while pending.
delivered_at, created_atinteger|nullUnix timestamps.

Webhooks

Set a webhook URL (public, https://) for each project in the dashboard, or per deposit with result_url. We POST a JSON event to it whenever a deposit or purchase changes status. Answer with any 2xx within 8 seconds to acknowledge; do slow work after responding.

What we send
POST /webhooks/skinsgateway HTTP/1.1
Host: shop.example
Content-Type: application/json
SkinsGateway-Event: deposit.success
SkinsGateway-Event-Id: evt_01c35124eeba4fed940fc561
SkinsGateway-Delivery: whd_1a2b3c4d5e6f7a8b9c0d1e2f
SkinsGateway-Timestamp: 1793635340
SkinsGateway-Signature: t=1793635340,v1=5d2c1f0e9b…

{
    "id": "whd_1a2b3c4d5e6f7a8b9c0d1e2f",
    "event": "deposit.success",
    "event_id": "evt_01c35124eeba4fed940fc561",
    "created": 1793635340,
    "livemode": true,
    "data": {
        "id": "dep_5f0c2a9e7b1d4c3a8e6f0b12",
        "object": "deposit",
        "order_id": "order-10293",
        "status": "success",
        "…": "…"
    }
}

data is the full deposit or purchase object at the time of the event.

Delivery is at least once. SkinsGateway-Event-Id (the body's event_id) stays the same on every retry and on a resend from the dashboard, so store it and skip an event you already handled. Deliver an order when a deposit has fulfillment_allowed: true; SkinsGateway-Timestamp repeats the t of the signature.

Events

EventWhen
deposit.pendingA trade offer was sent to the customer.
deposit.in_holdThe customer accepted; Steam Trade Protection applies.
deposit.hold_approvedA held deposit was released early (manually or automatically). Credited to your project; it joins your available balance when the trade is final.
deposit.successThe deposit completed and was credited.
deposit.failThe trade failed, was declined or timed out.
deposit.hold_returnedItems were returned during protection; any early credit was reversed.
deposit.expiredThe checkout link expired unused.
purchase.creating_tradeA market purchase was made; the trade is being created.
purchase.waiting_acceptThe trade offer was sent to the customer.
purchase.acceptedThe skin was delivered.
purchase.failedThe purchase failed or was cancelled; the money was refunded.
purchase.rolled_backThe delivered skin was returned; the money was refunded.
payout.pendingA payout was requested. The amount moved from available to reserved.
payout.paidThe payout was sent. reference is the bank reference or transaction hash.
payout.rejectedThe payout was not sent; reason says why. The full amount is back on your available balance.
balance.topup_creditedFunds you added with crypto in the dashboard were credited. data: object: "topup", id, project, amount_usd, credited_usd, coin, paid_at.
withdrawal.approval_requestedSynchronous, only when your project asks for approval: answer within 5 seconds with HTTP 200 and {"approve": true} to buy the skins. {"approve": false} or a 4xx refuses the withdrawal; no answer lets the user try again. Never retried.
withdrawal.completedAt least one skin was delivered. Unspent budget is back on your available balance; see spent_usd and items.
withdrawal.failedNothing was delivered (fail_reason: not_approved, not_delivered, …). The whole budget is back.
withdrawal.expiredThe link was never used before expires_at. The budget is back.
withdrawal.canceledYou canceled the withdrawal before the user confirmed. The budget is back.
customer.balance_updatedA customer wallet changed: data.customer (the customer object) and data.transaction (the movement: a final deposit, a returned deposit, a transfer, a skin withdrawal or what came back from it).
customer.frozenA customer wallet was frozen: by you, by us, or automatically when a returned deposit took it below zero. data.transaction is null.
test.pingSent by POST /webhooks/test and the dashboard test button.

Events can arrive more than once and, rarely, out of order. Use the delivery id to ignore duplicates, and compare data.status / data.updated_at with what you stored before acting.

Verify signatures

Every webhook is signed with your project's webhook secret (whsec_…, in the dashboard next to your API keys). The SkinsGateway-Signature header holds a timestamp and an HMAC-SHA256:

SkinsGateway-Signature: t=<unix timestamp>,v1=<hex HMAC-SHA256(webhook_secret, "<t>.<raw body>")>
  1. Read the raw request body, before any JSON parsing.
  2. Split the header into t and v1.
  3. Compute HMAC-SHA256 of t + "." + body with your webhook secret as the key, hex-encoded.
  4. Compare it with v1 in constant time, and reject timestamps older than 5 minutes.
PHP
<?php
$secret    = getenv('SKINSGATEWAY_WEBHOOK_SECRET');           // whsec_…
$body      = file_get_contents('php://input');
$header    = $_SERVER['HTTP_SKINSGATEWAY_SIGNATURE'] ?? '';

parse_str(str_replace(',', '&', $header), $sig);            // ['t' => …, 'v1' => …]
$expected  = hash_hmac('sha256', ($sig['t'] ?? '') . '.' . $body, $secret);

if (!isset($sig['t'], $sig['v1'])
    || !hash_equals($expected, $sig['v1'])
    || abs(time() - (int) $sig['t']) > 300) {
    http_response_code(400);
    exit;
}

$event = json_decode($body, true);
if ($event['event'] === 'deposit.success' || $event['event'] === 'deposit.hold_approved') {
    // credit $event['data']['order_id'] once (check you haven't already)
}
http_response_code(200);
Node.js
// Node.js + Express
const crypto = require('crypto');
const express = require('express');
const app = express();

app.post('/webhooks/skinsgateway', express.raw({ type: 'application/json' }), (req, res) => {
  const header = req.get('SkinsGateway-Signature') || '';
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = crypto
    .createHmac('sha256', process.env.SKINSGATEWAY_WEBHOOK_SECRET)   // whsec_…
    .update(`${parts.t}.${req.body}`)
    .digest('hex');

  const valid = parts.v1 && parts.v1.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected)) &&
    Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  if (!valid) return res.sendStatus(400);

  const event = JSON.parse(req.body);
  // handle event.event / event.data …
  res.sendStatus(200);
});

Retries

We send every event right away. If your endpoint does not answer with a 2xx (or times out), we retry with growing delays:

Retry12345678
After1 min5 min15 min1 h3 h6 h12 h24 h

That is 9 attempts over about two days. After the last one the delivery is marked failed. You can see every delivery in the dashboard and with GET /webhooks, and send any of them again with POST /webhooks/{id}/resend.

Testing tips

  • Start in test mode: use your sk_test_… secret to run every flow, including failures and Trade Protection, without real skins or money.
  • Check your setup: GET /project confirms your keys, and live: true means the project can take payments.
  • Test your webhook endpoint with POST /webhooks/test. It sends a signed test.ping exactly like a real event, so your signature check runs too.
  • Make a small real payment. Create a deposit with a low max_amount, open pay_url with your own Steam account and send a cheap item. You'll see every status and webhook end to end.
  • Try the failure paths: decline the trade offer in Steam (deposit.fail), or let a short link expire (expires_in=300 → deposit.expired).
  • Expose a local endpoint with a tunnel (for example ngrok or Cloudflare Tunnel) so webhooks can reach your machine. URLs must be public https://.
  • Replay events from the dashboard or with POST /webhooks/{id}/resend to make sure your handler ignores duplicates.
  • Check availability with GET /status before showing the skins option, so customers don't start a payment during maintenance.

Support

Stuck? Write to [email protected] with your project ID, the request you sent (without your secret) and the dep_…, pur_… or whd_… ID involved. For volume pricing or a deeper integration, contact [email protected]. Current system status is on the status page.