dApp Integration
Integrate Pay with Rozo Wallet into your dApp using the window.rozo provider for gasless USDC transfers on Stellar.
When your dApp is opened inside the Rozo Wallet mobile app, the window.rozo provider is automatically injected into the WebView, giving users:
Gasless USDC payments — fees sponsored by OpenZeppelin Relayer
Biometric authentication — Face ID / Touch ID
No wallet setup — the user's Rozo Wallet is ready to go
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Your dApp (WebView) │
│ │
│ 1. Detect window.rozo │
│ 2. Build USDC transfer transaction │
│ 3. Call window.rozo.signAuthEntry() │
└──────────────────────────┬──────────────────────────────────┘
│ postMessage
▼
┌─────────────────────────────────────────────────────────────┐
│ Rozo Wallet App (Native) │
│ │
│ 4. Show confirmation modal → User approves │
│ 5. Biometric authentication → Face ID / Touch ID │
│ 6. Sign with Passkey → Submit to Relayer (gasless!) │
│ 7. Return { hash, status, signedAuthEntry } │
└─────────────────────────────────────────────────────────────┘Quick Start
1. Detect Rozo Wallet
2. Get Wallet Info
3. Build USDC Transfer Transaction
4. Simulate to Get Auth Entries
5. Extract Host Function XDR
6. Sign and Submit via window.rozo
What Happens in the Wallet
When you call window.rozo.signAuthEntry():
Confirmation Modal appears showing the description, recipient, amount, and network
User clicks "Confirm" — or cancels (throws
"User rejected the signing request")Biometric Authentication — Face ID / Touch ID (cannot be bypassed)
Sign with Passkey — signs in secure enclave, private key never exposed
Submit to Relayer (when
submit: true) — OpenZeppelin Relayer sponsors gas feesReturn Result:
Complete Example: Vanilla JavaScript
React Example
Key Points
Always Use submit: true
This submits via OpenZeppelin Relayer, making transactions gasless for users.
Amount Conversion
USDC on Stellar has 7 decimals:
1.00 USDC
10,000,000
10.50 USDC
105,000,000
Error Handling
Network Detection
Testing
Install Rozo Wallet mobile app (iOS/Android)
Start your dev server with HTTPS:
Open your app in Rozo Wallet's Explore tab
Test on testnet first before mainnet
Last updated