---
title: "Configure Stripe Secret Key"
method: PUT
path: "/api/payments/stripe/{environment}/config"
tags: ["Stripe Payments"]
---

# Configure Stripe Secret Key

`PUT /api/payments/stripe/{environment}/config`

Validate and store a Stripe secret key. New Stripe accounts attempt managed webhook setup and then run a unified sync.

## Path parameters

- `environment` 'test' | 'live', required

## Request body

- UpsertStripeConfigBody
  - `secretKey` string, required

## Response `200`

Updated Stripe key configuration

- GetStripeConfigResponse
  - `keys` StripeKeyConfig[], required
    - `environment` 'test' | 'live', required
    - `hasKey` boolean, required
    - `maskedKey` string, nullable, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/insforge/apis/insforge-authentication-api.md) · [All operations](https://skmtc.net/insforge/apis/insforge-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insforge/insforge-authentication-api/revisions/a935bb49f932/schema)
