# Token Recovery

Recover tokens that were accidentally sent using the wrong token or on the wrong blockchain network.

***

## Overview

MakaPay's Token Recovery feature allows merchants to recover funds when customers make payment mistakes, such as:

* **Wrong Token**: Customer sends USDC instead of USDT (or vice versa)
* **Wrong Chain**: Customer sends tokens on Ethereum when payment was expected on Polygon
* **Custom Tokens**: Recovery of unsupported tokens sent to payment addresses

The recovery process is self-service through the dashboard and typically completes within a few minutes.

***

## Prerequisites

Before using token recovery:

1. **Gas Tank Balance**: You need at least **0.10 USDT** in your Gas Tank to cover recovery fees
2. **Payment Status**: The payment must exist in your dashboard (any status)
3. **Token Balance**: Tokens must be present at the payment address

***

## Step-by-Step Recovery Process

### Step 1: Navigate to the Payment

1. Go to **Dashboard > Payments**
2. Find the payment with the wrong token/chain issue
3. Click on the payment to view details

### Step 2: Open Token Recovery

1. In the payment details, click the **"Recover Tokens"** button
2. The Token Recovery modal will open
3. The system automatically scans all supported chains for recoverable tokens

### Step 3: Review Found Tokens

The system checks for tokens across all supported networks:

* **Ethereum** (Mainnet)
* **Polygon** (MATIC)
* **BNB Smart Chain** (BSC)
* **MakaChain**

For each chain, supported tokens are scanned:

* USDT
* USDC

Results are grouped by chain:

* **"Original"** badge: Tokens on the payment's intended chain
* **"Wrong Chain"** badge: Tokens sent on a different network

### Step 4: Recover Tokens

1. Click the chain to expand the token list
2. Review the token balance and address
3. Click **"Recover"** next to the token you want to recover
4. Wait for the transaction to complete (usually 1-3 minutes)
5. Success message will show the recovered amount

### Step 5: Verify Recovery

* Recovered tokens are sent directly to your **merchant wallet address**
* The recovery modal will refresh to show updated balances
* Check your wallet to confirm receipt

***

## Recovery Fees

Token recovery uses your Gas Tank balance to pay for blockchain transaction fees:

| Network   | Typical Fee                              |
| --------- | ---------------------------------------- |
| MakaChain | \~$0.01                                  |
| Polygon   | \~$0.01 - $0.05                          |
| BSC       | \~$0.05 - $0.10                          |
| Ethereum  | \~$0.50 - $5.00 (varies with gas prices) |

**Important**:

* Minimum Gas Tank balance required: **$0.10 USDT**
* Merchant receives **100% of recovered tokens** (no platform fee)
* Only the blockchain gas fee is deducted from your Gas Tank

***

## Custom Token Recovery

If a customer sent an unsupported token (not USDT or USDC):

1. Open the Token Recovery modal
2. Scroll to **"Custom token address"** section
3. Enter the token's contract address (e.g., `0x...`)
4. Click the search icon to check the balance
5. If tokens are found, proceed with recovery

**Note**: Custom token recovery only works if the token is a standard ERC-20 token.

***

## Cross-Chain Recovery (Wrong Network)

This is the most common recovery scenario. Example:

> Customer was supposed to send USDT on Polygon, but sent USDT on Ethereum instead.

### How It Works

1. MakaPay uses **CREATE2 deterministic addresses** - the same payment address exists on all EVM-compatible chains
2. The Token Recovery feature scans all chains for the same address
3. You can recover tokens from any supported chain, regardless of the original payment network

### Recovery Process

1. Open Token Recovery for the payment
2. Look for chains with the **"Wrong Chain"** badge
3. Expand the chain to see token balances
4. Click **"Recover"** to process the recovery
5. Tokens are transferred to your merchant address on that chain

***

## Troubleshooting

### "Insufficient Gas Tank Balance"

**Problem**: Your Gas Tank balance is below the minimum required.

**Solution**:

1. Go to **Dashboard > Gas Tank**
2. Deposit at least $0.10 USDT
3. Wait for deposit confirmation
4. Retry the recovery

### "No tokens found"

**Problem**: The scan shows no recoverable tokens.

**Possible causes**:

* Tokens haven't arrived yet (check block explorer)
* Tokens were already recovered
* Token is not supported (try custom token address)

**Solution**:

1. Verify the transaction on a block explorer (Etherscan, Polygonscan, etc.)
2. Confirm the destination address matches the payment address
3. Try the custom token input if using a non-standard token

### "Transaction Failed"

**Problem**: Recovery transaction reverted on-chain.

**Possible causes**:

* Network congestion
* Insufficient token balance
* Smart contract issue

**Solution**:

1. Wait a few minutes and try again
2. Check if the token balance is still present
3. Contact support if the issue persists

### "Transaction Pending"

**Problem**: Recovery is taking longer than expected.

**Cause**: Network congestion or slow block times.

**Solution**:

1. Do NOT retry immediately (may cause duplicate transactions)
2. Check your transaction history for pending transactions
3. Wait for confirmation (can take 5-15 minutes on Ethereum during congestion)

***

## Frequently Asked Questions

### Can I recover any token?

You can recover:

* **Automatically detected**: USDT, USDC on all supported chains
* **Custom tokens**: Any ERC-20 compatible token using the custom address field

### Is there a fee for recovery?

* **Platform fee**: None (merchant receives 100%)
* **Gas fee**: Paid from your Gas Tank (varies by network)

### How long does recovery take?

| Network   | Typical Time           |
| --------- | ---------------------- |
| MakaChain | 1-5 seconds            |
| Polygon   | 30 seconds - 2 minutes |
| BSC       | 30 seconds - 2 minutes |
| Ethereum  | 1-5 minutes            |

### Can I recover tokens from an expired payment?

Yes, token recovery works regardless of payment status (pending, expired, completed, etc.).

### What if I sent tokens to the wrong MakaPay address?

Token recovery only works for the specific payment address. If tokens were sent to a different payment address:

1. Find the correct payment in your dashboard
2. Use Token Recovery on that payment instead

### Can I recover native tokens (ETH, MATIC, BNB)?

Currently, only ERC-20 tokens are supported. Native token recovery is not yet available.

***

## Support

If you encounter issues not covered in this guide:

* **Dashboard Chat**: Click the support icon in the dashboard
* **Email**: <support@makapay.io>
* **Include**: Payment ID, transaction hash, and error message


---

# 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://docs.makapay.io/guides/token-recovery.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.
