{
  "id": "stripe",
  "name": "Stripe CLI",
  "homepage": "https://docs.stripe.com/stripe-cli",
  "description": "A command-line tool for Stripe.",
  "icon": "SimpleIcons:stripe",
  "executables": [
    "stripe"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/stripe/config.toml"
    ],
    "exclude": [],
    "secret": [
      "[configHome]/stripe/credentials.json"
    ],
    "secret_paths": [
      {
        "file": "[configHome]/stripe/config.toml",
        "match": {
          "key_path": [
            "*.test_mode_api_key",
            "*.live_mode_api_key",
            "*.secret_key",
            "*.api_key",
            "profiles.*.test_mode_api_key",
            "profiles.*.live_mode_api_key"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "[configHome]/stripe/config.toml",
        "match": {
          "key_path": [
            "*.device_name",
            "profiles.*.device_name"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Stripe CLI commands",
    "description": "Forward webhook events to a local server or trigger test events. Other subcommands and global flags are left out.",
    "quality": "ai-draft",
    "base": "fig:stripe",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/stripe.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "listen"
        ],
        "label": "Listen for webhooks",
        "description": "Receive webhook events from Stripe and forward them locally.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/stripe.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "forward_to",
            "label": "Forward to URL",
            "type": "url",
            "option": [
              "--forward-to",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "forward_connect_to",
            "label": "Forward Connect events to",
            "type": "url",
            "option": [
              "--forward-connect-to",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "events",
            "label": "Event types",
            "description": "Comma-separated list of event types.",
            "type": "string",
            "option": [
              "--events",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "latest",
            "label": "Latest API version",
            "type": "boolean",
            "option": [
              "--latest",
              "-l"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "live",
            "label": "Live mode",
            "type": "boolean",
            "option": [
              "--live"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "print_json",
            "label": "Print JSON",
            "type": "boolean",
            "option": [
              "--print-json",
              "-j"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "skip_verify",
            "label": "Skip certificate verification",
            "type": "boolean",
            "option": [
              "--skip-verify"
            ],
            "effect": "exec",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "listen",
            "label": "Forward events to localhost",
            "fields": [
              "forward_to",
              "events",
              "print_json"
            ],
            "required": [
              "forward_to"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "forward_to",
              "events",
              "print_json"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "forward_connect_to",
              "latest",
              "live",
              "skip_verify"
            ]
          }
        ]
      },
      {
        "path": [
          "trigger"
        ],
        "label": "Trigger a test event",
        "description": "Trigger a webhook event for local testing.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/stripe.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "event",
            "label": "Event",
            "type": "string",
            "position": 0,
            "suggestions": [
              {
                "value": "charge.succeeded",
                "label": "charge.succeeded"
              },
              {
                "value": "checkout.session.completed",
                "label": "checkout.session.completed"
              },
              {
                "value": "customer.created",
                "label": "customer.created"
              },
              {
                "value": "invoice.paid",
                "label": "invoice.paid"
              },
              {
                "value": "payment_intent.succeeded",
                "label": "payment_intent.succeeded"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "trigger",
            "label": "Trigger event",
            "fields": [
              "event"
            ],
            "required": [
              "event"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "event"
            ]
          }
        ]
      }
    ]
  }
}
