Account Management Endpoints
Internal REST API endpoints for managing Plaid account connections. Called only from the Haptic website.
POST /create-link-token
Create a Plaid Link token for connecting accounts.
Request:
{
"revenue_cat_id": "user_abc123",
"app_name": "haptic"
}
Response:
{
"link_token": "link-sandbox-abc123..."
}
POST /exchange-public-token
Exchange Plaid public token for access token after Link flow.
Request:
{
"public_token": "public-sandbox-xyz...",
"revenue_cat_id": "user_abc123",
"app_name": "haptic"
}
Response:
POST /remove-account
Remove individual account.
Request:
{
"revenue_cat_id": "user_abc123",
"plaid_account_id": "abc123"
}
Response:
{
"success": true,
"institution_removed": false
}
POST /remove-institution
Remove entire institution (all accounts).
Request:
{
"revenue_cat_id": "user_abc123",
"access_token": "access-sandbox-xyz..."
}
Response:
{
"success": true,
"accounts_removed": 3
}
These endpoints require the X-Internal-Secret header and are not publicly accessible.