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.
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 mode
Build and test your whole integration without real skins or money. Every project has a second secret for this, next to the live one.
What
In test mode
Secret
X-Client-Secret: sk_test_… with the same client ID. Create or roll it on the project page.
livemode
Every object, list and webhook says "livemode": false. Live objects say true. A test secret never sees live objects, and a live secret never sees test objects.
Money
A separate test balance per project, starting at $1,000.00. Test deposits credit it, test purchases spend it. It never mixes with your real balance.
Checkout
pay_url opens a test checkout with a clear "Test mode" banner. Any Steam trade link works, the inventory shows real items with real prices, and test buttons play the customer: accept, accept with Trade Protection, approve, return, decline, expire.
Market
Search and purchases use real item names and prices with simulated offers. Only use item IDs from a test-mode search. test_outcome: accepted (default), waiting_accept, failed, unknown.
Webhooks
Same events, same URL, same signing secret. The body has "livemode": false and the request has an extra header: SkinsGateway-Test: 1.
Drive objects from your server with the simulate endpoints (test secret only; a live secret gets 403 test_mode_only):
POST /test/deposits/{id}/simulate, outcome: pending, in_hold, hold_approved, success, fail, hold_returned, expired. A new deposit gets sample items sent first, within min_amount and max_amount.
Moves that cannot happen in real life get 409 invalid_transition. Test and live mode keep separate order_id and custom_id lists, so you can reuse your real order numbers in test mode.
Check livemode in your webhook handler. Never credit a customer for an event with "livemode": false on your production site.
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:
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"
}
}
HTTP
code
Meaning
401
unauthenticated
Credentials missing.
401
invalid_credentials
Client ID or secret is wrong.
402
insufficient_funds
Balance too low for a purchase.
403
ip_not_allowed
Request IP is not on the project allow-list.
403
project_disabled
The project or business is disabled.
403
project_inactive
The project or its business is switched off by our staff.
404
not_found
Unknown endpoint or object.
409
duplicate_order_id
A deposit with this order_id exists.
409
not_in_hold
Only in_hold deposits can be approved.
409
not_cancelable
The withdrawal was already confirmed by the user.
422
invalid_request
A parameter is missing or invalid; see param.
422
(network codes)
e.g. user_inventory_is_hidden, inventory_is_outdated, user_not_tradable, skin_unavailable.
429
rate_limited
Too many requests; see retry_after.
500
server_error
Our 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.
You send the customer to pay_url (or open embed_url in an iframe).
The customer pastes their trade link, picks items and sees the value, bonus included.
We send a Steam trade offer: status pending, webhook deposit.pending.
The customer accepts in Steam. The deposit becomes success (credited), or in_hold when Steam Trade Protection applies.
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.
Declined, cancelled or timed out. See fail_reason. Nothing credited.
Yes
hold_returned
Steam returned the items during protection. If it was released early, the credit is reversed.
Yes
expired
The 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:
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>
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
Field
Type
Description
id
string
cus_…
livemode
boolean
false for test customers.
reference
string
Your user id.
steam_id, trade_url
string|null
Used for their deposits and skin withdrawals.
status
string
active or frozen.
frozen_reason
string|null
negative (a returned deposit), merchant (you) or staff (us).
balance_usd
number
What the user can spend now. Below zero only after a returned deposit.
pending_usd
number
Deposits released early that join the wallet once the trade is final.
metadata
object
Your key/value pairs.
created_at, updated_at
integer
Unix 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.
Integrations & SDKs
Ready-made plugins for store platforms and small, dependency-free kits for your own code. All of them create deposits through this API and check webhook signatures for you.
Test mode: use your sk_test_ secret with the same client ID. Objects then carry "livemode": false, and test webhooks carry the header SkinsGateway-Test: 1 (isTest() in the SDKs).
Pay button
Opens the hosted checkout in an accessible window over your page (or a popup, or a redirect) and tells your page how the payment went. No dependencies, works under a strict Content Security Policy.
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>
Modal: a dialog with focus trap, Esc to close and full screen on phones. Popup: a separate window; if the browser blocks it, the modal opens instead.
The window closes 2 seconds after a final status. Change it with closeDelay (ms) or turn it off with autoClose: false.
Declarative buttons also fire DOM events you can listen to: skinsgateway:status, skinsgateway:success, skinsgateway:fail and skinsgateway:close.
Your Content Security Policy must allow the script and the frame: script-src https://skinsgateway.com/pay; frame-src https://skinsgateway.com/pay
Browser messages are for your page only. Credit the order when your server receives the signed webhook.
PHP SDK
PHP 8.0 or newer, ext-json and ext-curl. Use it with Composer (PSR-4, namespace SkinsGateway) or copy the single file skinsgateway.php. skinsgateway-php-sdk.zip41 KB
Errors are exceptions with the API error body: InvalidRequestException (400/422), AuthenticationException (401), InsufficientFundsException (402), PermissionException (403), NotFoundException (404), ConflictException (409), RateLimitException (429), ServerException (5xx), all extending ApiException with getErrorCode() and getParam(). NetworkException when the API cannot be reached; GET requests are retried on network errors.
Node.js SDK
Node.js 18 or newer, no dependencies. CommonJS and ES modules, TypeScript types included. skinsgateway-node-sdk.zip16 KB
Same surface as the PHP SDK (camelCase options). Errors: InvalidRequestError, AuthenticationError, InsufficientFundsError, PermissionError, NotFoundError, ConflictError, RateLimitError, ServerError (all ApiError with status, code, param, body), NetworkError.
WooCommerce
Adds "Pay with skins (CS2, Dota 2, Rust)" to the classic and the block checkout. Compatible with High-Performance Order Storage. skinsgateway-woocommerce.zip17 KB
WordPress: Plugins > Add New > Upload Plugin, choose the zip, activate.
WooCommerce > Settings > Payments > SkinsGateway: paste the client ID, API secret and webhook signing secret. Optional: test mode with your test secret, redirect or window checkout, minimum and maximum order totals.
Set your project's webhook URL to: https://your-store.example/?wc-api=skinsgateway
At checkout the plugin creates a deposit with order_id = the order number and min_amount = the order total, in the store currency. The order then follows the deposit (each webhook is verified and the deposit is read again from the API first):
Deposit
Order
success, hold_approved
Paid (processing / completed). Less than the total puts it on hold for review.
in_hold
On hold until Steam Trade Protection ends.
fail, expired
Failed. The customer can pay again from their account.
hold_returned
On hold (or failed if unpaid) with a note to review.
WHMCS
A third-party gateway module: every unpaid invoice gets a "Pay with skins" button. skinsgateway-whmcs.zip10 KB
Unzip into your WHMCS root folder (it contains modules/gateways/…).
Setup > Payments > Payment Gateways > All Payment Gateways > SkinsGateway: paste the client ID, API secret and webhook signing secret.
Set your project's webhook URL to: https://your-whmcs.example/modules/gateways/callback/skinsgateway.php
The button creates a deposit for the invoice balance (order_id INV-<invoice id>) on your server and redirects the client. When the signed webhook arrives the module reads the deposit again and records the payment with the dep_ id as transaction ID.
Amounts: your balance is in USD. Payments are recorded in the invoice currency: exact when the deposit used it, otherwise converted with your WHMCS currency rates (set "Convert To For Processing" for currencies we do not take). The SkinsGateway fee is recorded as the transaction fee.
Webhook verification
Each kit checks the SkinsGateway-Signature header in constant time and refuses signatures older than 5 minutes. Pass the raw body. Then read the object again before you ship anything.
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)
Reference & OpenAPI
The full reference is generated from one machine-readable description of the API. Import it into Postman, Insomnia or your code generator, or hand it to your AI assistant.
Every event we send by webhook is also kept in your project's event log for 30 days, also when no webhook URL is set. Read it to catch up after downtime, or keep a stream open and get events within a second, without a public endpoint.
25 seconds per connection, with a heartbeat comment every 10 seconds; then the stream closes and your client reconnects with Last-Event-ID. Nothing is missed in between.
Without Last-Event-ID (or ?after=) the stream starts with the next new event. Filter with ?type=a,b.
Every webhook body carries the same event_id, so you can use webhooks and the log together and skip duplicates.
Never open the stream from a browser: it needs your secret. Use the SDKs or any Server-Sent Events client on your server.
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]);
Failed webhooks
A delivery that still fails after about two days of retries is marked failed. List those, fix your endpoint, then resend them one by one.
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.
Every movement on the project balance, newest first.
Parameter
Type
Description
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.
Automatic early release rules and skin withdrawal approval for this project. Every key is optional; the answer is the project object (early_release, withdrawals).
Parameter
Type
Description
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.
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. 409duplicate_order_id if the order ID was used before with other parameters. 403project_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.
Parameter
Type
Description
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).
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.
404not_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.
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.
Parameter
Type
Description
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.
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. 402insufficient_funds. 422skin_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.
Parameter
Type
Description
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.
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.
Parameter
Type
Description
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. 402insufficient_customer_funds, 409customer_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.
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.
Parameter
Type
Description
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.
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.
409duplicate_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).
Parameter
Type
Description
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 409idempotency_mismatch.
description
string
Shown in the wallet history (up to 255 characters).
402insufficient_customer_funds (a debit never takes a wallet below zero) or insufficient_funds (a credit your available balance cannot cover). 409customer_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.
409below_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.
Parameter
Type
Description
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).
404not_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.
Parameter
Type
Description
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).
402insufficient_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.
Value shown to the customer, including your bonus.
bonus_multiplier
number
Your project bonus at the time of the deposit (0.5–2).
amount_usd
number|null
Market value in USD.
fee_usd
number|null
SkinsGateway fee, set when credited.
net_usd
number|null
Amount credited to your balance.
credited
boolean
Whether the deposit currently counts towards your balance.
required_amount
number|null
The amount you asked for (min_amount, in currency); null without a minimum.
overpayment_usd
number|null
Value received above required_amount, in USD. 0 when exactly the minimum came in; null without a minimum or before the items are valued.
fulfillment_allowed
boolean
True 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_amount
number|null
Limits you set.
trade_offer_id, trade_offer_url
string|null
The Steam trade offer.
fail_reason
string|null
Why it failed, e.g. trade_timeout, trade_canceled, timeout.
hold_until
integer|null
End of Steam Trade Protection (unix).
user_risk
object|null
Risk signals, only while in_hold.
customer
object|null
steam_id, trust (high, medium, low, new) and trust_score (0–100) of the paying Steam account, across all of SkinsGateway.
early_release
object|null
Set once released before Trade Protection ended: by (manual | auto), held_usd, state (held | released | reversed), available_at (unix, when it joins your available balance).
items
array
Items in the trade: asset_id, name, image, price, price_usd.
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.
Field
Type
Description
id
string
Payout ID, po_….
object
string
Always payout.
status
string
pending (requested, not sent yet), paid (sent; final) or rejected (not sent; the amount is back on your balance).
project
string
The project the money came from, prj_….
method
string
crypto, sepa, ach, paypal or revolut.
destination
object
id (dst_…), label and a masked summary. Full details never leave the dashboard.
amount_usd
number
Taken from your balance.
fee_usd
number
Our payout fee.
net_usd
number
What we send (amount_usd − fee_usd). For crypto, network and conversion fees come out of this amount.
reference
string|null
When paid: bank / PayPal / Revolut reference or the transaction hash.
reason
string|null
When rejected: why.
created_at, completed_at
integer, integer|null
Unix timestamps. completed_at is set once paid or rejected.
Returned by the webhook endpoints. It describes one event we sent you and how delivery went.
Field
Type
Description
id
string
Delivery 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.
event
string
Event name.
url
string
Where we sent it.
status
string
pending (will retry), delivered or failed (gave up).
attempts
integer
Attempts so far.
last_http_code, last_error
integer|null, string|null
Result of the last attempt.
next_attempt_at
integer|null
Next retry (unix), while pending.
delivered_at, created_at
integer|null
Unix 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.
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
Event
When
deposit.pending
A trade offer was sent to the customer.
deposit.in_hold
The customer accepted; Steam Trade Protection applies.
deposit.hold_approved
A held deposit was released early (manually or automatically). Credited to your project; it joins your available balance when the trade is final.
deposit.success
The deposit completed and was credited.
deposit.fail
The trade failed, was declined or timed out.
deposit.hold_returned
Items were returned during protection; any early credit was reversed.
deposit.expired
The checkout link expired unused.
purchase.creating_trade
A market purchase was made; the trade is being created.
purchase.waiting_accept
The trade offer was sent to the customer.
purchase.accepted
The skin was delivered.
purchase.failed
The purchase failed or was cancelled; the money was refunded.
purchase.rolled_back
The delivered skin was returned; the money was refunded.
payout.pending
A payout was requested. The amount moved from available to reserved.
payout.paid
The payout was sent. reference is the bank reference or transaction hash.
payout.rejected
The payout was not sent; reason says why. The full amount is back on your available balance.
balance.topup_credited
Funds you added with crypto in the dashboard were credited. data: object: "topup", id, project, amount_usd, credited_usd, coin, paid_at.
withdrawal.approval_requested
Synchronous, 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.completed
At least one skin was delivered. Unspent budget is back on your available balance; see spent_usd and items.
withdrawal.failed
Nothing was delivered (fail_reason: not_approved, not_delivered, …). The whole budget is back.
withdrawal.expired
The link was never used before expires_at. The budget is back.
withdrawal.canceled
You canceled the withdrawal before the user confirmed. The budget is back.
customer.balance_updated
A 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.frozen
A customer wallet was frozen: by you, by us, or automatically when a returned deposit took it below zero. data.transaction is null.
test.ping
Sent 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:
We send every event right away. If your endpoint does not answer with a 2xx (or times out), we retry with growing delays:
Retry
1
2
3
4
5
6
7
8
After
1 min
5 min
15 min
1 h
3 h
6 h
12 h
24 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.