This page takes an owner from a wallet holding USDC to an agent's first paid request, and to that payment in the grant's ledger. The agent buys from Alba's demo seller, an API with two paid routes.
You need a Solana wallet with some USDC, and Node 22 or later for the agent.
Open your balance
Go to the app, connect your wallet and press Open balance. The wallet asks you to sign a message, which moves no funds. Alba derives your key from the signature and scans the pool for your notes.
Deposit
Under Balance, enter an amount and press Deposit. Your wallet signs one transfer into the pool. When it settles, the amount shows as Available to grant or withdraw.
Create a grant
Press New grant and set the terms:
Field For this quickstart Amount 1.00Cap per payment 0.05Expiry 1 day Sellers Any seller Label research-agentPress Create grant. The browser proves the spend and the facilitator relays it. Your wallet signs nothing.
Copy the credential
The app shows the grant credential, a string beginning
alba_grant_. Press Copy credential. You can show it again later from the grant's page.Give it to the agent
In the agent's project, install the SDK and set the credential in its environment:
bash npm install @alba/sdk export ALBA_GRANT=alba_grant_…Make a paid request
agent.ts import { alba } from '@alba/sdk' const res = await alba.fetch('https://alba-seller-production.up.railway.app/papers/search?q=privacy') console.log(res.status) console.log(await res.json())The demo seller prices this route at 0.01 USDC. Its first answer is
402. The SDK proves a payment from the grant and asks again, andalba.fetchreturns the second answer: status200and a JSON body withquery,papersandsource.Read the ledger
Back in the app, open Grants and then the grant. Its ledger has one row: the time in UTC, the seller's address, the memo
GETwith the URL the agent asked for, the amount and the transaction. Open the transaction on an explorer and the payer you see there is the pool.
The demo seller's second route, /papers/extract?id=alba-demo-001, costs 0.02 USDC. Call it and a second row joins the ledger.