# 3. Receive deposit request

<figure><img src="/files/Suin4uIHacgSPkrAGwRw" alt=""><figcaption></figcaption></figure>

## **Description**

ใช้สำหรับแจ้งฝากเงินไปยังเว็บไซต์ปลายทาง

Used to notify a deposit to the target website.

## **Endpoint URL**

`POST` /  `endpoint-tch/deposit`  (สามารถตั้งชื่อ endpoint url เป็นชื่ออื่นได้; You can name the endpoint URL something else if desired.)

## **Request Body**

```typescript
{
    "userId": string
    "amount": number
}
```

### **Success Response**

* **HTTP Status Code**: `200`
* **Structure**:

  <pre class="language-typescript"><code class="lang-typescript"><strong>{
  </strong>  "status": "success",
    "code": 200,
    "message": "Deposit successfully.",
    "data": {
      "userId": string,
      "deposit": number
    }
  }
  </code></pre>

### **Error Responses**

* **400 Bad Request**: จำนวนเงินห้ามติดลบ (The amount must not be negative.)

  ```typescript
  {
    "status": "error",
    "code": 400,
    "message": "The amount must not be negative."
  }
  ```
* **404 Not Found**: ไม่พบข้อมูลผู้ใช้งาน UserId (User ID not found.)

  ```typescript
  {
    "status": "error",
    "code": 404,
    "message": "User ID not found."
  }
  ```
* **500 Internal Server Error**: error นอกเหนือจากที่กำหนดไว้ เช่น error try catch (Errors other than those specified, such as try-catch errors.)
* ```typescript
  {
    "status": "error",
    "code": 500,
    "message": string
  }
  ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://document.thaicasino.tech/getting-started/step-3-setup-url-endpoint/3.-receive-deposit-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
