Finance IntegrationsAggregators Plaid API Endpoints You can find these endpoints in src/aggregators/plaid/plaid.controller.ts
Get token link.
POST
{{url}}/aggregators/token-link
This endpoint generates a public_token that has a time-to-live of 30 minutes.
201: Created Successful request 403: Forbidden User does not exist 404: Not Found Plaid error 401: Unauthorized Authorization failed: invalid or expired token
Copy {
"statusCode": 201,
"data": {
"link_token": "link-sandbox-0ed4a93e-ba5f-42ca-be0f-7ce8f04cd42d"
}
}
Copy {
"statusCode": 403,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 404,
"message": <Message>,
"error": "Not Found"
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
Generate access token and processor token.
POST
{{url}}/aggregators/banking-connection
In this endpoint, send a public_token to generate an access_token so you can get linked account information in Plaid.
Request Body
This parameter is a flag to know if you want to directly connect your account to your BaaS
201: Created Successful request 422: Unprocessable Entity Unprocessable entity 403: Forbidden User doesn't exist 404: Not Found Plaid error 401: Unauthorized Authorization failed: invalid or expired token 404: Not Found Not found
Copy {
"statusCode": 422,
"message": "This user already has an account created.",
"error": "Unprocessable Entity"
}
Copy {
"statusCode": 404,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 404,
"message": <Message>,
"error": "Not Found"
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
Copy {
"statusCode": 404,
"message": "This user already created an account.",
"error": "Not Found"
}
Get my accounts.
GET
{{url}}/aggregators/my-accounts
This endpoint returns all accounts registered by the user.
200: OK Successful request 403: Forbidden User doesn't exist 404: Not Found Plaid error 401: Unauthorized Authorization failed: invalid or expired token
Copy {
"statusCode": 200,
"data": {
"accounts": [
{
"baas_account_id": <BassAccountId>,
"account_id": <AccountId>,
"name": "Plaid Saving",
"baas_status": "active"
"subtype": "savings",
"type": "depository",
"mask": "1111,
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
}
]
}
}
Copy {
"statusCode": 404,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 404,
"message": <Message>,
"error": "Not Found"
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
For the my-accounts
endpoints, the baasAccountId
and baasStatus
fields are taken from the BaaS the account is connected to. If these fields have a null value, it means that the account has not been connected to any BaaS. But, if there is a baasAccountId, we can take the baas_status as a reference to know if the connection to the BaaS was successful.
Connect account to BaaS.
POST
{{url}}/aggregators/banking-account-connection
This endpoint connects the selected account to the BaaS.
Request Body
201: Created Successful request 404: Not Found Plaid error 401: Unauthorized Authorization failed: invalid or expired token 403: Forbidden User doesn't exist 422: Unprocessable Entity Unprocessable entity
Copy {
"statusCode": 404,
"message": <Message>
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
Copy {
"statusCode": 403,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 422,
"message": "User has not created a Plaid Account.",
"error": "Unproccesable Entity"
}
Remove Plaid connection.
DELETE
{{url}}/aggregators/unlink-banking-connection
This endpoint removes the access token generated to make queries in Plaid.
204: No Content Successful request 422: Unprocessable Entity Unprocessable entity 403: Forbidden User doesn't exist 401: Unauthorized Authorization failed: invalid or expired token
Copy {
"statusCode": 422,
"message": "User doesn't have connected accounts",
"error": "Unprocessable Entity"
}
Copy {
"statusCode": 404,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
Remove specific account.
DELETE
{{URL}}/aggregators/my-accounts/:id
This endpoint removes the processor token generated to make queries in Plaid.
Path Parameters
204: No Content Successful request 404: Not Found Plaid error 401: Unauthorized Authorization failed: invalid or expired token 403: Forbidden User doesn't exist 422: Unprocessable Entity Unprocessable entity
Copy {
"statusCode": 404,
"message": <Message>,
"error": "Not Found"
}
Copy {
"statusCode": 401,
"message": "Unauthorized"
}
Copy {
"statusCode": 403,
"message": "User has not been created or has not been onboarded: No email address found.",
"error": "Not Found"
}
Copy {
"statusCode": 422,
"message": "This account does not exist",
"error": "Unprocessable Entity"
}