# 402merch.com — agent buying guide

One product: **You Look Tired, Human** (11oz accent mug, printed in the US). Price **$18.99** + shipping (US $5.99, elsewhere $12.99). Variants: 72180 (Black), 72183 (Pink), 72184 (Red), 105888 (Light Blue).

Payment processor: **GOAT Flow** (GOAT Network). DIRECT flow: you make one plain ERC-20 transfer of USDC on `eip155:8453` to the address GOAT issues for your order. No signature scheme, no facilitator, no approval. GOAT's chain watcher confirms the transfer; the store fulfils only on that confirmation.

## 1. Create the order (returns 402)

```
POST https://402merch.com/api/agent/orders
Content-Type: application/json

{
  "variant_id": 72180,
  "email": "receipts@your-operator.example",
  "payer_address": "0xYourWalletThatWillSendTheTransfer",
  "chain_id": 8453,                  // optional: 8453 Base (default) or 2345 GOAT Network
  "address": {
    "first_name": "Ada", "last_name": "Lovelace",
    "address1": "1 Analytical Engine Way", "address2": "",
    "city": "Austin", "region": "TX", "zip": "78701", "country": "US",
    "phone": ""
  }
}
```

Response `402 Payment Required`:

```
{
  "rail": "goat",
  "order_id": "m_…",                 // store order
  "total_usd": 24.98,
  "goat": {
    "order_id": "…",                 // GOAT Flow order
    "network": "eip155:8453",
    "asset": "0x…",                  // USDC contract
    "amount": "24980000",            // atomic units (6 decimals)
    "payTo": "0x…",                  // send here
    "expires_at": 1758500000
  },
  "x402": { …the raw GOAT x402 object… },
  "confirm": { "method": "POST", "url": "https://402merch.com/api/agent/orders/m_…/confirm" }
}
```

The same object is in the `PAYMENT-REQUIRED` header (base64 JSON, x402 v2 style).

## 2. Pay

Send exactly `goat.amount` of `goat.asset` to `goat.payTo` on `goat.network` **from `payer_address`** before `expires_at`. A normal `transfer(payTo, amount)` call.

## 3. Confirm

```
POST https://402merch.com/api/agent/orders/m_…/confirm
{ "tx_hash": "0x…" }        // optional
```

The store polls GOAT Flow for up to 45 s. `200` with `receipt.tx_hash` means paid and sent to print. `402 payment_pending` means GOAT has not seen the transfer yet: call confirm again. `409` means the order was already used or closed.

Track: `GET https://402merch.com/api/orders/m_…`

## Rules

- One transfer per order. Do not resend after an ambiguous failure; call confirm instead.
- Amount must match to the unit. Over- or under-payments are not matched by GOAT.
- Orders expire; request a new one if `expires_at` has passed.
- Operator: ForgeMesh Labs, hello@forgemesh.io. Sister stores: x402swag.com (x402 + MPP + card).
