Quickstart

Quickstart · React Native non-custodial (Stellar)

WebView embed, postMessage bridge, and native Stellar USDC signing in about 20 minutes.

~20 minReact NativeUSDC

Quickstart · React Native non-custodial (Stellar / USDC)

Time: about 20 minutes · Success: WebView loads the widget; native code signs a Stellar USDC payment and posts success back; sandbox returns a reference number.

Before you start

  • Credentials & environments (API keys for Solana and Stellar widget partners), or Sign in if you already have a partner account
  • React Native app with a WebView (react-native-webview)
  • Ability to sign Stellar USDC payments in native/JS (your wallet signer + @stellar/stellar-sdk)

Wrong track? Custodial RN → RN custodial Quickstart. Web → Web Quickstart.

Same rule as Web: secret key stays on the server. Your app calls your backend; the backend calls MoneyGram POST /v1/sessions with chain: 'stellar' and the user's G-address.

Pass the session / config into the WebView (see full guide for the RAMPS_CONFIG / postMessage contract). Handle:

  • Sign request (RAMPS_SIGN_TRANSACTION) → sign Stellar USDC in the app → post hash / success back
  • Complete / error events → update your UI
TypeScript
// Sketch: see full guide for message typeswebviewRef.current?.postMessage(  JSON.stringify({ type: 'RAMPS_SIGN_SUCCESS', payload: { txHash } }),)

Include the memo from the sign payload when MoneyGram provides one. Missing memos cause deposit verification failures.

  • WebView opens MoneyGram UI without blank-screen / cookie issues
  • Sign request reaches native code with deposit G-address, amount, and memo (when present)
  • App returns success; widget shows sandbox reference number

4. Go deeper