/signing/plaid-lab.
Which Plaid environment is active (sandbox or production) is configured by your workspace administrator. In sandbox mode, use Plaid’s test credentials to complete the flow without a real bank account.
How the Plaid Link flow works
1
Request a link token
Call The
POST /api/plaid/link-token from your signed-in session. Safeclose returns a short-lived link_token scoped to the current user.link_token expires quickly — pass it to the Plaid Link UI immediately.2
Initialize Plaid Link
Use the The user selects their institution and authenticates inside the Plaid Link modal. Your app code never handles credentials directly.
link_token to open the Plaid Link UI. In a React app, pass the token to usePlaidLink from the react-plaid-link package:3
Exchange the public token
After the user completes Plaid Link, Plaid calls your
onSuccess callback with a one-time public_token. Send it to POST /api/plaid/exchange to exchange it for a persistent item reference.4
Check link status
At any time, call Use
GET /api/plaid/status to check whether the signed-in user has a linked Plaid item.connected: false to prompt the user to complete the Plaid Link flow.API summary
Plaid webhook events
Plaid sends item update notifications to Safeclose automatically — for example, when new transactions are available or when a linked item needs re-authentication. These events arrive atPOST /api/webhooks/plaid and are processed asynchronously.
Webhook configuration
Learn how Safeclose verifies Plaid webhook events and what your administrator needs to configure.
