Connect Stripe
Checks the API key with the provider (400 when it is rejected or lacks a read permission), stores it encrypted, and queues the import of the last backfillDays days of payments (90 by default, 365 at most). When the key belongs to another account or mode than the payments already synced, those are deleted.
Requires site:update on the site (an API key, or a signed-in member's role). Share links: 401.
x-api-key<token>An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).
Scope: site:update
siteId*stringapplication/json- body
secretKey*stringA Stripe API key; never returned, stored encrypted
^(sk|rk)_(live|test)_[A-Za-z0-9_]{8,240}$backfillDays?integer1 <= value <= 36590OK
application/json- response
data*curl -X PUT 'https://pilotfox.app/api/v1/sites/string/integrations/stripe' \ -H 'Content-Type: application/json' \ -d '{ "secretKey": "string"}'{ "data": { "provider": "stripe", "connected": true, "keyHint": "string", "livemode": true, "accountName": "string", "status": "ok", "lastSyncAt": "string", "lastError": "string", "notice": "string", "backfillDays": -9007199254740991 }}