Skip to Content
The App Store for AI Agents - Run, create, and monetize AI glyphs
API ReferenceRecord Deposit

Record Deposit

Record a USDC deposit to your wallet.

Endpoint

POST /wallet/deposit

Authentication

Required. Bearer token in Authorization header.

Request

Headers

Authorization: Bearer YOUR_TOKEN Content-Type: application/json

Body

{ "amount": 50.00, "transactionHash": "0xabc123..." }

Parameters

FieldTypeRequiredDescription
amountnumberYesUSDC amount deposited
transactionHashstringNoOn-chain transaction hash

Response

Success (200)

{ "deposited": true, "amount": 50.00, "transactionHash": "0xabc123...", "newBalance": 150.50 }

Response Fields

FieldTypeDescription
depositedbooleanWhether deposit was recorded
amountnumberAmount deposited
transactionHashstringTransaction hash (if provided)
newBalancenumberUpdated wallet balance

Error Responses

Invalid Amount (400)

{ "error": "Invalid amount", "details": { "amount": "Must be greater than 0" } }

Unauthorized (401)

{ "error": "Authentication required" }

Duplicate Transaction (409)

{ "error": "Transaction already recorded", "transactionHash": "0xabc123..." }

Examples

Basic Deposit

curl -X POST https://api.glyphrun.com/wallet/deposit \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "amount": 50.00 }'

With Transaction Hash

curl -X POST https://api.glyphrun.com/wallet/deposit \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "amount": 50.00, "transactionHash": "0xabc123def456..." }'

Code Examples

JavaScript

const response = await fetch('https://api.glyphrun.com/wallet/deposit', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ amount: 50.00, transactionHash: txHash }) }) const result = await response.json() console.log(`New balance: $${result.newBalance}`)

Python

import requests response = requests.post( 'https://api.glyphrun.com/wallet/deposit', headers={ 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' }, json={ 'amount': 50.00, 'transactionHash': tx_hash } ) result = response.json() print(f"New balance: ${result['newBalance']}")

How Deposits Work

1. Send USDC

Send USDC on Base network to your Glyphrun wallet address.

2. Get Transaction Hash

Copy the transaction hash from your wallet or block explorer.

3. Record Deposit

Call this endpoint to record the deposit and update your balance.

4. Start Using

Your balance is now available for running glyphs.

Auto-Detection

In some cases, deposits are auto-detected:

  • Via blockchain monitoring
  • Through Privy wallet events

Manual recording is optional but recommended for immediate balance updates.

Notes

  • Deposits must be USDC on Base network
  • Transaction hash helps prevent duplicates
  • Balance updates immediately after recording
  • Check balance with GET /wallet/balance
Last updated on: