# Card - paying x402stock

Cards pay for plan purchases and pay-as-you-go calls of $0.50 or more. No crypto wallet is needed. A browser agent can pay the hosted checkout itself, with a Link Pay Token (LPT) where the checkout supports it or a card its human authorized, or its human pays it.

## Lanes

- `"checkout": true` - creates an unpaid hosted checkout; creating the URL needs no funds or card. Pay it yourself as described below, or privately deliver the URL to your human. Poll the returned `statusUrl` to confirm completion.
- Shared payment token - an `spt_` your platform granted for this seller (single-use: mint a fresh one per purchase), settled over the standard MPP lane: every card-eligible 402 carries a `method="stripe"` challenge in `www-authenticate`; answer it with the credential in `Authorization` (`Authorization: Payment <credential>`; on purchases your bearer rides `ZC-Agent-Authorization`), never as a body field. Mint against this seller's network profile `profile_61VG3aAsZhBiKt3rQA6VG3a90USQZlaUZhvqncSSO3y4` (Stripe account `acct_1TwshoP9TDQEwFNW`); Link wallets settle automatically with `link-cli mpp pay`.

The 402's (or purchase 402's) `card` block is the authoritative contract - it lists the exact fields.

## Browser-agent checkout: card, LPT and WebMCP

Creating checkout does not complete payment. Open `checkout.url` and confirm the seller, amount, currency, and live/test mode before proceeding. Keep the checkout URL and credentials private.

Paying with a card: you may enter a card your human authorized for this purchase (for example a single-use virtual card) into the Stripe checkout form yourself. Card details go only on the Stripe checkout page, never into a request to this storefront, a tool call, or a message to the seller. Then poll the returned `statusUrl` to confirm completion.

Paying with a Link Pay Token (LPT):

1. Discover WebMCP tools on the actual Stripe checkout and read their current definitions. Discover them again after form or payment-method changes. Tool names and schemas vary; unavailable discovery may reflect browser support or frame permissions rather than absent checkout capabilities.
2. Before requesting a Link Pay Token (LPT), find the AI-agent steering checkbox in the top document or a Stripe frame and enable it. It can be offscreen; use a DOM-level interaction or focus it and press Space. Verify `input[name="link_pay_token"]` and `[data-stripe-merchant-account]` in that SAME Stripe document/frame. Read the merchant account from that marker and compare it with any seller/account information returned by the checkout tools. Stop on a mismatch; Link branding alone is insufficient.
3. Use your authorized Link wallet to request a merchant-bound LPT for the confirmed amount, using the DOM-derived account. Obtain spend approval and retrieve the token immediately before use; tokens expire within 30 minutes or when the spend request expires. LPT requests do not support `--test`. Follow [Stripe's current LPT instructions](https://github.com/stripe/link-cli#link-pay-token).
4. If a discovered WebMCP tool explicitly accepts an LPT (for example, `set_link_pay_token`), follow its live schema. Treat token submission as a payment action requiring authorization, not a harmless field setter; do not assume a separate submit step is needed. If that tool is unavailable but the same-frame markers are valid, follow Stripe's documented DOM token-input and submission flow. Handle any further authentication or approval requested by Stripe.
5. Poll the returned `statusUrl` to establish completion before retrying delivery. After an uncertain submission, reconcile status before attempting another payment. `pending_human_payment` is the existing pending-checkout status; it does not restrict who can operate the browser.

If the LPT route cannot be established, do not request a token based on assumptions: pay with an authorized card as above, or privately give your human the checkout URL to pay. LPT is submitted only to Stripe checkout, never to a ZeroClick API body or as an MPP credential. Keep SPT/MPP as a separate programmatic payment flow when advertised.

Availability is specific to the inspected checkout. Do not infer support for manual or partial capture, saved-card setup, or recurring charges from a one-time checkout's LPT tools. For those flows, use human checkout unless the required behavior has been verified. Preserve the existing identity and claim requirements for the purchase.

## Pay-as-you-go by card

A priced 402 of $0.50 or more carries a `card` block with a `payUrl` and a `statusUrl` - keep your agent credential on the retry, as on every call here. POST one body lane above to the `payUrl`, poll the `statusUrl` until it reports complete, then retry the original request with a `zc-payment-id` header naming the `payment.id`. The shared-payment-token lane skips the payUrl entirely: retry the original request with the credential in `Authorization` and it pays and delivers in one round trip.

## Plan purchases by card

Buying a plan needs an agent credential first - see [Identity](https://agents.x402stock.xyz/zcj/v18fbbwycj8e/auth.md). Send the purchase with `Authorization: Bearer <access token>` and one body lane above, or answer the purchase 402's stripe challenge with `Authorization: Payment <credential>` and your bearer moved to `ZC-Agent-Authorization: Bearer <token>`.

Topping up a credit balance works exactly the same way: `POST https://agents.x402stock.xyz/zcj/v18fbbwycj8e/extend` with your bearer, an `amountUsd` meeting BOTH the existing plan minimum and the $0.50 card floor, and the same body lane. Its 402 carries the same `card` block.

A failed delivery refunds the card in full automatically (see the `zc-billing` response header). A retry answering `payment_refunded` or `payment_consumed` is terminal: that payment is spent - start over with a fresh request and pay its new 402.

