Quickstart

Quickstart · Web custodial cash-out (Stellar)

Omnibus hot-wallet cash-out on Stellar: customerIdentifier sessions, deposit address, and server-side USDC transfer.

~15 minCustodialUSDC

Quickstart · Web custodial cash-out (Stellar / USDC)

Time: about 15 minutes · Success: sandbox widget returns a deposit address; your server transfers USDC from the omnibus wallet and the flow reaches a reference number.

Before you start

  • Credentials & environments (API keys and allowlisted domains), or Sign in if you already have a partner account
  • Omnibus / hot wallet funded with testnet USDC
  • Confirmed you are custodial (you move customer USDC; users do not sign)

Wrong track? User-owned wallets → Web non-custodial Quickstart.

Server-side only:

TypeScript
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!,  },  body: JSON.stringify({    customerIdentifier: 'stable-customer-id-in-your-system',    walletAddress: process.env.PARTNER_OMNIBUS_WALLET,    chain: 'stellar',  }),})const session = 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 ramps = createRamps({  container: document.getElementById('ramps-widget'),  sessionToken: session.sessionToken,  widgetUrl: session.widgetUrl, // off-ramp  wallet: {    address: omnibusGAddress,    chain: 'stellar',    asset: 'USDC',    walletType: 'custodial',  },  onDepositAddress: async () => {    // Your backend re-reads the destination, amount, and memo from the Ramps API,    // transfers USDC from the hot wallet, and returns the transaction hash.    const res = await fetch('/api/internal-transfer', { method: 'POST' })    if (!res.ok) throw new Error('Transfer failed')    const { txHash } = await res.json()    return txHash // required: a bare string; the widget polls using this hash  },  onComplete: (result) => console.log(result.referenceNumber),  onError: console.error,}) ramps.open()

Exact callback names and payload fields: see the full custodial guide.

  • Session created with a stable customerIdentifier
  • Widget reaches deposit-address step
  • Hot-wallet Stellar transfer confirms (memo included when required)
  • Widget surfaces a sandbox reference number

4. Go deeper