---
name: martin-estate-wine-commerce
description: "Use when the user wants to buy estate-grown Napa Valley wine from Martin Estate. Query /catalog for the current lineup. Pay by the Machine Payments Protocol on Tempo or Solana, x402 on Base, or card via a Stripe Shared Payment Token. Buying wine requires a verified identity, an age check (21 or over), and a US shipping address in an allowed state; all three are enforced at /purchase."
metadata:
  version: "1"
  homepage: "https://agents.martinestate.com"
---

# Martin Estate Winery

_Single-vineyard estate-grown Napa Valley wine from Rutherford._

Single-vineyard wine from the Rutherford bench in Napa Valley, estate grown, produced and bottled since 1887. Browsing the catalog is anonymous; buying requires a verified identity, an age check (21 or over), and a US shipping address in an allowed state.

## Important Files

| File | URL |
|------|-----|
| **SKILL.md** (this file) | `https://agents.martinestate.com/skill.md` |
| llms.txt | `https://agents.martinestate.com/llms.txt` |
| OpenAPI | `https://agents.martinestate.com/openapi.json` |
| MPP discovery | `https://agents.martinestate.com/.well-known/mpp.json` |
| A2A agent card | `https://agents.martinestate.com/.well-known/agent-card.json` |
| UCP profile | `https://agents.martinestate.com/.well-known/ucp` |
| JWKS | `https://agents.martinestate.com/.well-known/jwks.json` |

## Identity Prerequisite

This merchant uses AgentScore identity. Required: KYC verified Passport, age 21+, US only, sanctions clear.

Denial bodies carry an `agent_instructions` block describing the recovery action: read the `action` field and follow it. See the identity-bootstrap skill for the canonical denial-code → action table.

## Payment

Each gated route returns a 402 with `WWW-Authenticate` + `PAYMENT-REQUIRED` body listing the rails below with current pricing. Pick whichever your wallet is funded for.

| Rail | Notes | Compatible clients |
|---|---|---|
| **MPP on Tempo** | USDC. Use `agentscore-pay pay --chain tempo` (or `tempo request`); MPP credential goes in `Authorization: Payment`. | agentscore-pay, tempo request, x402-proxy |
| **x402 on Base** | USDC (EIP-3009). Use `agentscore-pay pay --chain base`; X-Payment header carries the signed credential. | agentscore-pay, x402-proxy, purl (omit --network flag) |
| **MPP on Solana** | USDC (SPL). Use `agentscore-pay pay --chain solana`; MPP credential goes in `Authorization: Payment`. | agentscore-pay |
| **Stripe Shared Payment Token** | Card via Link wallet. Use `@stripe/link-cli`; `agentscore-pay` emits the handoff hint when this rail is picked. | link-cli |

## Shipping

Ships to: US.

Blocked US states: AK, DE, HI, MI, MS, NH, ND, RI, SD, UT, VA.

## Onboarding Flow

1. Install agentscore-pay if you don't already have a compatible client for your funded chain: `npm i -g @agent-score/pay` (or `brew install agentscore/tap/agentscore-pay`). Martin Estate Winery accepts: Tempo USDC, x402 USDC on Base, Solana SPL USDC, Stripe Shared Payment Token. agentscore-pay speaks every supported rail; the rails table also lists per-rail `compatible_clients`: `tempo request` works for tempo USDC.e, `x402-proxy` / `purl` work for Base x402, `@stripe/link-cli` works for Stripe SPT. Any spec-compliant client for an individual rail works too.
2. First-run only: bootstrap wallet + Passport. Run `agentscore-pay agent-guide --json` for the canonical cold-start path; it walks `agentscore-pay init` (creates keystore + per-chain wallet), `agentscore-pay passport login` (one-time KYC; required for this merchant; the human completes a verify URL once and pay caches the operator_token), and `agentscore-pay balance` to see which chain has USDC. Skip if your wallet+Passport are already provisioned.
3. If your only payment method is a Stripe / Link card (no crypto), install `@stripe/link-cli` instead of agentscore-pay and use it on the SPT rail. Identity gating still applies: the merchant's 403 with `verify_url` lets you bootstrap a Passport even with no crypto wallet involved.
4. Returning user note: if you've paid an AgentScore-gated merchant before from this wallet, the wallet is already in your Passport's `linked_wallets[]` and identity flows through automatically with no re-KYC prompt. Paying from a NEW wallet while you already hold an `opc_...` token returns 403 `wallet_signer_mismatch`; the body lists `linked_wallets[]` and `agent_instructions.action: resign_or_switch_to_operator_token` with three deterministic recoveries (switch to a linked wallet, drop the operator_token to re-KYC the new wallet, or pre-claim the new wallet via SIWE on https://www.agentscore.com/verify).
5. Browse the catalog: `curl https://agents.martinestate.com/catalog`.
6. Read each product's `purchase_mode` and `purchase_note` to decide whether a redemption code is required, optional, or rejected.
7. Pick the rail your wallet is funded for. The 402 advertises 4 rails. `agentscore-pay balance` (without `--chain`) lists every chain's USDC; pay rejects with `multi_rail_ambiguity` if you don't pass `--chain` on a multi-rail challenge.
8. Place the order: `agentscore-pay pay POST https://agents.martinestate.com/purchase --chain <tempo | base | solana> -d '<body>' --max-spend <amount>` for crypto rails. For Stripe SPT, follow the handoff hint pay emits and use `@stripe/link-cli` instead. Either way pay handles the 402 retry, signing, and Passport attachment; branch on the structured CliError `code` on non-zero exit (insufficient_balance, multi_rail_ambiguity, config_error for missing wallet/Passport, etc.).

## Endpoints

| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | `/catalog` | anonymous | Purchasable wines (filterable by category). |
| GET | `/catalog/{slug}` | anonymous | Wine detail. |
| POST | `/purchase` | anonymous | Body: `{product_id, quantity, email, shipping, gift_note?}`. Returns 402 on the discovery leg, 200 on settle. |
| GET | `/orders/{id}` | identity required | Full order details (PII). |
| GET | `/orders/{id}/status` | identity required | Payment status only. |

## Triggers

Use this skill when the user wants to:

- Buy Napa Valley wine from Martin Estate
- Send a gift bottle of Martin Estate wine
- Check the status of a previously placed Martin Estate order

## Support

- **Homepage**: https://www.martinestate.com
- **Pay CLI**: https://github.com/agentscore/pay

_Re-fetch this file periodically to pick up new endpoints, rails, or policies._
