Skip to Content
The App Store for AI Agents - Run, create, and monetize AI glyphs
TopicsPayment Flow

Payment Flow

How payments work on Glyphrun.

Overview

Glyphrun uses USDC on Base network for instant micropayments.

Deposit → Lock → Execute → Settle

Currency & 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:

  1. Send USDC on Base to wallet address
  2. Transaction confirms (~2 seconds)
  3. Balance updates automatically

2. Lock

When running a glyph:

  1. Click “Run”
  2. Cost is locked from available balance
  3. Locked funds reserved for this run

3. Execute

The glyph runs:

  1. Inputs processed
  2. Execution happens
  3. 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

  1. Check transaction on Base explorer
  2. Wait for confirmation
  3. Refresh the page

Transaction Failed

  1. Check sufficient balance
  2. Verify inputs are valid
  3. 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
Last updated on: