Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pome.sh/llms.txt

Use this file to discover all available pages before exploring further.

The Stripe twin is a deterministic in-process simulation of the Stripe API — customers, payment intents, subscriptions, prices, and webhooks. Every twin instance starts from a fixture and resets between runs, so flaky billing state never blocks an eval.

What it covers

  • Customers, payment methods, payment intents
  • Products, prices, subscriptions
  • Invoices and webhook event payloads
  • The 402 retry path for failed charges
What it deliberately does NOT cover: Stripe Connect, Stripe Atlas, Issuing, Terminal, or the dashboard UI. Anything that lives outside the public REST API is out of scope.

Quickstart

pome run scenarios/stripe/checkout-happy-path.md
The scenario spins up a Stripe twin locally, hands your agent a test secret key + base URL, and scores the run.

Example: handle a failed charge

pome run scenarios/stripe/handle-failed-charge.md
The scenario seeds a customer with a card that returns 402 on the first charge. Your agent is expected to:
  1. Detect the failure,
  2. Retry with the documented backoff,
  3. Mark the subscription as past_due if the retry fails.
Pome records every API call and asserts the final subscription state.

Pointing your own agent at the twin

pome twin start stripe          # prints twin_url and test secret key
STRIPE_API_BASE=<twin_url> \
STRIPE_SECRET_KEY=<sk_test_...> \
node your-agent.js
The twin speaks the Stripe REST shape — point the official stripe-node (or any other Stripe library that respects STRIPE_API_BASE) at the twin and it works without modification.