Quickstart

Quickstart · Custodial cash-in

Open an on-ramp for a custodial customer on Solana or Stellar, then credit only after status is completed.

15 minCustodialCash-inUSDC

Quickstart · Custodial cash-in (Solana and Stellar / USDC)

Time: about 15 minutes. Success: the sandbox widget shows a confirmation code, you stored the Ramps transaction id, and you did not credit the customer until status is completed.

Before you start

  • Request access or sign in
  • Partner record is custodial, with custodianCashInWallet set for this chain
  • Sandbox secret key, server-side only
  • Read the custodial overview if omnibus wallets are not configured yet

Cash-out is a different flow. Do not follow a cash-out quickstart for this.

TypeScript
const chain = 'solana' // or 'stellar' 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.CUSTODIAN_CASH_IN_WALLET, // Solana address or Stellar G-address    chain,  }),})const session = await res.json()

Use session.widgetUrl. It already includes mode=off-ramp. For cash-in, replace that value. Do not append a second mode.

TypeScript
const widgetUrl = new URL(session.widgetUrl)widgetUrl.searchParams.set('mode', 'on-ramp')

2. Open the widget

Host setup is Embed the widget. Pick one tab:

HostSection
Web SDKWeb createRamps
Your own iframeWeb iframe
React NativeReact Native WebView

Pass walletType: 'custodial', chain, and transaction.type: 'on-ramp'.

Do not implement onDepositAddress or handle RAMPS_DEPOSIT_ADDRESS. That message is custodial cash-out only.

On RAMPS_TRANSACTION_CREATED (or onTransactionCreated), store id and mgiTransactionId when it is present, with the customerIdentifier from this session.

The confirmation code lets the customer pay at the store. It is not the signal to credit.

TEXT
1. Customer pays at the store with the confirmation code.2. Poll GET /v1/transactions/{id}/status?sync=true or receive the status webhook.3. When status is completed, credit the internal balance for customerIdentifier.
SolanaStellar
OmnibusBase58 public key in custodianCashInWalletG-address with a USDC trustline and enough XLM to hold it
USDC idSPL mint for the environment (not Token-2022)Circle issuer for the environment
Partner on-chain actionNoneNone
Memo you attachNoneNone

4. Go deeper