---
title: "Create a new revenue integration. Response contains the generated webhook path that the user must paste into their provider's dashboard."
method: POST
path: "/projects/{project_id}/revenue/integrations"
tags: ["Revenue"]
---

# Create a new revenue integration. Response contains the generated webhook path that the user must paste into their provider's dashboard.

`POST /projects/{project_id}/revenue/integrations`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/revenue/integrations`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Request body

- CreateIntegrationBody
  - `provider` string, required: Registered provider name, e.g. "stripe".
  - `signing_secret` string, password, required: Signing secret from the provider's dashboard.

## Response `201`

- IntegrationResponse
  - `config` union: Provider-specific integration settings persisted in `revenue_integrations.config`. The tag is the lowercase provider name, so adding a new provider means adding a new variant and the existing rows are untouched. Old rows (pre-config) and rows with `NULL` config are treated as "accept all events, no filtering" via [`ProviderConfig::default_for`].
    - object
      - `include_unpriced_charges` boolean: When an allowlist is set, should we still ingest charges that lack a price reference (e.g. standalone `charge.succeeded` without a subscription)? Default true — charges don't belong to a SKU.
      - `metered_mode` 'derive_from_invoices' | 'use_subscription' | 'ignore': How to compute MRR for metered / tiered / hybrid subscriptions.
      - `price_allowlist` string[]: Only events tagged with one of these Stripe price IDs are ingested. Empty = accept all prices.
      - `product_allowlist` string[]: Only events tagged with one of these Stripe product IDs are ingested. Empty = accept all products. Combined with `price_allowlist` via OR — if either list has a match, accept.
      - `provider` 'stripe', required
    - object
      - `product_allowlist` string[]
      - `variant_allowlist` string[]
      - `provider` 'lemon_squeezy', required
  - `created_at` string, date-time, required
  - `has_secret` boolean, required
  - `id` integer, required
  - `last_event_at` string, date-time, nullable
  - `project_id` integer, required
  - `provider` string, required
  - `status` string, required
  - `webhook_path` string, required: Relative path the UI can display and copy. The frontend builds the full URL by prefixing its own origin.
  - `webhook_path_token` string, required: Unguessable token embedded in the public webhook URL. The full URL is `{api_origin}/webhooks/revenue/{provider}/{webhook_path_token}`.

## Other responses

- `400`: Validation error
- `409`: Already connected

## Changes

- **2026-10-23** `7d41b820a372`: 1 breaking
  - the `signing_secret` request property format changed from no format to `password`
- **2026-10-23** `24af93ff5379`: 1 info
  - the `signing_secret` request property format was generalized from `password` to no format
- **2026-10-22** `842d42ed4659`: 1 breaking
  - the `signing_secret` request property format changed from no format to `password`
- **2026-10-22** `1a12a50b75ee`: 1 info
  - the `signing_secret` request property format was generalized from `password` to no format
- **2026-10-21** `79089e9f49ee`: 1 breaking
  - the `signing_secret` request property format changed from no format to `password`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/revenue/integrations/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
