# บัญชีและยอดเงิน

> API ของ LocalSERP Proxy: รายละเอียดบัญชี ยอดเงิน USD แบบเติมเงินล่วงหน้า และประวัติยอดเงิน พร้อมพารามิเตอร์ ตัวอย่างการตอบกลับ โค้ด curl, Python และ Node.js

- URL: https://localserpproxy.com/th/docs/api/account/
- อัปเดตล่าสุด: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

ดูการตั้งค่าบัญชี ยอดเงินคงเหลือแบบเติมเงิน USD และรายการเคลื่อนไหวของยอดเงินทั้งหมด (การเติมเงิน การซื้อ และการคืนเงิน)

**จุดเชื่อมต่อในหน้านี้**

- `GET /v1/account`: ดูบัญชีปัจจุบัน
- `GET /v1/balance`: ยอดเงินเติมล่วงหน้าคงเหลือ
- `GET /v1/balance/transactions`: รายการเคลื่อนไหวของยอดเงิน

URL พื้นฐาน `https://localserpproxy.com/api/v1` ดูข้อมูลการยืนยันตัวตน ข้อผิดพลาด และขีดจำกัดได้ที่ [ภาพรวม API](https://localserpproxy.com/th/docs/api/)

## ดูบัญชีปัจจุบัน

`GET /v1/account`

การยืนยันตัวตน: ใช้คีย์ API ในส่วนหัว `Authorization: Bearer API_KEY`

**การตอบกลับ** `200 OK`

```json
{
  "accountNumber": "4821773009125564",
  "createdAt": "2026-10-05T09:12:44Z",
  "email": null,
  "emailVerified": false,
  "hasPassword": false,
  "twoFactorEnabled": false,
  "lang": "en",
  "currency": "USD",
  "balance": "0.00",
  "referralCode": "K7Q2MX",
  "status": "active",
  "notifications": {
    "paymentReceipts": true,
    "lowTraffic": true,
    "expiryReminders": true,
    "productNews": false
  },
  "recoveryCodesRemaining": 0
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/account" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/account", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/account`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## ยอดเงินเติมล่วงหน้าคงเหลือ

`GET /v1/balance`

การยืนยันตัวตน: ใช้คีย์ API ในส่วนหัว `Authorization: Bearer API_KEY`

**การตอบกลับ** `200 OK`

```json
{
  "balance": "29.00",
  "currency": "USD"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/balance" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/balance", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/balance`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## รายการเคลื่อนไหวของยอดเงิน

`GET /v1/balance/transactions`

การยืนยันตัวตน: ใช้คีย์ API ในส่วนหัว `Authorization: Bearer API_KEY`

**พารามิเตอร์**

| ชื่อ | ใน | ประเภท | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `page` | query | integer | ไม่ | ≥ 1 ค่าเริ่มต้น `1` |
| `perPage` | query | integer | ไม่ | 1–100 ค่าเริ่มต้น `20` |
| `type` | query | `top_up` · `purchase` · `refund` · `referral_payout` · `adjustment` | ไม่ | — |

**การตอบกลับ** `200 OK`

```json
{
  "data": [
    {
      "id": "txn_2k9d1m",
      "type": "top_up",
      "amount": "29.00",
      "balanceAfter": "29.00",
      "description": "Top-up · USDT · Tron (TRC-20)",
      "createdAt": "2026-10-05T14:03:11Z",
      "orderId": null,
      "topUpId": "top_7d2kq9x1"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 1,
    "totalPages": 1
  }
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/balance/transactions" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/balance/transactions", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/balance/transactions`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

---

LocalSERP Proxy: LocalSERP Proxy เป็นบริการพร็อกซีเรซิเดนเชียลในสหรัฐฯ สำหรับตรวจสอบผลการค้นหาในพื้นที่ โฆษณา และราคาเป็นรายเมือง ชำระเงินด้วยคริปโตโดยไม่ต้องอัปโหลดเอกสารยืนยันตัวตน.
