# Test a buyer without a funded wallet

Run offline offer-change checks, connect a trusted adapter and interpret measured results.

Canonical: https://402signal.com/developers/test-buyer

## Test the guard without a funded wallet

Use this when you are building an x402 buyer, debugging an integration, or checking what the verification boundary actually does. Start with a reviewed checkout and Node.js 22 or newer.

```
git clone https://github.com/402signalhq/402signal.git
cd 402signal
# Inspect and select the reviewed revision before executing its code.
node integration/buyer-checks/run.mjs
```

The default runner uses a PUBLIC TEST KEY, a synthetic fixture clock and fake authorization callbacks. No networking, signing or payment occurs during that run. Downloading the checkout is a separate network operation.

Expect seven passing cases in separate reports, five buyer-adapter cases and two historical-verifier cases: matching offer, changed price, changed recipient, expired evidence, changed request, original saved record and altered saved policy. A matching offer reaches the fake callback once. Refusals reach it zero times. The runner exits nonzero if a case fails.

### Test your callback, not just our library

```
node integration/buyer-checks/run.mjs \
  --adapter ./integration/buyer-checks/example-adapter.mjs
node integration/buyer-checks/run.mjs --self-test
```

Copy the example adapter and connect your own trusted verification boundary. Export `authorize(options, fakeCallback)`. Call only the supplied fake callback after verification; preserve the verifier's typed refusal error. A generic initialization error is a failure, not a safe refusal. The self-test catches an unguarded adapter, one that refuses every valid purchase, and generic errors mistaken for expected refusals.

This is not a sandbox. The runner measures its callback, not hidden side effects in arbitrary adapter code. Run customer code in an isolated environment without production credentials or external networking. A passing reference suite does not test your application's signing path.

### What this test establishes

The named Base exact-x402 fixture cases behaved as expected. It is not a security audit, full x402/MPP certification, chain preflight, Falcon-anchor test or live merchant qualification. The verifier reads `tests/fixtures/route-binding-v1.json`. Its synthetic inputs are not production keys or receipts.

[Complete runner contract and expected report](https://github.com/402signalhq/402signal/blob/main/integration/buyer-checks/README.md) · [Add a real buyer integration](/developers/check-offer)

Give this task to your coding agent

```
Test the supported exact-x402 callback with 402Signal. Read integration/buyer-checks/README.md in the reviewed repository. Run node integration/buyer-checks/run.mjs and --self-test with Node 22 or newer. Do not load a wallet or production key. A customer adapter is explicitly chosen trusted local code, not sandboxed. Report the fixture hash, subject and measured acceptance/refusal outcomes. Guide: https://402signal.com/developers/test-buyer
```

Copy integration brief

Copies documentation. It does not install a tool or authorize spending.
