Skip to content

Escrow

Stripe holds the wallet. Cloudflare prices the floor.

Bids never touch a card directly. Collectors fund an escrow wallet through Stripe Checkout. Holds, sit-out profits, and at-cost wins settle on that balance. The Registrar fee is a bookkeeping line — not a Stripe application fee.

Preview walletWebhook unset

The zip is also stored in project artifacts as domaingems-source.zip and STRIPE.md.

  1. 01

    Card → Checkout → wallet

    Signed-in collectors pick $250 / $500 / $1,000. The server creates a Stripe Checkout Session with client_reference_id and metadata set to their user id. Success returns to the desk with session_id; the webhook is the source of truth.

  2. 02

    Idempotent credit

    checkout.session.completed (and async success) credits profiles.wallet_cents once per session_id. The success URL calls the same ledger helper, so a delayed webhook still cannot double-pay.

  3. 03

    Bids hold wallet, not the card

    Serialized bidding in the auction engine already moves cents on the profile. Stripe is only the on-ramp. Sit-out profits and sole-bidder at-cost refunds stay in-ledger.

  4. 04

    Settlement still conserves

    Winner pays Registrar floor + sit-out profits. Leftover forfeited slices refund to the winner. The house does not take an application fee on the Cloudflare floor.

Environment

Do not commit secrets. Preview runs without Stripe (demo wallet). Production injects keys on deploy.

VariableWherePurpose
STRIPE_SECRET_KEYserverCheckout + retrieve sessions (sk_test_ or sk_live_)
STRIPE_WEBHOOK_SECRETserverVerify POST /api/stripe/webhook (whsec_…)
VITE_STRIPE_PUBLISHABLE_KEYoptionalpk_… — not required for hosted Checkout; shown in status

Webhook

Endpoint: /api/stripe/webhook

Events: checkout.session.completed, checkout.session.async_payment_succeeded, async_payment_failed, expired.

Signature is verified with the raw body. Unsigned events are rejected.

Test cards

Success: 4242 4242 4242 4242

Decline: 4000 0000 0000 0002

Any future expiry, any CVC, any ZIP. 3-D Secure: 4000 0025 0000 3155.

Preview vs live

This instance is Preview wallet. Desk buttons credit the $1,000 demo wallet (cap $5,000).

Deposit amounts: $250.00 · $500.00 · $1,000.00

Registrar

Cloudflare Check still prices the opening bid. On win, production registers with the Registrar API. Stripe never talks to Cloudflare — settlement writes a registration ledger row for the at-cost fee.

Full operator notes ship in the zip as STRIPE.md. Auction mechanics.