WebRTC Payment SDK

Micropayment-gated streaming on Algorand — USDC via x402 or MPP rail

⚠ All demos run on Algorand TESTNET — use testnet ALGO and testnet USDC only. Faucets linked from each app.

Provider

Stream your camera or a video file. Set pricing and gating mode. Consumers pay per-view or per-segment to watch.

Open Provider

Consumer (Web)

The consumer page opens from the provider's QR code or session link. Start a provider session first, then scan the QR or share the link.

Consumer (Mobile)

StreamPay is a native Android app that connects to provider streams. Scan the provider's QR code, pay with the built-in Algorand wallet, and watch.

Download StreamPay APK Android 8.0+

Scenarios

1. Gated Access

Pay 0.1 USDC once to watch. Track-mode enforcement.

2. Free + Micropay

Free to join, 0.01 USDC per 30s. AES-GCM crypto enforcement.

3. Hybrid

0.1 USDC access + 0.01 USDC per 30s. Two-tier pricing.

How it works

Provider and consumer open separate pages. Provider starts streaming, consumer connects and pays via x402 or MPP rail.

Auto-Pay & Signing

When auto-pay is enabled, the SDK sends payment for each segment automatically without requiring the viewer to approve every transaction. However, the signing experience differs between clients:

Web Consumer (Pera Wallet)

Each payment requires Pera Wallet to sign the transaction. Even with auto-pay on, Pera will prompt you to approve and sign each segment payment. This is a limitation of external wallet connect protocols — the web app cannot hold private keys.

StreamPay (Android App)

StreamPay has a built-in Algorand wallet with a locally stored key. When auto-pay is enabled, payments are signed and sent automatically in the background — no popups, no interruptions. The stream plays continuously as long as budget allows.

Tech Stack

Auth: FIDO2 passkeys via Liquid Auth Cloud
Payment: x402 or MPP rail, USDC on Algorand testnet
Encryption: AES-GCM via WebRTC Encoded Transforms
ICE: Algonode/Nodely STUN/TURN
Transport: Native WebSocket signaling, peer-to-peer WebRTC
SDK (TypeScript · npm): sdk-core · auth-liquid · rail-x402 · rail-mpp
SDK (Kotlin · JitPack): core, auth-liquid, rail-x402, rail-mpp