# Rechargements en crypto

> API LocalSERP Proxy : recharges en crypto, montant exact, paiement envoyé (TXID facultatif) et statut. Paramètres, exemples de réponses et code curl, Python et Node.js.

- URL: https://localserpproxy.com/fr/docs/api/top-ups/
- Dernière mise à jour: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Rechargez votre solde en crypto : obtenez l’adresse de dépôt et le montant exact, envoyez exactement ce montant, indiquez que le paiement a été envoyé (l’ID de transaction est facultatif), puis suivez le rechargement jusqu’à ce que le solde soit crédité. Le solde permet de payer n’importe lequel de nos forfaits.

**Points de terminaison sur cette page**

- `GET /v1/catalog/coins` : Cryptomonnaies et réseaux acceptés (avec leur adresse de dépôt fixe)
- `POST /v1/topups` : Démarrer une recharge du solde en crypto (adresse fixe, montant exact)
- `POST /v1/topups/{topUpId}/txid` : Signaler l’envoi du paiement (TXID facultatif)
- `GET /v1/topups/{topUpId}` : Obtenir une recharge (vérifier son statut en temps réel)
- `GET /v1/topups` : Lister les recharges en crypto

URL de base `https://localserpproxy.com/api/v1`. Pour l’authentification, les erreurs et les limites, consultez la [présentation de l’API](https://localserpproxy.com/fr/docs/api/).

## Cryptomonnaies et réseaux acceptés (avec leur adresse de dépôt fixe)

`GET /v1/catalog/coins`

Public : aucune clé API requise.

**Réponse** `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());
```

## Lancer un rechargement du solde en crypto (adresse fixe, montant exact)

`POST /v1/topups`

- `amountUsd` ≥ 25.00 USD et ≤ le maximum (10,000.00 par défaut) : `422` sur `amountUsd`, sinon.
- `coin` + `network` doit correspondre à l’une des valeurs suivantes : `GET /v1/catalog/coins` (sinon `409 coin_unavailable`).
- Renvoie l’`address` **fixe** du réseau et le `amountCrypto` exact = `amountUsd` / `rate`, arrondi **au supérieur** selon la précision de la cryptomonnaie (BTC/LTC/ETH/SOL : 8 décimales, USDT/USDC : 6), avec un petit décalage unique sur les derniers chiffres afin que deux rechargements ouverts sur le même réseau ne demandent jamais le même montant. `rate` est verrouillé jusqu’à `expiresAt` (30 minutes) ; `txidDeadline` = `expiresAt` + 72 h.
- `purchase` facultatif (même corps que `POST /v1/orders`) : validé et tarifé immédiatement (`422` avec les noms de champs préfixés par `purchase.`, `409 plan_unavailable`…). `amountUsd` doit couvrir le total de `purchase` − le solde actuel (`422 too_small` sur `amountUsd`). Lorsque le rechargement est crédité, la commande est passée depuis le solde dans la même transaction ; `purchase.status` devient `completed` (avec `orderId`) ou `failed` (`failureReason` ; les fonds restent sur le solde).

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | Non | Clé unique (par exemple un UUID) pour réessayer une requête POST en toute sécurité. Conservée 24 h. — 128 caractères max. |

**Corps de la requête**

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `amountUsd` | string (USD, 2 decimals) | Oui | Montant à ajouter en USD : ≥ 25.00, ≤ 10,000.00 par défaut. |
| `coin` | string | Oui | — |
| `network` | string | Oui | — |
| `purchase` | object | Non | Prévoir un achat depuis le solde une fois le rechargement crédité (même corps que `POST /v1/orders`). |

*Exemple: Solde*

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

*Exemple: Paiement*

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

**Réponse** `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());
```

## Signaler que le paiement a été envoyé (TXID facultatif)

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

Signalez que le paiement a été envoyé dès qu’il a quitté votre portefeuille ou votre plateforme d’échange : c’est la version API du bouton « J’ai envoyé le paiement ». L’identifiant de transaction (TXID) est facultatif : envoyez un corps vide (`{}`) ou ajoutez `txid` si vous l’avez. Votre paiement est associé à ce rechargement grâce à son montant exact (`amountCrypto`), sur le réseau et à l’adresse du rechargement : envoyez donc exactement ce montant.

Accepté tant que le rechargement est `awaiting_payment`, `expired` ou `rejected`, et avant `txidDeadline` (`expiresAt` + 72 h) : un signalement tardif ne fait jamais perdre un paiement. Le format d’un `txid`, s’il est fourni, est vérifié selon les règles du réseau (`422` sur `txid`) et il ne doit pas être associé à un autre rechargement (`409 txid_already_used`). Un rechargement clôturé renvoie `409 topup_closed`. Le rechargement passe alors à l’état `verifying` pendant la vérification du paiement sur la blockchain, puis se termine par `credited` une fois la transaction confirmée par le réseau, ou par `rejected` (avec `rejection`).

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `topUpId` | path | string | Oui | — |

**Corps de la requête**

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `txid` | string | Non | Facultatif. Hash de transaction : 64 caractères hexadécimaux (bitcoin, litecoin, tron), 0x + 64 caractères hexadécimaux (ethereum), signature base58 (solana). Vide ou absent : le paiement est associé grâce à son montant exact. — 128 caractères max. |

*Exemple: Paiement envoyé*

```json
{}
```

*Exemple: Avec le TXID (facultatif)*

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

**Réponse** `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());
```

## Obtenir un rechargement (suivre son statut en temps réel)

`GET /v1/topups/{topUpId}`

Interrogez cette route pour suivre un rechargement : toutes les 10 s tant que `status = verifying`, toutes les 30 s pendant l’attente du paiement, puis arrêtez lorsque `final = true`. Un rechargement passe à l’état `expired` si le paiement n’a pas été signalé comme envoyé avant `expiresAt` ; il peut encore être signalé jusqu’à `txidDeadline`.

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `topUpId` | path | string | Oui | — |

**Réponse** `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());
```

## Lister les rechargements en crypto

`GET /v1/topups`

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | Non | ≥ 1, par défaut `1` |
| `perPage` | query | integer | Non | 1–100, par défaut `20` |
| `status` | query | `awaiting_payment` · `verifying` · `credited` · `rejected` · `expired` | Non | `final` = crédité, ou expiré / refusé après `txidDeadline`. |

**Réponse** `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 est un service de proxy résidentiel aux États-Unis pour vérifier les résultats de recherche locaux, les annonces et les prix ville par ville, avec paiement en crypto et sans envoi de pièce d’identité.
