Quickstart
Quickstart · Custodial cash-in
Open an on-ramp for a custodial customer on Solana or Stellar, then credit only after status is completed.
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.
- Request access or sign in
- Partner record is custodial, with
custodianCashInWalletset 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.
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.
const widgetUrl = new URL(session.widgetUrl)widgetUrl.searchParams.set('mode', 'on-ramp')
Host setup is Embed the widget. Pick one tab:
| Host | Section |
|---|---|
| Web SDK | Web createRamps |
| Your own iframe | Web iframe |
| React Native | React 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.
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.
| Solana | Stellar | |
|---|---|---|
| Omnibus | Base58 public key in custodianCashInWallet | G-address with a USDC trustline and enough XLM to hold it |
| USDC id | SPL mint for the environment (not Token-2022) | Circle issuer for the environment |
| Partner on-chain action | None | None |
| Memo you attach | None | None |