@getarco/sdk
v0.1.0
Published
Arco Link SDK — open banking connectivity for the Caribbean
Maintainers
Readme
@getarco/sdk
JavaScript/TypeScript SDK for Arco — open banking infrastructure for the Caribbean.
Installation
npm install @getarco/sdkUsage
Arco Link is the consent modal that handles bank authentication. Your backend obtains a link_token, your frontend opens the modal, and on success you receive a public_token to exchange server-side for a permanent access_token.
1. Get a link token (server-side)
POST /v1/link/token/create
X-Api-Key: <your-client-id>
{ "clientId": "your-client-id", "userReference": "your-internal-user-id" }2. Open the modal (client-side)
import { ArcoLink } from '@getarco/sdk'
const link = new ArcoLink({
linkToken: 'lt_abc123...', // from your backend
apiBaseUrl: 'https://api.arco.finance',
linkUrl: 'https://link.arco.finance',
onSuccess: (publicToken) => {
// Send publicToken to your backend to exchange for an access_token
},
onExit: () => {
// User closed the modal without connecting
}
})
link.open()3. Exchange the public token (server-side)
POST /v1/link/token/exchange
{ "linkTokenId": "...", "authCode": "...", "institutionId": "..." }Returns an accessToken (JWT). Store it — use it as a Bearer token for all data requests.
4. Fetch data
GET /v1/accounts
Authorization: Bearer <access_token>
GET /v1/transactions?accountId=<id>&limit=50
Authorization: Bearer <access_token>Config Reference
| Field | Type | Description |
|---|---|---|
| linkToken | string | Short-lived token from POST /v1/link/token/create |
| apiBaseUrl | string | Arco API base URL |
| linkUrl | string | Arco Link UI URL |
| onSuccess | (publicToken: string) => void | Called when user successfully connects their bank |
| onExit | () => void | Optional. Called when user closes without connecting |
Local Development
const link = new ArcoLink({
linkToken: 'lt_...',
apiBaseUrl: 'http://localhost:5203',
linkUrl: 'http://localhost:3001',
onSuccess: (token) => console.log('Got token:', token),
})Versioning
Follows semantic versioning. Versioned and released independently from all other Arco repos. Changelog maintained in CHANGELOG.md.
Local Development (SDK)
npm install
npm run build # compile to dist/
npm run dev # watch mode
npm link # link locally for integration testing