# Remove Stripe credentials for one mode

`DELETE /api/v1/gateway-credentials/stripe/{mode}`

Hard delete — a revoked key has no archival value and leaving ciphertext behind is a secret nobody is watching. The webhook endpoint GlobalyMint created in the Stripe account is deleted first, best effort; a hand-made endpoint is never touched.

No API key can call this route: it needs a signed-in dashboard user with the right role. A key answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | `test` or `live` | required |  |

## Responses

### 200

Masked status for both modes after removal.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "test",
                  "live"
                ]
              },
              "configured": {
                "type": "boolean"
              },
              "secretKeyHint": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Last 4 characters only."
              },
              "publishableKeyHint": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hasWebhookSecret": {
                "type": "boolean"
              },
              "account_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stripe account display name from the last successful check."
              },
              "account_id_hint": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Last 4 characters of the Stripe account id."
              },
              "verified_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When Stripe last accepted the key. Null until first checked."
              },
              "checked_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "webhook_registered": {
                "type": "boolean",
                "description": "True while the endpoint in the Stripe account was created by GlobalyMint."
              },
              "webhook_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why not: restricted_key, existing_endpoint, manual, manual_quiet, no_public_url, limit_reached or error."
              },
              "last_event_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Last signature-verified inbound Stripe event."
              },
              "last_event_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "connected",
                  "needs_attention",
                  "not_connected"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "One short sentence when status is needs_attention."
              },
              "reason_code": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "not_verified",
                  "key_rejected",
                  "webhook_missing",
                  "no_events",
                  "webhook_unverified",
                  null
                ]
              }
            },
            "required": [
              "mode",
              "configured",
              "secretKeyHint",
              "publishableKeyHint",
              "hasWebhookSecret",
              "account_name",
              "account_id_hint",
              "verified_at",
              "checked_at",
              "webhook_registered",
              "webhook_reason",
              "last_event_at",
              "last_event_type",
              "status",
              "reason",
              "reason_code"
            ]
          }
        }
      },
      "required": [
        "items"
      ]
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```
