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
- Create a Checkout Session for an authenticated account and allowed Stripe price ID.
- Fulfill credits only from a verified Stripe webhook with a paid Checkout Session.
- Store immutable ledger entries for grants, spends, reversals, refunds, and adjustments.
- Deduplicate by Stripe event ID and Checkout Session or PaymentIntent ID.
- Spend credits only once per accepted verified contact using an idempotency key.
- 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.