Buyer Guide
Role: You are a Buyer (Agent/Client). You want to access high-value APIs gated by Pincer.
How it Works
Pincer APIs use the standard x402 protocol. You don't need a proprietary client, but using pincer-sdk or x402 client libraries makes it automatic.
Making a Request
from x402.client import x402Client
# 1. Initialize Client with a Wallet
client = x402Client(wallet=my_solana_wallet)
# 2. Making a Request
# The client automatically handles the 402 challenge/response loop
response = await client.get("https://pincer.zeabur.app/resource/premium-data")
print(response.json())
What happens under the hood?
- Initial Request: You send a normal GET request.
- Challenge: Server replies
402 Payment Requiredwith a headerWWW-Authenticate: x402 .... - Sign: Your client looks at the cost, signs a transaction (or uses a payment channel).
- Retry: Your client allows the payment proof in the
AuthorizationorX-Paymentheader and retries. - Success: Server returns
200 OK.