Subscription payments are the most common production use case for agents that spend money. The protocol surface is simple; the failure modes (card expiry, dunning, user revoke) are where production code earns its keep. AP2 standardizes the intent shape; the operational pattern is up to you.

Advertisement

Recurring intent shape

Agent registers a recurring intent: amount, frequency (monthly/weekly), merchant, card-on-file reference. AP2 attaches user consent metadata. Each renewal generates a payment intent referencing the recurring template; processor charges per the schedule.

Renewal handling

Per-cycle pre-flight check: card still valid, user scope still authorized, merchant still active. Trigger renewal 1-3 days before due (gives time for retry). Failed initial: dunning (3-7 day retry with declining frequency).

Advertisement

Card expiry and updater services

Card account updater services (Visa/Mastercard) push new card numbers when a card is reissued. Without it, ~3% of subscriptions fail per year just from expiry. Plumb the updater into your renewal flow; the cost is low and the recovery is huge.

User revocation

User can revoke at any time. Revocation propagates: agent stops attempting future renewals immediately. Preserve audit trail of pre-revocation charges. Pro-rate or refund according to your terms; don't silently process the in-flight cycle.

Operational metrics

Track: renewal success rate, declining cards rate, voluntary churn, involuntary churn (failed payment). Involuntary churn is fixable through better dunning; voluntary is product. Don't conflate them in the same metric.

Pre-flight + updater services + graceful dunning + clean revocation. Track involuntary churn separately; it's recoverable.