Cashramp
  • Introduction
    • Getting Started
    • Payment Rails
    • API Endpoints
    • Authentication
    • Webhooks
    • Integration Guide
    • SDKs
  • Hosted Ramp
    • Overview
    • Deposits
    • Withdrawals
    • Cancel Payment
  • Direct Ramp
    • Overview
    • Ramp Quotes
    • Deposits
    • Withdrawals
  • Onchain Ramp
    • Overview
    • On-Off Ramp
  • Cashramp API
    • Queries
    • Customers
    • Payment Methods
    • Withdraw Onchain
Powered by GitBook
On this page
  • Features
  • Integration Steps
  • Common Use Cases
  1. Onchain Ramp

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

    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

    // 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

    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

PreviousWithdrawalsNextOn-Off Ramp

Last updated 10 days ago