USDC-to-fiat in one SDK call.
offramp() creates the deposit, delegates pricing to the managed vault, and returns a deposit ID. Your users settle on Venmo, Revolut, Wise, Cashapp, Zelle, Monzo, or PayPal without leaving your app.
Agent bundle
Point your agent at these.
Drop the skill into Claude Code or Codex, hand llms-full.txt to any assistant, or scaffold a working app from a starter. Every artifact is machine-readable.
Flow
What the SDK handles.
Collect payout details
Validate amount, platform, currency, and payout identifier before the wallet prompt.
PLATFORMS.*.validate()Create the deposit
offramp() registers the payout route, approves USDC, and creates the escrow deposit on Base.
offramp(walletClient, params)Hand off pricing
Fresh deposits delegate to the managed vault for rate updates. Your backend does not quote.
rateManagerIdWatch settlement
Use signed webhooks or deposits() to sync fills, closes, and OTC taker activity.
deposit.filledFirst call
One signature, four runtimes.
Pass an idempotencyKey for retrying jobs. Reusing the same key returns the original result instead of creating a duplicate deposit.
import { useOfframp } from "@usdctofiat/offramp/react";
import { CURRENCIES, PLATFORMS } from "@usdctofiat/offramp";
function SellButton({ walletClient }) {
const { offramp, step, isLoading } = useOfframp({
integratorId: "your-app",
referralId: "partner-123",
});
return (
<button
disabled={isLoading}
onClick={() =>
offramp(walletClient, {
amount: "100",
platform: PLATFORMS.VENMO,
currency: CURRENCIES.USD,
identifier: "alice",
})
}
>
{isLoading ? step ?? "Working..." : "Sell 100 USDC"}
</button>
);
}OTC deposits return a shareable otc.usdctofiat.xyz/d/... link for the approved buyer.
Boundaries
Know what you own.
Your WalletClient signs
The SDK holds no keys. User wallets and server wallets sign through your viem WalletClient.
P2P payout rails stay direct
Buyers pay sellers on Venmo, Revolut, Wise, Cashapp, Zelle, Monzo, or PayPal. The SDK does not route fiat.
Pricing is delegated
Deposits delegate to the managed vault, so you do not run oracle wiring, quote jobs, or rate crons.
Scaffold
Start with a working wallet flow.
Three templates ship with create-offramp-app. Replace TODO_SET_REFERRAL_ID before shipping partner attribution. Reference scripts and the live demo source live in the starters repo.
Webhooks
Signed lifecycle events.
Register endpoints and rotate signing secrets at peerlytics.xyz/developers — same API key, both products. Every delivery includes X-Usdctofiat-Signature, X-Usdctofiat-Event, and X-Usdctofiat-Delivery-Id. Verify the raw body before JSON parsing.
Selected event
deposit.created
A deposit landed on Base. Use it to create internal inventory records.
Register at PeerlyticsShip the first deposit.
Read the API reference for signatures, then mint an API key on Peerlytics when you need webhooks or paid analytics.