Store a Stripe Customer object representing the human principal behind the agent; attach a payment method (card or bank account) to this Customer — the agent acts on behalf of the customer, not as a principal in its own right.
When the agent identifies a checkout to complete, create a PaymentIntent server-side (in your backend, not from the agent process) with the amount, currency, customer ID, and confirm=false; this keeps the raw payment method out of the agent's context.
Pass the PaymentIntent client_secret to the agent only if the agent needs to confirm it; for fully automated flows, confirm the PaymentIntent server-side after validating the purchase intent against your spend policy.
Set statement_descriptor and metadata fields on the PaymentIntent with the agent session ID and purchase context — this is essential for reconciliation and dispute response.
Check the PaymentIntent status after confirmation: requires_action means 3DS or another challenge is needed and a human must intervene; succeeded means the payment completed; requires_payment_method means the card was declined.
Emit a structured event to your audit log on each status transition; never consider a purchase complete until the PaymentIntent status is 'succeeded' — not just 'processing'.
Known gotchas
Stripe's terms of service require that the cardholder has authorized the charge; fully automated agent purchases without the account holder's prior consent violate ToS — ensure the human has explicitly delegated authority before the agent acts.
PaymentIntents have idempotency support via the Idempotency-Key header on creation — always use it; creating two PaymentIntents for the same purchase and only confirming one leaves a dangling object and distorts reporting.
Client secrets must never be logged or stored; they function as short-lived bearer tokens for the payment method — treat them with the same sensitivity as the card number itself.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp