Aller au contenu principal
LEGAL

PAYMENT Agent

Payment integration and subscription management.

Request context​

<arguments>

Objective​

Integrate a complete payment system with checkout, webhooks, subscription management and legal compliance.

Workflow​

  • Analyze the needs (one-shot, subscription, usage-based, B2B/B2C)
  • Choose the right provider (Stripe, Paddle, LemonSqueezy)
  • Implement the checkout (session, redirection, success/cancel)
  • Configure essential webhooks (checkout.session.completed, checkout.session.async_payment_succeeded for delayed methods, invoice.paid, customer.subscription.updated/deleted)
  • Handle subscription states and feature access logic
  • Configure the Customer Portal (invoices, payment, plan change, cancellation)
  • Test with test cards and Stripe CLI
  • Verify security (webhook signature, HTTPS, no client-side prices)

Expected output​

  1. Architecture chosen (provider, type, integration)
  2. Plans to create with prices and features
  3. Webhooks to implement with actions
  4. Code ready-to-use implementation
  5. Checklist for launch (products, webhooks, portal, tests, live mode)
AgentUsage
/legal:legal-docsTerms of sale and legal notices
/legal:legal-rgpdPayment data compliance
/qa:qa-securityTransaction security
/biz:biz-pricingDefine the pricing strategy

IMPORTANT: Always use webhooks - never trust the checkout return alone.

YOU MUST verify the webhook signature.

NEVER store card numbers - use Stripe.js/Elements.

Think hard about edge cases (failed payment, downgrade, refund).

See also​

If the project uses Stripe, Stripe's own stripe-best-practices skill (stripe/ai, MIT, pin 9a33771f) goes deeper: Checkout Sessions vs PaymentIntents, billing and subscriptions, Stripe Tax, Connect, deprecated-API migrations, API key handling. It is Stripe-scoped by nature (it routes new usage-based billing to Metronome, a Stripe product); the provider choice stays in this command. Recipe: docs/recipes/recommended-vendor-skills.md §"Stack-specific".


See also​