# 暗号資産でのチャージ

> LocalSERP Proxy API：暗号資産チャージ、正確な金額、送金済みの報告（TXIDは任意）、ステータス。パラメーター、レスポンス例、curl、Python、Node.jsのコード。

- URL: https://localserpproxy.com/ja/docs/api/top-ups/
- 最終更新日: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

暗号資産で残高をチャージできます。入金アドレスと正確な金額を取得し、その金額を過不足なく送金して、支払い済みとして報告します（取引IDは任意）。その後、残高に反映されるまでチャージ状況を確認できます。残高はすべてのプランのお支払いに利用できます。

**このページのエンドポイント**

- `GET /v1/catalog/coins`: 対応する暗号資産とネットワーク（固定の入金アドレス付き）
- `POST /v1/topups`: 残高への暗号資産チャージを開始（固定アドレス、正確な金額）
- `POST /v1/topups/{topUpId}/txid`: 送金済みとして報告（TXIDは任意）
- `GET /v1/topups/{topUpId}`: チャージ情報を取得（最新ステータスを確認）
- `GET /v1/topups`: 暗号資産チャージの一覧を取得

ベースURL `https://localserpproxy.com/api/v1`。認証、エラー、制限については[API概要](https://localserpproxy.com/ja/docs/api/)]をご覧ください。

## 対応する暗号資産とネットワーク（固定入金アドレス付き）

`GET /v1/catalog/coins`

公開情報：APIキーは不要です。

**レスポンス** `200 OK`

```json
{
  "data": [
    {
      "code": "BTC",
      "name": "Bitcoin",
      "networks": [
        {
          "id": "bitcoin",
          "name": "Bitcoin",
          "confirmationsRequired": 2,
          "estimatedMinutes": null,
          "memoRequired": false,
          "address": "DEPOSIT_ADDRESS"
        }
      ]
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/coins"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/coins", 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}/catalog/coins`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## 残高への暗号資産チャージを開始（固定アドレス、指定額）

`POST /v1/topups`

- `amountUsd` ≥ 25.00 USD、かつ上限以下（デフォルトは10,000.00）：それ以外の場合は`422`（`amountUsd`上）。
- `coin` + `network`は`GET /v1/catalog/coins`のいずれかである必要があります（それ以外の場合は`409 coin_unavailable`）。
- ネットワークの**固定**`address`と、コインの小数桁数に合わせて**切り上げ**た正確な`amountCrypto` = `amountUsd` / `rate`を返します（BTC/LTC/ETH/SOLは小数点以下8桁、USDT/USDCは6桁）。さらに、同じネットワークで未完了のチャージが複数ある場合に金額が重複しないよう、末尾の桁に小さな固有の差額を加えます。`rate`は`expiresAt`まで（30分間）ロックされます。`txidDeadline` = `expiresAt` + 72 h。
- `POST /v1/orders`と同じ本文の`purchase`は任意です。入力内容は検証され、現在の価格で計算されます（`422`。フィールド名には`purchase.`、`409 plan_unavailable`…が付加されます）。`amountUsd`は、合計額`purchase`から現在の残高を差し引いた額をカバーする必要があります（`amountUsd`上の`422 too_small`）。チャージが残高に反映されると、同じトランザクション内で残高から注文が行われます。`purchase.status`は`completed`（`orderId`付き）または`failed`（`failureReason`。資金は残高に残ります）になります。

認証：`Authorization: Bearer API_KEY`ヘッダーにAPIキーを指定します。

**パラメーター**

| 名前 | 場所 | 型 | 必須 | 説明 |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | いいえ | POSTを安全に再試行するための一意のキー（例：UUID）。24 h保持。— 最大128文字 |

**リクエストボディ**

| フィールド | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `amountUsd` | string (USD, 2 decimals) | はい | 追加するUSD：≥ 25.00、デフォルトの上限は≤ 10,000.00。 |
| `coin` | string | はい | — |
| `network` | string | はい | — |
| `purchase` | object | いいえ | チャージが残高に反映されたら、その残高から購入する予定です（`POST /v1/orders`と同じ本文）。 |

*例: 残高*

```json
{
  "amountUsd": "50.00",
  "coin": "USDT",
  "network": "tron"
}
```

*例: チェックアウト*

```json
{
  "amountUsd": "25.00",
  "coin": "BTC",
  "network": "bitcoin",
  "purchase": {
    "planId": "res-10",
    "quantity": 1
  }
}
```

**レスポンス** `201 Created`

```json
{
  "id": "top_7d2kq9x1",
  "status": "verifying",
  "final": false,
  "amountUsd": "25.00",
  "coin": "USDT",
  "network": "tron",
  "address": "DEPOSIT_ADDRESS",
  "amountCrypto": "25.000137",
  "rate": "1.00",
  "paymentUri": "PAYMENT_URI",
  "expiresAt": "2026-10-05T14:33:11Z",
  "txidDeadline": "2026-10-08T14:33:11Z",
  "confirmationsRequired": 20,
  "confirmations": 7,
  "txid": "9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "txidSubmittedAt": "2026-10-05T14:09:42Z",
  "amountReceivedCrypto": "25.000137",
  "explorerUrl": "https://tronscan.org/#/transaction/9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "creditedUsd": null,
  "creditedAt": null,
  "rejection": null,
  "purchase": {
    "planId": "res-10",
    "planName": "Local team",
    "quantity": 1,
    "options": {},
    "promoCode": null,
    "total": "7.50",
    "status": "pending",
    "orderId": null,
    "failureReason": null
  },
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/topups" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amountUsd":"50.00","coin":"USDT","network":"tron"}'
```

*Python*

```python
import os, uuid
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}

r = requests.post(f"{API}/topups", headers=HEADERS, json={"amountUsd": "50.00", "coin": "USDT", "network": "tron"}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
import { randomUUID } from 'node:crypto';

const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/topups`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Idempotency-Key': randomUUID(), 'Content-Type': 'application/json' },
  body: JSON.stringify({ amountUsd: '50.00', coin: 'USDT', network: 'tron' }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## 支払いを送金済みとして報告

`POST /v1/topups/{topUpId}/txid`

ウォレットまたは取引所から送金したら、支払いを送金済みとして報告してください。これは「支払いを送金しました」ボタンに相当するAPI版です。取引ID（TXID）は任意です。空の本文（`{}`）を送信するか、取引IDがある場合は`txid`を追加してください。支払いは、チャージのネットワークとアドレス宛てに正確な金額（`amountCrypto`）を送金することで、このチャージと照合されます。必ず正確な金額を送金してください。

チャージが`awaiting_payment`、`expired`、`rejected`のいずれかの状態で、`txidDeadline`（`expiresAt` + 72 h）より前であれば報告できます。報告が遅れても、支払いが失われることはありません。`txid`を入力した場合は、ネットワークの形式（`txid`上の`422`）に合っているか確認され、別のチャージで使用されていない必要があります（`409 txid_already_used`）。チャージが終了している場合は`409 topup_closed`が返されます。報告後、ブロックチェーン上で支払いを確認する間、チャージは`verifying`となり、ネットワークで取引が確認されると`credited`、または`rejected`（`rejection`付き）となります。

認証：`Authorization: Bearer API_KEY`ヘッダーにAPIキーを指定します。

**パラメーター**

| 名前 | 場所 | 型 | 必須 | 説明 |
| --- | --- | --- | --- | --- |
| `topUpId` | path | string | はい | — |

**リクエストボディ**

| フィールド | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `txid` | string | いいえ | 任意。取引ハッシュ：64桁の16進数（bitcoin、litecoin、tron）、0x + 64桁の16進数（ethereum）、base58署名（solana）。空欄または省略した場合、支払いは正確な金額で照合されます。— 最大128文字 |

*例: 支払いを送信しました*

```json
{}
```

*例: TXIDを入力（任意）*

```json
{
  "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
}
```

**レスポンス** `200 OK`

```json
{
  "id": "top_7d2kq9x1",
  "status": "verifying",
  "final": false,
  "amountUsd": "25.00",
  "coin": "USDT",
  "network": "tron",
  "address": "DEPOSIT_ADDRESS",
  "amountCrypto": "25.000137",
  "rate": "1.00",
  "paymentUri": "PAYMENT_URI",
  "expiresAt": "2026-10-05T14:33:11Z",
  "txidDeadline": "2026-10-08T14:33:11Z",
  "confirmationsRequired": 20,
  "confirmations": 7,
  "txid": "9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "txidSubmittedAt": "2026-10-05T14:09:42Z",
  "amountReceivedCrypto": "25.000137",
  "explorerUrl": "https://tronscan.org/#/transaction/9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "creditedUsd": null,
  "creditedAt": null,
  "rejection": null,
  "purchase": {
    "planId": "res-10",
    "planName": "Local team",
    "quantity": 1,
    "options": {},
    "promoCode": null,
    "total": "7.50",
    "status": "pending",
    "orderId": null,
    "failureReason": null
  },
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/topups/top_7d2kq9x1/txid" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

*Python*

```python
import os
import requests

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

r = requests.post(f"{API}/topups/top_7d2kq9x1/txid", headers=HEADERS, json={}, 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}/topups/top_7d2kq9x1/txid`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## チャージ情報を取得（ステータスをリアルタイムで確認）

`GET /v1/topups/{topUpId}`

チャージの状況を確認するには、このエンドポイントをポーリングしてください。`status = verifying`の間は10秒ごと、支払い待ちの間は30秒ごとに確認し、`final = true`になったら停止します。`expiresAt`までに支払いを送信したと報告しなかった場合、チャージは`expired`になります。ただし、`txidDeadline`までは送信済みとして報告できます。

認証：`Authorization: Bearer API_KEY`ヘッダーにAPIキーを指定します。

**パラメーター**

| 名前 | 場所 | 型 | 必須 | 説明 |
| --- | --- | --- | --- | --- |
| `topUpId` | path | string | はい | — |

**レスポンス** `200 OK`

```json
{
  "id": "top_7d2kq9x1",
  "status": "verifying",
  "final": false,
  "amountUsd": "25.00",
  "coin": "USDT",
  "network": "tron",
  "address": "DEPOSIT_ADDRESS",
  "amountCrypto": "25.000137",
  "rate": "1.00",
  "paymentUri": "PAYMENT_URI",
  "expiresAt": "2026-10-05T14:33:11Z",
  "txidDeadline": "2026-10-08T14:33:11Z",
  "confirmationsRequired": 20,
  "confirmations": 7,
  "txid": "9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "txidSubmittedAt": "2026-10-05T14:09:42Z",
  "amountReceivedCrypto": "25.000137",
  "explorerUrl": "https://tronscan.org/#/transaction/9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
  "creditedUsd": null,
  "creditedAt": null,
  "rejection": null,
  "purchase": {
    "planId": "res-10",
    "planName": "Local team",
    "quantity": 1,
    "options": {},
    "promoCode": null,
    "total": "7.50",
    "status": "pending",
    "orderId": null,
    "failureReason": null
  },
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/topups/top_7d2kq9x1" \
  -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}/topups/top_7d2kq9x1", 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}/topups/top_7d2kq9x1`, {
  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/topups`

認証：`Authorization: Bearer API_KEY`ヘッダーにAPIキーを指定します。

**パラメーター**

| 名前 | 場所 | 型 | 必須 | 説明 |
| --- | --- | --- | --- | --- |
| `page` | query | integer | いいえ | 1以上、デフォルトは`1` |
| `perPage` | query | integer | いいえ | 1～100、デフォルトは`20` |
| `status` | query | `awaiting_payment` · `verifying` · `credited` · `rejected` · `expired` | いいえ | `final` = 入金済み、または`txidDeadline`後に期限切れ／拒否。 |

**レスポンス** `200 OK`

```json
{
  "data": [
    {
      "id": "top_7d2kq9x1",
      "status": "verifying",
      "final": false,
      "amountUsd": "25.00",
      "coin": "USDT",
      "network": "tron",
      "address": "DEPOSIT_ADDRESS",
      "amountCrypto": "25.000137",
      "rate": "1.00",
      "paymentUri": "PAYMENT_URI",
      "expiresAt": "2026-10-05T14:33:11Z",
      "txidDeadline": "2026-10-08T14:33:11Z",
      "confirmationsRequired": 20,
      "confirmations": 7,
      "txid": "9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
      "txidSubmittedAt": "2026-10-05T14:09:42Z",
      "amountReceivedCrypto": "25.000137",
      "explorerUrl": "https://tronscan.org/#/transaction/9d2e5c0b1f7a4e3d8c6b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f41c7",
      "creditedUsd": null,
      "creditedAt": null,
      "rejection": null,
      "purchase": {
        "planId": "res-10",
        "planName": "Local team",
        "quantity": 1,
        "options": {},
        "promoCode": null,
        "total": "7.50",
        "status": "pending",
        "orderId": null,
        "failureReason": null
      },
      "createdAt": "2026-10-05T14:03:11Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 1,
    "totalPages": 1
  }
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/topups" \
  -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}/topups", 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}/topups`, {
  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は、都市ごとにローカル検索結果、広告、価格を確認するための米国のレジデンシャルプロキシサービスで、暗号資産で支払い、身分証明書のアップロードは不要です。
