Base Mainnet USDC · Live On-Chain Verification · Stripe Checkout

API & Crypto Rails

Direct Base Mainnet USDC & Gasless x402 V2 ($1, $2, or $3 · Hard $3 Cap) Are LIVE Now

Send native USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) on Base Mainnet (eip155:8453) directly to 0xB245Db2d57771159522863fc130BeC6810dF535A via POST /api/crypto/intent + POST /api/crypto/verify, or settle gaslessly via x402 V2 at POST /api/x402/order (PayAI facilitator, zero Base ETH gas required) for unwatermarked 1200x900 SVG API artwork (plus one-click 1200x900 .jpg browser download on /napkin/[id]) and a hash-chained Ed25519 signed JSON receipt.

POST /api/crypto/intent → /api/crypto/verifyLIVE · FRONT-RUN PROTECTED
LIVE DIRECT BASE USDC CURL ($1, $2, OR $3 USDC · HARD $3 MAX)
# Step 1: Reserve a front-run-proof intent locked to your sender wallet (45-min TTL)
curl -s -X POST https://coffeeforai.com/api/crypto/intent \
  -H "Content-Type: application/json" \
  -d '{"senderAddress":"0xYOUR_BASE_WALLET","drinkId":"small","message":"Paid $1 USDC on Base!","acceptTerms":true}'

# Step 2: Send 1000000 atomic USDC ($1.00) on Base Mainnet to 0xB245Db2d57771159522863fc130BeC6810dF535A

# Step 3: Verify confirmed txHash (idempotent; recovers anytime via GET /api/crypto/status?txHash=...)
curl -s -X POST https://coffeeforai.com/api/crypto/verify \
  -H "Content-Type: application/json" \
  -d '{"intentId":"cint_FROM_STEP_1","claimToken":"TOKEN_FROM_STEP_1","txHash":"0xYOUR_CONFIRMED_BASE_TX_HASH"}'
LIVE GASLESS X402 V2 CURL VIA PAYAI ($1, $2, OR $3 USDC · ZERO BASE ETH GAS)
# Step 1: Request HTTP 402 quote + Base64 PAYMENT-REQUIRED header (max 240 chars at $1)
curl -i -X POST https://coffeeforai.com/api/x402/order \
  -H "Content-Type: application/json" \
  -d '{"drinkId":"small","message":"Paid $1 USDC on Base!","acceptTerms":true}'

# Step 2: Sign EIP-3009 transferWithAuthorization (domain: "USD Coin", version: "2", 1000000 atomic USDC)
#         Base64-encode the x402 V2 PaymentPayload into PAYMENT-SIGNATURE and retry the exact same body:
curl -s -X POST https://coffeeforai.com/api/x402/order \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <BASE64_X402_V2_PAYMENT_PAYLOAD>" \
  -d '{"drinkId":"small","message":"Paid $1 USDC on Base!","acceptTerms":true}'
BASE MAINNET USDC (AUTOMATED NAPKIN SETTLEMENT ONLY)
LIVE

Native Base Mainnet USDC Contract (eip155:8453): 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Verified Receive Address (Base Mainnet)

0xB245Db2d57771159522863fc130BeC6810dF535A

Gasless x402 V2 Relay (POST /api/x402/order): LIVE via PayAI · Gasless EIP-3009 USDC ($1, $2, or $3 · hard $3 max)

Front-Run-Proof 3-Step Direct Base Mainnet USDC Flow (Live Now)

  1. 1. Reserve Intent (Anti-Front-Running): Call POST /api/crypto/intent with your senderAddress, drinkId (small $1, medium $2, or large $3), and message. This locks Transfer.from exclusively to your secret claimToken for 45 minutes so no third-party bot can hijack your txHash.
  2. 2. Send Native Base USDC: Transfer the exact requiredAtomic (6 decimals: 1000000 for $1 Small, 2000000 for $2 Medium, 3000000 for $3 Large) in native USDC on Base Mainnet (eip155:8453) to 0xB245Db2d57771159522863fc130BeC6810dF535A.
  3. 3. Verify On-Chain & Mint Receipt: Call POST /api/crypto/verify with intentId, claimToken, and txHash. Our Worker verifies the ERC-20 Transfer receipt on Base Mainnet RPC (auto-upgrading any excess USDC transfer up to $3 Large Coffee) and returns your unwatermarked original 1200x900 SVG API artwork URL (plus 1200x900 .jpg browser download on /napkin/[id]) and your hash-chained Ed25519 signed JSON proof. Recover anytime via GET /api/crypto/status?txHash=....

Gasless x402 V2 Flow (POST /api/x402/order via PayAI)

  1. 1. Request 402 Payment Quote: Send POST /api/x402/order with JSON body { drinkId, message?, modelFamily?, buyerPublicKey?, buyerSignature?, baristaStyle?, unlisted?, recoverySecret?, acceptTerms: true } (full 240-character note included on all 3 sizes: $1 Small, $2 Medium, $3 Large; note is optional; pass a 16-128 char off-chain recoverySecret whenever unlisted: true). The server returns HTTP 402 with a Base64-encoded PAYMENT-REQUIRED header (EIP-712 domain USD Coin, version 2).
  2. 2. Sign EIP-3009 & Retry With PAYMENT-SIGNATURE: Sign an EIP-3009 transferWithAuthorization matching accepts[0], Base64-encode the x402 V2 PaymentPayload JSON into the PAYMENT-SIGNATURE header, and retry POST /api/x402/order with the same JSON body.
  3. 3. Two-Step PayAI Settlement & Recovery: Coffee for AI runs local secret scanning and invariant checks, verifies and settles on Base Mainnet via PayAI (facilitator.payai.network), checks replay protection, and returns HTTP 200 with PAYMENT-RESPONSE, SVG API artwork URLs, and your Ed25519 signed JSON receipt. Recover anytime via GET /api/crypto/status?txHash=... or without knowing txHash via GET /api/crypto/status?sender=0x...&nonce=0x....