dcg

Stripe

payment.stripe

Protects against destructive Stripe CLI/API operations like deleting webhook endpoints and customers, or rotating API keys without coordination.

  • 7blocking rules
  • 6safe patterns
  • 1Critical
  • 5High
  • 1Medium
~/.config/dcg/config.toml
[packs]
enabled = ["payment.stripe"]

Evaluated when a command contains stripe, api.stripe.com.

Blocking rules

Each rule ID is payment.stripe:<name>. Use it in allowlists and [policy.rules].

  1. stripe-customers-delete

    Critical

    stripe customers delete permanently deletes a customer.

    Explanation
    Deleting a customer removes their payment methods, subscriptions, and billing history from Stripe. This can affect compliance records, break recurring billing, and lose valuable customer data that cannot be recovered. Safer alternatives: - Cancel subscriptions and mark customer inactive instead - stripe customers retrieve to verify customer data first - Export customer data before deletion for compliance
  2. stripe-api-delete

    High

    Stripe API DELETE calls remove Stripe resources.

    Explanation
    Direct API DELETE calls permanently remove Stripe resources without CLI confirmation prompts. This bypasses safety checks and can delete customers, products, subscriptions, or other critical payment data. Safer alternatives: - Use stripe CLI which provides confirmation prompts - GET the resource first to verify ID is correct - Test in Stripe test mode before production
  3. stripe-coupons-delete

    High

    stripe coupons delete permanently deletes a coupon.

    Explanation
    Deleting a coupon prevents new redemptions and removes the discount from future invoices. Customers with the coupon applied to their subscription will lose the discount on their next renewal. Safer alternatives: - Set coupon max_redemptions or redeem_by to expire naturally - stripe coupons retrieve to verify before deletion - Communicate discount changes to affected customers first
  4. stripe-prices-delete

    High

    stripe prices delete permanently deletes a price.

    Explanation
    Deleting a price removes the pricing configuration. Active subscriptions using this price will fail to renew or behave unexpectedly. New purchases cannot use this price ID, breaking checkout integrations that reference it. Safer alternatives: - Archive the price by setting active=false instead - Create a new price rather than modifying existing one - Check for active subscriptions using this price first
  5. stripe-products-delete

    High

    stripe products delete permanently deletes a product.

    Explanation
    Deleting a product removes it from your catalog. Associated prices remain but become orphaned. Existing subscriptions using this product may behave unexpectedly and invoice line items will lose product metadata. Safer alternatives: - Archive the product by setting active=false instead - stripe products retrieve to verify before deletion - Ensure no active subscriptions reference this product
  6. stripe-webhook-endpoints-delete

    High

    stripe webhook_endpoints delete removes a Stripe webhook endpoint, breaking notifications.

    Explanation
    Deleting a webhook endpoint stops Stripe event notifications for that URL. Your application will miss payment confirmations, subscription updates, dispute alerts, and other critical events until the webhook is recreated. Safer alternatives: - stripe webhook_endpoints list to verify before deletion - Disable the endpoint instead of deleting if temporary - Ensure backup webhook is configured before deletion
  7. stripe-api-keys-roll

    Medium

    stripe api_keys roll rotates API keys; coordinate to avoid outages.

    Explanation
    Rolling API keys invalidates the old key immediately. Any service using the old key will fail authentication until updated. In production, this can cause payment processing outages if not coordinated across all systems. Safer alternatives: - Deploy new key to all services before rolling - Use key restriction to limit blast radius - Test key rotation in test mode first

Safe patterns

Checked first. A command that matches one is never blocked by this pack.

  • stripe-listen
  • stripe-customers-list
  • stripe-products-list
  • stripe-payments-list
  • stripe-logs-tail
  • stripe-api-get