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.completed, invoice.paid, 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