Payment Flow
How payments work on Glyphrun.
Overview
Glyphrun uses USDC on Base network for instant micropayments.
Deposit → Lock → Execute → SettleCurrency & Network
USDC
- Type: Stablecoin (1 USDC = $1 USD)
- Contract:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913(Base) - Decimals: 6
Base Network
- Type: Layer 2 (Coinbase)
- Chain ID: 8453 (mainnet), 84532 (testnet)
- Speed: ~2 second finality
- Cost: Very low gas fees
Payment Steps
1. Deposit
Users add USDC to their Glyphrun wallet:
- Send USDC on Base to wallet address
- Transaction confirms (~2 seconds)
- Balance updates automatically
2. Lock
When running a glyph:
- Click “Run”
- Cost is locked from available balance
- Locked funds reserved for this run
3. Execute
The glyph runs:
- Inputs processed
- Execution happens
- Output generated
4. Settle
After execution:
On Success:
- Locked funds deducted
- Creator receives payment
- User sees result
On Failure:
- Locked funds released
- Balance restored
- User not charged
Non-Custodial Design
Glyphrun never holds your funds:
- Your keys - Controlled via Privy
- Your wallet - On Base network
- Direct settlement - Creator paid directly
Spending Controls
Global Allowance
Set maximum spending:
{
allowance: 10.00, // Max $10 per session
refreshOnLogin: true
}Per-Transaction Limit
Limit individual runs:
{
maxPerTransaction: 1.00 // Max $1 per run
}API Integration
Check Balance
GET /wallet/balance{
"balance": 100.50,
"availableBalance": 95.00,
"totalLocked": 5.50
}Record Deposit
POST /wallet/deposit
{
"amount": 50.00,
"transactionHash": "0x..."
}Fee Structure
Platform Fee
- ~10% of transaction
- Covers infrastructure
- Instant settlement
Network Fees
- Base gas fees (very low)
- Paid by platform
- No user gas needed
Security
Transaction Safety
- Funds locked only for execution
- Released on failure
- No pre-authorization abuse
Wallet Security
- Privy-managed keys
- MPC technology
- Non-custodial
Troubleshooting
Balance Not Updating
- Check transaction on Base explorer
- Wait for confirmation
- Refresh the page
Transaction Failed
- Check sufficient balance
- Verify inputs are valid
- Try again
Funds Locked
Funds are released:
- After successful execution
- On execution failure
- If timeout occurs
{xpay✦} Integration
Glyphrun uses {xpay✦}(https://docs.xpay.sh ) for payment infrastructure:
- x402 protocol support
- Spending controls
- Transaction logging
- Instant settlement
Related Topics
Last updated on: