Payments

Two payment paths, one discovery product.

Humans buy prepaid contact credits with Stripe. Agents pay per verified contact with x402. The two paths should stay explicit in docs, receipts, and API errors.

Draft PR page

Which Path Should I Use?

Stripe Use for human-managed accounts, card checkout, receipts, and the prepaid Starter pack.
x402 Use for autonomous agents that inspect price, pay per verified contact, and handle 402 challenges.

Stripe Fulfillment Contract

  1. Create a Checkout Session for an authenticated account and allowed Stripe price ID.
  2. Fulfill credits only from a verified Stripe webhook with a paid Checkout Session.
  3. Store immutable ledger entries for grants, spends, reversals, refunds, and adjustments.
  4. Deduplicate by Stripe event ID and Checkout Session or PaymentIntent ID.
  5. Spend credits only once per accepted verified contact using an idempotency key.
  6. Do not charge for rejected pages, unverified contacts, empty jobs, or status polling.

Required Error Codes

insufficient_credits The account cannot spend a prepaid credit for this operation.
payment_pending Checkout completed in the browser but webhook fulfillment has not confirmed credits.
payment_reversed A refund, chargeback, or dispute reversed some or all credits.
credit_spend_conflict A retry attempted to spend a different amount for the same operation key.