# Create merchant deposit

`POST /v2/merchant/create-deposit`

Create a deposit for a user. You can create a deposit in two ways:

1. Load a user's inventory BEFORE creating a deposit. Create a deposit with an already filled array of items (`steam_id`, `trade_url_token`, `game`, `items` ARE REQUIRED FOR THIS ACTION!).

2. Create a deposit without items, call the /create-steam-offer method later.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api` | query | string | required | Your [WAXPEER API](https://waxpeer.com/profile/user) |

## Request body

```json
{
  "merchant": "mymerchant",
  "deposit_id": "123456asd",
  "steam_id": "76561198000000000",
  "trade_url_token": "abcdefgh",
  "game": "csgo",
  "items": [
    "123",
    "456",
    "789"
  ]
}
```

## Example (curl)

```bash
curl -X POST 'https://api.waxpeer.com/v2/merchant/create-deposit?api=%7B%7BAPI_KEY%7D%7D' \
  -H 'Content-Type: application/json' \
  -d '{
  "merchant": "mymerchant",
  "deposit_id": "123456asd",
  "steam_id": "76561198000000000",
  "trade_url_token": "abcdefgh",
  "game": "csgo",
  "items": [
    "123",
    "456",
    "789"
  ]
}'
```

## Example response

```json
{
  "status": "success",
  "url": "https://pay.waxpeer.com/merchant/mymerchant?hash=7USFcwzEvgxs6l2u3ow4IQxlgJBYEZZt",
  "transaction_id": 123456,
  "hash": "7USFcwzEvgxs6l2u3ow4IQxlgJBYEZZt",
  "listed": [
    {
      "name": "AWP | Asiimov (Field-tested)",
      "item_id": "141414144",
      "price": 1000
    }
  ],
  "failed": [
    {
      "item_id": "141414145",
      "price": 1000,
      "name": "AWP | Asiimov (Field-tested)",
      "error_message": "item_not_acceptable"
    }
  ]
}
```

## Responses

- `200` **Please open the schema to see the response structure, fields and their descriptions**

## Notes for agents

- Auth is the query parameter `api`, not an Authorization header.
- See [/statuses.md](/statuses.md) for numeric trade status plus `escrow_status` / `release_date`.
- Prefer GET /v2/search-items-by-name over v1.
- Do not use GET /v1/ready-to-transfer-p2p; use the [trade websocket](/websocket.md).
