浏览文档并开始使用 Skinify
This method allows you to purchase a skin and send it to a Steam user.
POST https://skinify.io/api/withdraw/buy
| Parameter | Required | Description |
|---|---|---|
| partner | ‘partner’ parameter from user Trade URL | |
| token | ‘token’ parameter from user Trade URL | |
| name + game or id |
Skin name + game (dota2, csgo, rust, tf2) or Skin ID from search results |
|
| max_price | The maximum price of the skin to purchase (in USD). Used as a cost limiter. | |
| custom_id | ID on your system. It can be used to prevent double purchases. |
The response will contain the following data:
| Parameter | Description |
|---|---|
| skin | Object containing data about the purchased skin |
| purchase_id | Purchase ID, used later to track the status of the purchase |
| purchase_status new |
Purchase status 1. processing — trade is being processed2. waiting_accept — waiting for the user to accept trade3. accepted — trade was accepted by the user4. canceled — trade was rejected by the user5. timeout — waiting time for accepting trade has ended (5 minutes)6. error_invalid_token — invalid ‘token’ parameter was passed7. error_user_not_tradable — user has restrictions on accepting trades8. error_create_failed — failed to create trade (try again)9. rollback_user — the trade was canceled by the user after being accepted (Steam Trade Protection)10. rollback_provider — the trade was canceled by the provider after being accepted (Steam Trade Protection)11. reserved new — the item is reserved and waiting for the trade hold to be lifted12. reservation_canceled new — the item reservation was canceled by the user13. error_item_unavailable new — the item is no longer available for purchase |
| date | Purchase date (unix timestamp) |
| balance_debited_amount | The amount debited from the balance |
| custom_id | The custom_id you passed |
| reserved_until new |
Timestamp (in Unix timestamp format) indicating when the trade will move from reserved status to processing status (exists only for trades with reservation) |
{
"status": "success",
"skin": {
"id": "11552",
"name": "Crimson Pique",
"price": 0.3,
"properties": {
"classid":"1723113626"
}
},
"purchase_id": 1,
"purchase_status": "processing",
"date": "1643714026",
"balance_debited_amount": 0.3,
"custom_id": "1234"
}
| Error | Description |
|---|---|
| missing_skin_parameters | Required parameters are missing (name + game or id) |
| name_too_short | The minimum length of the skin name is 3 characters. Check the ‘name’ parameter and what data is passed to it |
| missing_partner_or_token | Missing ‘token’ or ‘partner’ parameters |
| invalid_trade_token | Invalid ‘token’ parameter value |
| insufficient_funds | There are not enough funds on the project balance to purchase a skin |
| skin_unavailable | The skin is not available for purchase |
| skins_not_found_at_specified_price | There are no skins available, the cost of which is <= ‘max_price’ |
| custom_id_exists | A purchase has already been made with the specified custom_id |
| withdraw_unavailable | The withdraw is temporarily unavailable |