clearddocs
cleard.ai ↗
Get started Quickstart
Markdown ↗

Quickstart

Get scoped access, enroll an existing wallet and run a protected test USDC checkout.

Use Circle test USDC on Base Sepolia. Confirm your program reports circle-usdc or circle-usdc-wallet-v4 before following these amounts; the client verifies its asset and contract pins.

Open the integration sandboxProvider and direct-merchant entry paths in one application.

Prepare the participants#

Sign in or create a Cleard account using the available account options. Sign-in returns to the same test program setup. Merchant and buyer use their own EVM wallets on Base Sepolia (84532); buyers need no Cleard account. Choose the reviewer before enrollment. The reviewer holds an Ed25519 private key; only its public key is registered.

After sign-in, inspect your existing programs first. For a new setup, click Create a test reviewer on this device, download its private PEM file and confirm your backup. Reuse that file when reviewing claims. Advanced users can supply their reviewer’s public key instead. The private file is never uploaded or saved in browser storage; Cleard cannot recover it. Download API access separately. See Access & authentication for renewal and successor availability.

Run the complete flow#

  • Choose the policy’s funding mode and create merchant terms with its wallet, caps and deadlines. Reserve mode specifies upfront or rolling backing; direct mode uses zero reserve and withholding. Share the merchant link.
  • The merchant reviews the exact funding mandate, signs and enrolls its existing wallet. Reserve mode may require the selected upfront deposit. Direct mode requires separate bounded USDC allowance for approved refunds.
  • Create a checkout bound to the buyer/refund wallet and activate it. The merchant-authorized service registrar registers the purchase. Share the buyer link.
  • The buyer reviews the terms and authorizes USDC allowance and payment. Direct mode forwards the full payment immediately. Reserve mode captures the agreed backing and eligible recovery before releasing the remainder.
  • The buyer files a qualifying claim. The designated reviewer inspects evidence, selects its local signing file and approves. The accepted funding source pays within its limits; a shortfall stays owed.
  • Read approved, paid and outstanding amounts. Direct mode requires an explicit retry when funds and allowance are available within the original deadlines. Reserve mode can recover through a later eligible routed payment. Deliver signed notifications.

Choose direct-wallet or reserve funding before merchant enrollment. See the funding policy examples for both modes and exact amounts.

Wallet transactions require Base Sepolia test ETH. Use Base’s testnet faucet guidance. Use Circle’s official faucet for test USDC, selecting Base Sepolia and your bound wallet. USDC address: 0x036CbD53842c5426634e7929541eC2318f3dCF7e. Mainnet funds are unsupported.

Use the independent Node client#

Client 1.7.1RoutingClient, both API schemas, pinned public routing trust, durable journals and bounded transaction helpers. Archive checksumVerify before extracting.
Download and verify
curl --fail --remote-name https://cleard.ai/docs/downloads/cleard-provider-example-1.7.1.tar.gz
curl --fail --remote-name https://cleard.ai/docs/downloads/cleard-provider-example-1.7.1.tar.gz.sha256
shasum -a 256 -c cleard-provider-example-1.7.1.tar.gz.sha256
tar -xzf cleard-provider-example-1.7.1.tar.gz
cd cleard-provider-example-1.7.1
npm ci --ignore-scripts

Initialize RoutingClient with the trust file matching deployment_id, your scoped credential and a persistent journal. init and snapshot are read-only; writes require an explicit RunBudget. Follow the client README for setup, gas limits, continuing browser activity and offline reviewer signing. Keep credentials and private keys outside URLs, source control and shared logs.

Full funding and HTTP contractAuthority, deadlines, event ordering and exact funding limits. Routing OpenAPIExact request/response shapes and authentication.
Cleard · Commercial relationships for open commerce.Docs / Quickstart

Searches these docs locally. Use Tab to choose a result.