> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.clixpesa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.clixpesa.com/_mcp/server.

# Test the mock onramp

The mock onramp follows the production HTTP contract while replacing the live fiat provider with a short
simulated payment delay. Settlement sends test USDC from a server-controlled wallet on Base Sepolia.

> **Warning**
>
> Use a dedicated test wallet only. Never provide a recovery phrase, mainnet private key, or customer key.

## Prerequisites

* A local checkout of the Ramps API
* Firebase development credentials and Data Connect configuration
* A dedicated Base Sepolia wallet funded with test ETH and test USDC
* Bun installed locally

## Configure the service

```dotenv
NODE_ENV=development
FIREBASE_PROFILE=dev
ONRAMP_MODE=mock

BASE_SEPOLIA_RPC_URL=https://base-sepolia-rpc.publicnode.com
MOCK_ONRAMP_PRIVATE_KEY=0x_your_dedicated_test_private_key
MOCK_ONRAMP_MAX_USDC=20
MOCK_ONRAMP_PAYMENT_DELAY_MS=2000
MOCK_ONRAMP_SETTLEMENT_DELAY_MS=3000
```

The mock accepts a 32-byte hexadecimal MetaMask private key with or without the `0x` prefix. It rejects
recovery phrases, production mode, non-USDC assets, non-Base-Sepolia networks, invalid addresses, and
amounts above the configured limit.

## Test from the interactive reference

#### Start the API

Run `bun run dev` from the `ramps-v2` repository.

#### Open Scalar

Visit [http://localhost:3000/openapi](http://localhost:3000/openapi) and select the local development
server.

#### Open Create an onramp

The request body is pre-filled with a KES mobile-money to Base Sepolia USDC example.

#### Use your recipient address

Replace the placeholder destination address, choose a unique `idempotency-key`, and send the request.

#### Check the result

Query `POST /onramp/status` until the transaction reaches `complete` and includes the Base Sepolia hash.

> **Note**
>
> A successful HTTP response initially reports `processing`. The token transfer happens asynchronously
> after the settlement delay.