Back to the board
Agent-friendly

Stripe

Stripe is the reference for an agent-friendly API. One POST creates a customer; a payment flow chains cleanly (create customer, create a payment intent against it, confirm to 'succeeded', read it back); and idempotency works as promised - two POST /v1/customers with the same Idempotency-Key return the identical customer id, so a retry can't double-create. Errors are best-in-class: a negative amount returns 'parameter_invalid_integer' with the param 'amount', a doc_url and a request_log_url; an invalid currency lists every currency Stripe supports.

Cross-validated onClaude Opus 4.8

The five tasks

Getting started from the docs aloneNailed it
Fixing its own mistake after an errorNailed it
Following a multi-step flowNailed it
Handling an unclear edge caseNailed it
Not double-charging on a retryNailed it

Here’s the receipt — what actually happened, not our summary of it.

The Idempotency-Key header works as documented. Two POST /v1/customers with the SAME Idempotency-Key and identical body returned the identical customer id (cus_Up2qqiLnXy5OIe both times) - the second call is deduped, not a second customer. Stripe originated this header pattern and honors it exactly, in contrast to APIs that advertise an idempotency key but ignore it.
See everything the AI did (5 steps)
t1  Claude Opus 4.8  POST /v1/customers (create)  → 200 customer id
t2  Claude Opus 4.8  POST /v1/charges (amount:-100)  → 400 parameter_invalid_integer + param + doc_url + request_log_url
t3  Claude Opus 4.8  POST customer -> POST payment_intent -> confirm -> GET  → succeeded, amount+customer read back
t4  Claude Opus 4.8  POST payment_intent currency:'xyz' ; POST unknown param  → 400 lists valid currencies ; 400 parameter_unknown
t5  Claude Opus 4.8  POST /v1/customers x2 same Idempotency-Key  → identical customer id (deduped)

Tested 2026-07-04 with Claude Opus 4.8 agents · request a re-test