On-Off Ramp

Supported Stablecoins

Stablecoin
Network
Ramp type
Network fee*

CUSD / USDC / USDT

CELO

On-ramp & Off-ramp

$0.01

USDC

OP

On-ramp & Off-ramp

$0.15

USDC

BASE

On-ramp & Off-ramp

$0.10

USDC

MATIC

Off-ramp only

$0.30

USDC

SOL

Off-ramp only

$0.50

* Network fees are deducted from the customer’s payout.


Getting Started

All you need is a public API key. Create one by following the authentication guide.

The ramp is delivered as a URL you build with query parameters.

Base URLs

Environment
URL

Staging

https://staging.useaccrue.com/hosted/ramp

Production

https://useaccrue.com/hosted/ramp

URL Parameters

Name
Required
Description

key

Yes

Your public API key.

paymentType

Yes

deposit or withdrawal.

address

No

Wallet to receive funds. If omitted, Cashramp tries window.ethereum.

coin

Yes

Stablecoin symbol (see table above).

network

Yes

Network name from the table.

amount

No

Quantity of the stablecoin.

reference

No

Your idempotent reference.

redirectUrl

No

Where to send the user after completion.

currency

No

ISO-4217 fiat code (e.g., USD).

phone

No

Customer’s phone number.

hideAddress

No

true to hide the wallet address field.

isWalletContext

No

Set false to ignore window.ethereum and use your own flow. Default true.

Example
https://useaccrue.com/hosted/ramp?key=CSHRMP-PUBK_mO86nN3ye84hIso&paymentType=deposit&coin=CUSD&network=CELO&amount=10&reference=test_reference

Custom Crypto-Deposit Flow

When window.ethereum is present, Cashramp prompts the user to sign the transfer automatically. If it isn’t, we emit a postMessage so you can run your own UX:

window.addEventListener("message", (event) => {
  if (event.origin === "https://useaccrue.com") {
    const { event: name, payload } = event.data;
    if (name === "crypto.requested") {
      const amountUsd = Number(payload.amountCents) / 100;
      const destination = payload.destinationAddress;
      const paymentRequestId = payload.paymentRequest;

      /*
       * Launch your custom flow to send EXACTLY
       * `amountUsd` worth of stablecoins to `destination`.
       * After broadcasting, call confirmTransaction (below).
       */
    }
  }
});

Confirm Transaction

After broadcasting the transfer, poll confirmTransaction until it settles. Poll in line with block times: CELO & Optimism ≈ 10 s; Ethereum ≈ 60 s.

mutation {
  confirmTransaction(
    paymentRequest: "VHlwZXM6OkNhc2hyYW1wOjpBUEk6Ok1lcmN6YW50UGF5bWVudFJlcXVlc3QtZjVkZDdhYWEtZDI1Yy00YTZmLTkwODMtNzk1NjdkOTNjNmM4"
    transactionHash: "0x4321897b3c4495a314d081dbcf2cb5310b19834bda124f5ad03e07464b1add73"
  )
}
Argument
Description

paymentRequest

Global ID from the earlier crypto.requested payload.

transactionHash

Hash of your on-chain transfer.

What Happens Next

  • The payment request moves from pending_funding → created.

  • A webhook fires with the updated status.

  • Cashramp emails the user a link to withdraw the fiat equivalent.


Last updated