Quickstart
Quickstart · Web non-custodial
Get a sandbox cash-out working in about 15 minutes: session endpoint, widget SDK, and onSignTransaction.
~15 minWeb · SolanaUSDC
Quickstart · Web non-custodial (Solana / USDC)
Time: about 15 minutes · Success: sandbox cash-out opens the widget, signs a USDC transfer, and returns a reference number.
- Credentials & environments (API keys for Solana and Stellar widget partners), or Sign in if you already have a partner account
- Sandbox
ramps_pk_sbox_.../ramps_sk_sbox_...from the partner portal after onboarding - Domain allowlisted for sandbox
- A Solana wallet with devnet USDC (mint
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU)
Wrong track? Custodial hot wallet → Custodial Quickstart. React Native → RN Quickstart.
Want to see the full Solana flow first? Use the runnable reference on the Solana hub (clone, add sandbox keys, run on devnet).
Never call the session API from the browser with your secret key. Shared key rules and environments: Getting started.
Solana only · this quickstart
TypeScript
// Node / Next.js route handler (sketch)export async function POST() { const res = await fetch('https://playground.xramps.moneygram.com/api/v1/sessions', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.RAMPS_SECRET_KEY!, // ramps_sk_sbox_... }, body: JSON.stringify({ // See full guide for optional KYC / transaction prefill }), }) if (!res.ok) throw new Error(await res.text()) return Response.json(await res.json())}
Load the SDK via script tag (it is not published to npm):
HTML
<script src="https://playground.xramps.moneygram.com/sdk/index.global.js"></script>TypeScript
const { createRamps } = window.RampsSDK const session = await fetch('/api/ramps-session', { method: 'POST' }).then((r) => r.json()) const ramps = createRamps({ container: document.getElementById('ramps-widget'), sessionToken: session.sessionToken, widgetUrl: session.widgetUrl, // already includes ?mode=off-ramp for cash-out wallet: { address: userPublicKey, // Solana public key chain: 'solana', asset: 'USDC', walletType: 'non-custodial', }, onSignTransaction: async (tx) => { // Sign the SPL USDC transfer with the user wallet (see full guide Step 4) const signature = await signAndSendUsdc(tx) return signature // base58 transaction signature string }, onComplete: (result) => { console.log('referenceNumber', result.referenceNumber) }, onError: (err) => console.error(err),}) ramps.open()
- Widget iframe opens without origin / allowlist errors
- User completes KYC + quote in sandbox
onSignTransactionfires with a deposit address and amount- You return a signature; widget shows a reference number
- Full flow, mints, and signing: Web · Solana guide
- React / Next / Vue samples: Framework examples
- Types and callbacks: API reference
- Production checklist: Troubleshooting