v97

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-04231129815.9 KB
Integrations

Connect integration

Connects an API-key / webhook-secret integration: polar, paddle, dodo, whop, creem, chargebee, clerk, posthog, 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 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' | '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.

apiKeystring

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

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)"
        }
      ]
    }
  }
}