# Overview

**Onchain Ramp** enables direct stablecoin transactions between wallets and local African currencies. Perfect for DApps and Web3 applications that need seamless fiat on/off ramps.

## Features

* **Multi-Chain Support**: CELO, Optimism, Base, and more
* **Low Network Fees**: Starting from $0.01 per transaction
* **Wallet Integration**: Native support for MetaMask and others
* **Custom Flow Support**: Build your own wallet experience
* **Multiple Stablecoins**: USDC, CUSD, USDT support
* **Instant Processing**: Fast settlement times

## Integration Steps

1. **Build URL**

   ```javascript
   const params = new URLSearchParams({
     key: "CSHRMP-PUBK_xxx",
     paymentType: "deposit",
     coin: "USDC",
     network: "CELO",
     amount: "100",
     redirectUrl: "https://your-app.com/callback",
   });

   const url = `https://useaccrue.com/hosted/ramp?${params}`;
   ```
2. **Handle Wallet**

   ```javascript
   // Option 1 (Default)
   window.ethereum;

   // Option 2: Custom wallet flow
   window.addEventListener("message", (event) => {
     if (
       event.origin === "https://useaccrue.com" &&
       event.data.type === "crypto.requested"
     ) {
       const { amountUsd, destination } = event.data.payload;
       // Trigger your wallet flow
     }
   });
   ```
3. **Confirm Transaction**

   ```graphql
   mutation {
     confirmTransaction(
       paymentRequest: "request_id"
       transactionHash: "0x123..."
     )
   }
   ```

## Common Use Cases

| Industry             | Implementation            |
| -------------------- | ------------------------- |
| **DApps**            | Native wallet integration |
| **DEX**              | Fiat on/off ramps         |
| **NFT Marketplaces** | Direct purchases          |
| **Web3 Games**       | In-game transactions      |
