latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-192731541009.1 KB

ba3a29c6eb33

Integrations

Connect integration

Connects an API-key / webhook-secret integration: polar, paddle, dodo, whop, creem, chargebee, clerk, posthog, segment, or affonso. Credentials are validated against the provider where possible, stored encrypted, and never returned. Payment providers queue their initial revenue backfill; Affonso queues its affiliate backfill; PostHog and Segment can optionally import event history. The response includes the webhookUrl to configure at the provider with the same secret. Reconnecting replaces stored credentials. OAuth and app-install providers (Stripe, Shopify, Supabase, GitHub, WooCommerce, Meta) return a 400 pointing at the dashboard. Requires the integrations:manage scope.

post/integrations/connect

Request body

provider'polar' | 'paddle' | 'dodo' | 'whop' | 'creem' | 'chargebee' | 'clerk' | 'posthog' | 'segment' | 'affonso' required

Provider to connect.

webhookSecretstring required

Signing secret of the webhook created at the provider. For Chargebee, the webhook's basic-auth credentials as username:password. For Segment, the secret is your own choice and must be between 16 and 153 UTF-8 bytes.

apiKeystring

Provider API key. Required for every provider except clerk, posthog, and segment.

providerAccountIdstring

Provider account id: Paddle seller ID, Dodo business ID, Whop company ID, Creem store ID, or Chargebee site name. Polar resolves it from the API key.

Response

Integration connected

successboolean
webhookUrlstring

URL to configure in the provider's webhook settings with the same secret.

revenueSyncQueuedboolean

Payment providers only. Whether the initial revenue backfill was queued.

backfillQueuedboolean

Affonso only. Whether the affiliate backfill was queued.

Example response

{
  "success": true,
  "integration": {
    "provider": "shopify",
    "name": "Shopify",
    "lastSyncSkipped": {
      "records": [
        {
          "reasonCode": "invalid_email_domain",
          "reason": "Invalid domain for \"buyer@example.com\": Domain cannot receive email (no MX records)"
        }
      ]
    }
  }
}