### Example certificate chain structure (Bash) Source: https://docs.tink.com/resources/open-banking/install-certificates Shows the required PEM file format containing leaf, intermediate, and root certificates. Used as input for Tink's certificate installation script. ```bash # Example certificate file contents -----BEGIN CERTIFICATE----- leaf certificate -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- intermediate certificate -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- rootCa certificate -----END CERTIFICATE----- ``` -------------------------------- ### Install certificates for the first time Source: https://docs.tink.com/resources/open-banking/tpp-integration-manager Command for first-time certificate installation. Installs and activates the new certificate in production environment. Important: Use with caution on live production traffic as it may cause disruptions. ```bash # First-time certificate installation python tink_secret_utils.py certificates encrypt-and-upload \ --certificate {YOUR_CHAIN_DOT_PEM_FILE} \ --private-key {YOUR_CLIENT_DOT_KEY_FILE} \ --certificate-type {QWAC_OR_QSEALC} \ --regulatory-zone {EU_OR_UK} \ api-gateway --cluster oxford --environment production \ oauth2 --client-id {YOUR_CLIENT_ID} \ --client-secret {YOUR_CLIENT_SECRET} ``` -------------------------------- ### Example Webhook Request (JSON) Source: https://docs.tink.com/resources/money-manager/money-manager-api/webhooks-for-actionable-insights Provides an example of a complete webhook request for a BUDGET_SUGGEST_CREATE_TOP_PRIMARY_CATEGORY insight. Includes detailed information about the insight and proposed actions. ```json { "context": { "userId": "e63af98d7b434ea89bd79389424a44ec", "externalUserId": "67914791-87db-4d28-b486-f50b863d563f" }, "content": { "userId": "e63af98d7b434ea89bd79389424a44ec", "externalUserId": "67914791-87db-4d28-b486-f50b863d563f", "insights": [ { "id": "b43f181023704ee59242e13fff593c25", "userId": "e63af98d7b434ea89bd79389424a44ec", "type": "BUDGET_SUGGEST_CREATE_TOP_PRIMARY_CATEGORY", "title": "Set a budget for your top expense: Shopping", "description": "You spent £11,000 on Shopping last month. How about setting up a budget of £9,900 to help save more money?", "createdTime": 1746446491998, "data": { "categorySpending": { "categoryCode": "expenses:shopping", "spentAmount": { "currencyCode": "GBP", "amount": 11000.0 } }, "suggestedBudgetAmount": { "currencyCode": "GBP", "amount": 9900.0 }, "type": "BUDGET_SUGGEST_CREATE_TOP_PRIMARY_CATEGORY" }, "actions": [ { "label": "Create Budget", "data": { "budgetSuggestion": { "filter": { "accounts": null, "categories": [ "expenses:shopping" ] }, "periodicityType": "BUDGET_PERIODICITY_TYPE_RECURRING", "oneOffPeriodicityData": null, "recurringPeriodicityData": { "periodUnit": "MONTH" }, "amount": { "currencyCode": "GBP", "amount": 9900.0 } }, "type": "CREATE_BUDGET" } }, { "label": "Archive", "data": { "type": "DISMISS" } } ] } ] }, "event": "actionable-insights:created" } ``` -------------------------------- ### Construct Risk Insights SDK URL for web integration Source: https://docs.tink.com/resources/risk-insights/setup-and-integrate-risk-insights Example URL construction for launching the Tink Link Risk Insights flow in web applications. Requires replacing {YOUR_CLIENT_ID} with actual client ID from Console. The URL includes client_id, redirect_uri, and market parameters. ```url https://link.tink.com/1.0/risk-insights/create-report?client_id={YOUR_CLIENT_ID}&redirect_uri=https://console.tink.com/callback&market=GB ``` -------------------------------- ### Example Callback URL Source: https://docs.tink.com/resources/transactions/continuous-connect-to-a-bank-account An example of a callback URL returned after the Tink flow, demonstrating the inclusion of client_id, credentials_id, and state parameters. ```text https://console.tink.com/callback?client_id=&df05e4b379934cd09963197cc855bfe8&credentials_id=e5331af8d98f4c58800960202b6ec50d&state={OPTIONAL_STATE_CODE_THAT_YOU_SPECIFIED}&redirect_uri=https://console.tink.com/callback ``` -------------------------------- ### Launch Tink Link SDK with Kotlin: Start the flow Source: https://docs.tink.com/resources/transactions/setup-and-integrate-transactions Launch the product flow by passing the configuration and request objects and selecting the FullScreen launch mode. Handles success and error via callbacks. Dependencies: Kotlin, Tink Link SDK. ```kotlin Tink.Transactions.connectAccountsForOneTimeAccess(\n\tactivity,\n\tconfiguration,\n\trequest,\n\tFullScreen(...),\n\t{ success ->\n\t\t// Callback for handling success case\n\t},\n\t{ error ->\n\t\t// Callback for handling error case\n\t}\n) ``` -------------------------------- ### GET /1.0/risk-insights/create-report Source: https://docs.tink.com/resources/risk-insights/risk-insights-sdk-reference Endpoint to initiate the Risk Insights report creation flow. This URL is integrated into your application to start the user journey. ```APIDOC ## GET /1.0/risk-insights/create-report ### Description Initiates the Risk Insights report creation process by redirecting the user to Tink Link for authentication and provider selection. ### Method GET ### Endpoint https://link.tink.com/1.0/risk-insights/create-report ### Parameters #### Query Parameters - **client_id** (string) - Required - Your client ID retrieved from Tink Console. - **redirect_uri** (string) - Required - The URI to which the user will be redirected after completing the flow. - **app_uri** (string) - Optional - Deep link for Android or iOS apps to redirect back after authentication. - **auto_redirect_mobile** (boolean) - Optional - Recommended for mobile; opens bank app directly if installed. - **external_reference** (string) - Optional - External reference identifier included in the report (max 50 characters). - **input_provider** (string) - Optional - Unique provider name to skip provider selection screen. - **input_username** (string) - Optional - Prefills username field for supported providers. - **locale** (string) - Optional - UI text locale (default: en_US). - **market** (string) - Optional - Market code for country-specific providers (default: SE). - **session_id** (string) - Optional - Secure configuration and data prefill. - **state** (string) - Optional - CSRF protection value returned in the callback. - **theme** (string) - Optional - Overrides system preference ('LIGHT' or 'DARK'). ### Request Example ```bash https://link.tink.com/1.0/risk-insights/create-report?client_id={YOUR_CLIENT_ID}&redirect_uri=http://localhost:3000/callback&market=GB ``` ### Response #### Success Response (200) - **risk_insights_id** (string) - Identifier used to retrieve the generated report. - **state** (string) - Returned only if provided in the initial request. #### Response Example ```bash http://localhost:3000/callback?risk_insights_id=6915ab99857fec1e6f2f6c078 ``` ``` -------------------------------- ### POST /api/v1/credentials Source: https://docs.tink.com/resources/aggregation/aggregate-data Create a credential for a provider to start the aggregation process. Requires user authentication. ```APIDOC ## POST /api/v1/credentials ### Description Add a credential for a provider to initiate data aggregation. Supports filtering financial data types via query parameters. ### Method POST ### Endpoint /api/v1/credentials ### Parameters #### Query Parameters - **items** (string) - Optional - Specify financial data types to fetch (e.g., INVESTMENT_ACCOUNTS, CREDITCARD_TRANSACTIONS). #### Request Body - **fields** (object) - Required - Contains username and password for the provider. - **providerName** (string) - Required - The name of the provider. ### Request Example ```bash curl -v -X POST 'https://api.tink.com/api/v1/credentials?items=INVESTMENT_ACCOUNTS&items=CREDITCARD_TRANSACTIONS' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}' \ -d '{ "fields": { "username": "{END_USER_USERNAME}", "password": "{END_USER_PASSWORD}" }, "providerName": "{PROVIDER_NAME}" }' ``` ### Response #### Success Response (200) - **Credential** (object) - Contains the credential details with status indicating aggregation progress. #### Common Errors - `HTTP 409` - Identical credentials already exist. - `HTTP 403` - Access forbidden (wrong scopes). ``` -------------------------------- ### Launch TinkLink BusinessTransactions Flow (Swift) Source: https://docs.tink.com/resources/business-transactions/setup-and-integrate-business-transactions Shows how to initiate the Business Transactions flow using `Tink.BusinessTransactions.connectAccountsForOneTimeAccess`. This includes presenting the view controller and handling the completion handler for success/failure scenarios. ```swift let viewController = Tink.BusinessTransactions.connectAccountsForOneTimeAccess(configuration: configuration, market: Market("<#String#>")) { result in // Handle result } present(viewController, animated: true) ``` ```swift switch result { case .success(let response): // Handle success case case .failure(let error): // Handle error case } ``` ```swift let viewController = Tink.BusinessTransactions.connectAccountsForOneTimeAccess(configuration: configuration, market: Market("<#String#>")) { [weak self] result in // Handle result self?.dismiss(animated: true) } ``` -------------------------------- ### Launch Tink Link SDK in Swift Source: https://docs.tink.com/resources/transactions/setup-and-integrate-transactions Initiates and presents the Tink Link view controller for connecting accounts. Handles the result in a completion handler and requires manual dismissal of the view controller. ```swift let viewController = Tink.Transactions.connectAccountsForOneTimeAccess(configuration: configuration, market: Market(<#String#>)) { result in // Handle result } present(viewController, animated: true) ``` -------------------------------- ### GET /api/v1/credentials/{credentials_id} Source: https://docs.tink.com/resources/aggregation/aggregate-data Retrieve the status of a credential to check aggregation progress. Requires user authentication. ```APIDOC ## GET /api/v1/credentials/{credentials_id} ### Description Check the status of a credential to determine if aggregation is complete. Different status codes indicate various stages of the process. ### Method GET ### Endpoint /api/v1/credentials/{credentials_id} ### Parameters #### Path Parameters - **credentials_id** (string) - Required - The ID of the credential to check. ### Request Example ```bash curl -v https://api.tink.com/api/v1/credentials/{CREDENTIALS_ID} \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}' ``` ### Response Refer to the Credentials API documentation for detailed response structure and status codes. ``` -------------------------------- ### Launch Tink Link SDK with Kotlin: Initialize configuration Source: https://docs.tink.com/resources/transactions/setup-and-integrate-transactions Create the configuration object using clientId, redirectUri, baseDomain, and market. This object is used to launch the flow. ```kotlin val configuration = Configuration(\n\tclientId = \"{YOUR_CLIENT_ID}\",\n\tredirectUri = \"{YOUR_REDIRECT_URI}\",\n\tbaseDomain = \"{TINK_LINK_BASE_DOMAIN}\",\n\tmarket = \"{YOUR_MARKET_CODE}\" \n) ``` -------------------------------- ### GET /api/v1/providers/{market} Source: https://docs.tink.com/resources/aggregation/aggregate-data Retrieve all available providers for a specific market. This endpoint is public and does not require authentication. ```APIDOC ## GET /api/v1/providers/{market} ### Description Get all available providers for a specified market. This API endpoint is public and can be used without prior authentication. ### Method GET ### Endpoint /api/v1/providers/{market} ### Parameters #### Path Parameters - **market** (string) - Required - The market code (e.g., ES for Spain). #### Query Parameters - **excludeNonTestProviders** (boolean) - Optional - Exclude non-test providers. - **includeTestProviders** (boolean) - Optional - Include test providers. ### Request Example ```bash curl https://api.tink.com/api/v1/providers/ES ``` ### Response A list of providers. Refer to the API reference documentation for detailed response structure. ``` -------------------------------- ### Launch SDK Product Flow in Kotlin Source: https://docs.tink.com/resources/business-transactions/setup-and-integrate-business-transactions Launches the Tink Link SDK with specified configuration and request objects. Supports FullScreen and Modal display modes with success/error callbacks. ```kotlin Tink.BusinessTransactions.connectAccountsForOneTimeAccess( activity, configuration, request, FullScreen(...), { success -> // Callback for handling success case }, { error -> // Callback for handling error case } ) ``` -------------------------------- ### GET /api/v1/providers/{market} (Test Providers) Source: https://docs.tink.com/resources/aggregation/aggregate-data Retrieve only test providers for a specific market. This endpoint is public and does not require authentication. ```APIDOC ## GET /api/v1/providers/{market} ### Description Fetch all available test providers for a specified market. Test providers emulate real providers without requiring actual bank credentials. ### Method GET ### Endpoint /api/v1/providers/{market} ### Parameters #### Path Parameters - **market** (string) - Required - The market code (e.g., ES for Spain). #### Query Parameters - **excludeNonTestProviders** (boolean) - Optional - Exclude non-test providers. - **includeTestProviders** (boolean) - Optional - Include test providers. ### Request Example ```bash curl https://api.tink.com/api/v1/providers/ES?excludeNonTestProviders=true&includeTestProviders=true ``` ### Response A list of test providers. Refer to the API reference documentation for detailed response structure. ``` -------------------------------- ### Get Tink Access Token (Bash) Source: https://docs.tink.com/resources/data-enrichment/get-data-into-the-tink-platform-using-aggregation This example demonstrates how to request a client access token using the client id/secret and specifying the required scope permissions (user:create, authorization:grant). The token provides access to aggregation endpoints and is valid for 30 minutes. ```bash curl -v -X POST https://api.tink.com/api/v1/oauth/token \ -d 'client_id={YOUR_CLIENT_ID}' \ -d 'client_secret={YOUR_CLIENT_SECRET}' \ -d 'grant_type=client_credentials' \ -d 'scope=user:create,authorization:grant' ``` -------------------------------- ### Launch Tink Link Account Check Flow Source: https://docs.tink.com/resources/account-check/setup-and-integrate-account-check Initiate and present the Tink Link account check view controller with configuration and market settings, handling the complete authentication flow. ```swift let viewController = Tink.AccountCheck.createReport(configuration: configuration, market: Market(<#String#>)) { result in // Handle result } present(viewController, animated: true) ``` -------------------------------- ### GET /api/v1/budgets/recommended Source: https://docs.tink.com/resources/money-manager/money-manager-api/recommend-budgets Retrieve a list of budget recommendations based on user spending behavior. These recommendations include top category spendings that do not already have budgets set. ```APIDOC ## GET /api/v1/budgets/recommended ### Description This endpoint retrieves budget recommendations based on the user's spending history. It identifies categories with significant expenses that do not yet have associated budgets. ### Method GET ### Endpoint /api/v1/budgets/recommended ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token with `budgets:read` scope ### Request Example ```bash curl 'https://api.tink.com/api/v1/budgets/recommended' \ -H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}' ``` ### Response #### Success Response (200) - **recommendedBudgets** (array) - List of budget recommendation objects - **budget.amount** (object) - Budget amount details - **currencyCode** (string) - Currency code (e.g., EUR) - **scale** (integer) - Decimal scaling factor - **unscaledValue** (integer) - Amount before scaling - **budget.filter.categories** (array) - List of category codes - **budget.name** (string) - Budget name based on category - **budget.recurringPeriodicity.periodUnit** (string) - Frequency of budget (e.g., MONTHLY) #### Response Example ```json { "recommendedBudgets": [ { "budget": { "amount": { "currencyCode": "EUR", "scale": 0, "unscaledValue": 500 }, "filter": { "categories": [ { "code": "expenses:food.groceries" } ] }, "name": "Groceries", "recurringPeriodicity": { "periodUnit": "MONTHLY" } } } ] } ``` ``` -------------------------------- ### Initialize Tink Link SDK Configuration Source: https://docs.tink.com/resources/account-check/setup-and-integrate-account-check Configure Tink Link SDK with client credentials and base domain settings for proper authentication flow initialization across platforms. ```swift import TinkLink let configuration = Configuration(clientID: <#String#>, redirectURI: <#String#>, baseDomain: <#BaseDomain#>) ``` -------------------------------- ### Launch Tink Account Check Flow (Kotlin) Source: https://docs.tink.com/resources/account-check/setup-and-integrate-account-check Launches the Tink SDK's Account Check product flow with the provided configuration and request. It supports two launch modes: FullScreen and Modal, and includes callbacks for success and error handling. ```kotlin Tink.AccountCheck.createReport( activity, configuration, request, FullScreen(...), { // Callback for handling success case }, { // Callback for handling error case } ) ``` -------------------------------- ### GET /api/v1/savings-goals/categories Source: https://docs.tink.com/resources/money-manager/money-manager-api/create-savings-goal Retrieves the list of available savings goal categories. Use a user access token with the `savings-goals:read` scope. ```APIDOC ## GET /api/v1/savings-goals/categories\n\n### Description\nRetrieves a list of available savings goal categories.\n\n### Method\nGET\n\n### Endpoint\n`https://api.tink.com/api/v1/savings-goals/categories`\n\n### Parameters\n#### Query Parameters\n_None_\n\n### Request Example\n```bash\ncurl -X GET 'https://api.tink.com/api/v1/savings-goals/categories' \\\n-H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}'\n```\### Response\n#### Success Response (200)\n- **categories** (array of strings) - List of category identifiers.\n\n#### Response Example\n```json\n{\n "categories": [\n "trip",\n "wedding"\n ]\n}\n``` ``` -------------------------------- ### Launch Tink Link SDK with Kotlin: Create request for one-time access Source: https://docs.tink.com/resources/transactions/setup-and-integrate-transactions Build the request object for the specific product flow; in this example we create a ConnectAccountsForOneTimeAccess request. Inputs: none. Outputs: request object used for launching. ```kotlin val request = ConnectAccountsForOneTimeAccess() ``` -------------------------------- ### GET /api/v1/categories Source: https://docs.tink.com/resources/money-manager/money-manager-api/recategorise-transactions Fetches a list of all available categories with their IDs. Use this endpoint to find the category ID you want to assign to transactions. This endpoint can be called without authentication. ```APIDOC ## GET /api/v1/categories ### Description Fetches a list of all available categories with their IDs. Use this endpoint to find the category ID you want to assign to transactions. ### Method GET ### Endpoint https://api.tink.com/api/v1/categories ### Query Parameters - **locale** (string) - Optional - Locale for category names (e.g., en_US) ### Response #### Success Response (200) - **code** (string) - Category code - **id** (string) - Unique identifier for the category - **primaryName** (string) - Primary category name - **secondaryName** (string) - Secondary category name - **type** (string) - Category type (e.g., EXPENSES) #### Response Example [ { "code": "expenses:food.restaurants", "defaultChild": false, "id": "7e88d58188ee49749adca59e152324b6", "parent": "067fa4c769774ae980435c76be328c0b", "primaryName": "Food & Drinks", "searchTerms": "food,lunch,snacks", "secondaryName": "Restaurants", "sortOrder": 45, "type": "EXPENSES", "typeName": "Expenses" } ] ``` -------------------------------- ### Subscription Data JSON Response Source: https://docs.tink.com/resources/money-manager/money-manager-api/get-subscriptions This is an example JSON response structure for the 'Fetch Subscriptions' API call. It details individual subscriptions, including IDs, costs, and associated brand information. ```json { "subscriptions": [ { "subscriptionId": "3bc213c6-743d-4b3b-9fb9-0a43f63e162c", "accountId": "3bc213c6-743d-4b3b-9fb9-0a43f63e162b", "categoryId": "075fab3ec31f43aa9d39675475c1fb1a", "description": "Gym Membership", "startDate": "2020-07-05", "brand": { "contact": { "website": "string" }, "id": "02820044-69f5-4170-a516-fbeae6450f7a", "logoUrl": "https://....", "name": "Gym" }, "subscriptionCost": { "currencyCode": "EUR", "scale": 1, "unscaledValue": 100 }, "totalSubscriptionSpend": { "currencyCode": "EUR", "scale": 1, "unscaledValue": 300 } }, { "subscriptionId": "3bc213c6-743d-4b3b-9fb9-0a43f63e162b", "accountId": "3bc213c6-743d-4b3b-9fb9-0a43f63e2b2c", "categoryId": "075fab3ec31f43aa9d39675475c1fb1a", "description": "Streaming Service", "startDate": "2020-07-05", "brand": { "contact": { "website": "string" }, "id": "02820044-69f5-4170-a516-fbeae6450f7a", "logoUrl": "https://....", "name": "Streaming Service" }, "subscriptionCost": { "currencyCode": "EUR", "scale": 1, "unscaledValue": 50 }, "totalSubscriptionSpend": { "currencyCode": "EUR", "scale": 1, "unscaledValue": 200 } } ], "nextPageToken": "" } ``` -------------------------------- ### First-time certificate installation (Bash) Source: https://docs.tink.com/resources/open-banking/install-certificates Command to upload initial QWAC/QSealC certificates to Tink's production environment. Requires client credentials, certificate files, and regulatory zone (EU/UK). ```bash python tink_secret_utils.py certificates encrypt-and-upload \ --certificate {YOUR_CHAIN_DOT_PEM_FILE} \ --private-key {YOUR_CLIENT_DOT_KEY_FILE} \ --certificate-type {QWAC_OR_QSEALC} \ --regulatory-zone {EU_OR_UK} \ api-gateway --cluster oxford --environment production \ oauth2 --client-id {YOUR_CLIENT_ID} \ --client-secret {YOUR_CLIENT_SECRET} ``` -------------------------------- ### Example JSON response for cost of living transactions Source: https://docs.tink.com/resources/money-manager/money-manager-api/get-cost-of-living-transactions This JSON structure shows a sample response from the cost of living transactions API. It includes transaction details such as amount, currency code, date, and a next page token for pagination. ```json { "nextPageToken": "MQ==", "costOfLivingId": "d9f134ee2eb44846a4e02990ecc8d32e", "transactions": [ { "amount": { "currencyCode": "GBP", "value": { "scale": "2", "unscaledValue": "2000" } }, "date": "2024-07-10", "id": "d9f134ee2eb44846a4e02990ecc8d32e" } ] } ``` -------------------------------- ### Example Update Consent URL Source: https://docs.tink.com/resources/loans/loans-sdk-reference Demonstrates a complete URL for initiating the Tink Link SDK's consent update flow. It includes required parameters such as 'client_id', 'products', 'credentials_id', 'redirect_uri', and 'authorization_code', along with optional parameters. ```bash https://link.tink.com/1.0/products/update-consent?client_id={YOUR_CLIENT_ID}&products=LOANS,TRANSACTIONS&credentials_id=6915ab99857fec1e6f2f6c078&redirect_uri=http://localhost:3000/callback&authorization_code=d473ea2bea8f484c9d7889b0a ``` -------------------------------- ### Example Tink Link Response Source: https://docs.tink.com/resources/income-check/setup-and-integrate-income-check Shows an example of a response from the Tink Link SDK after a successful income check, including the income check ID as a query parameter in the redirect URI. ```url {YOUR_REDIRECT_URI}?income_check_id=ff8ae53bc46e45fe9a37c4fd1353e60d ``` -------------------------------- ### Install Tink Link iOS SDK via CocoaPods Source: https://docs.tink.com/resources/business-transactions/setup-and-integrate-business-transactions Adds the TinkLink pod to your iOS project's Podfile for dependency management. Requires iOS 13.0+, Xcode 14.1+, and Swift 5.7 or later. ```Ruby pod "TinkLink" ``` -------------------------------- ### Webhook Setup Response - JSON Source: https://docs.tink.com/resources/payments/one-time-payments/one-time-payments-notifications-and-webhooks Example JSON response from creating a webhook endpoint. It returns details like ID, creation timestamp, secret for signature validation, and enabled events. The secret must be stored securely for verifying incoming webhooks. ```json { "createdAt": "2022-05-26T07:54:41.725408Z", "description": "My webhook", "disabled": false, "enabledEvents": [ "payment:updated" ], "id": "d8f37f7d19c240abb4ef5d5dbebae4ef", "secret": "string", "updatedAt": "2022-05-26T07:54:41.725408Z", "url": "https://endpoint.example.com/webhook" } ``` -------------------------------- ### Retrieve Enrollment Information Command Source: https://docs.tink.com/resources/open-banking/use-dynamic-enrollment-to-register-for-open-banking-apis This Bash command invokes the Python utility to fetch enrollment schema or guide from a specified provider. It requires Python environment, tink_secret_utils.py script, provider name, cluster details, environment, and OAuth2 credentials as inputs. Outputs a JSON response with schema or enrollment guide. Limited to supported ASPSPs and requires valid credentials to avoid errors. ```bash #Get schema of enrollment parameters python tink_secret_utils.py enrollment get-enrollment-information \ --provider-name uk-natwest-oauth2 \ api-gateway --cluster oxford --environment production \ oauth2 --client-id {YOUR_CLIENT_ID} --client-secret {YOUR_CLIENT_SECRET} ``` -------------------------------- ### Fetch Insights - Bash Source: https://docs.tink.com/resources/money-manager/money-manager-api/present-your-first-actionable-insight This example demonstrates how to fetch a user's insights using the `curl` command-line tool and the Tink API. It requires a user access token with the `insights:read` scope and utilizes the List insights endpoint. The response contains a list of active insights for the user. ```bash curl -X GET 'https://api.tink.com/api/v1/insights' \ -H 'Authorization: Bearer {YOUR_CLIENT_ACCESS_TOKEN}' ``` -------------------------------- ### GET /data/v2/loan-accounts Source: https://docs.tink.com/resources/loans/loans-continuous-access-to-a-bank-account Fetches a list of loan accounts associated with a specific user. Requires a user access token with the loan-accounts:readonly scope. The endpoint returns detailed information about each loan account, including balances, installments, and parties involved. ```APIDOC ## GET /data/v2/loan-accounts ### Description Retrieves a list of loan accounts for the authenticated user. The request must include a user access token with the necessary scope to access loan account data. ### Method GET ### Endpoint https://api.tink.com/data/v2/loan-accounts ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```bash curl "https://api.tink.com/data/v2/loan-accounts" \ -H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}' ``` ### Response #### Success Response (200) - **loanAccounts** (array) - List of loan account objects - Each object contains fields like accountName, amountPaid, balances, collateral, dates, financialInstitutionId, guarantor, id, identifiers, loanParts, loanType, parties #### Response Example ```json { "loanAccounts": [ { "accountName": "My loan", "amountPaid": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } }, "balances": { "initial": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } }, "principal": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } } }, "collateral": { "collateral": "123 Main Street, New York" }, "dates": { "lastRefreshed": "string" }, "financialInstitutionId": "1ff0f75b01f94fcd9c0760ebea7443e2", "guarantor": { "name": "Jane Doe" }, "id": "efad4be863db4d6f9388a6adc148ac5c", "identifiers": { "accountNumber": "12345678-1234" }, "loanParts": [ { "amountPaid": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } }, "balances": { "initial": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } }, "principal": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } } }, "dates": { "nextPaymentDate": "2021-02-28", "originationDate": "2019-08-15", "payoffExpectedDate": "2029-01-29", "previousPaymentDate": "2021-01-29" }, "installment": { "amount": { "currencyCode": "EUR", "value": { "scale": 2, "unscaledValue": 1050 } }, "period": "MONTHLY" }, "interestRate": { "margin": 5, "monthsBound": 5, "referenceIndex": "Euribor", "revisionDate": "2021-06-01", "value": 0, "variableRate": true }, "loanPartNumber": "string" } ], "loanType": "MORTGAGE", "parties": [ { "identity": { "name": "John Doe", "ssn": "19670220-1234" }, "role": "HOLDER" } ] } ] } ``` ``` -------------------------------- ### Create Tink User (Bash) Source: https://docs.tink.com/resources/data-enrichment/get-data-into-the-tink-platform-using-aggregation This example shows how to create a new Tink user using the generated client access token. It emphasizes attaching a unique external user ID and specifying the market code for transaction data. ```bash curl -v -X POST https://api.tink.com/api/v1/user/create \ -H 'Authorization: Bearer {YOUR_CLIENT_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -d ' \ {\n "external_user_id": "user_123_abc",\n "market": "GB", \n } ' ``` -------------------------------- ### Example Tink VRP URL Source: https://docs.tink.com/resources/payments/variable-recurring-payments/variable-recurring-payments-sdk-reference Demonstrates a complete example URL for initiating the VRP mandate flow, including required parameters. It highlights the structure and necessary components for building the SDK URL. ```url https://link.tink.com/1.0/pay/vrp-mandate?client_id={YOUR_CLIENT_ID}&consent_id={YOUR_CONSENT_ID}&authorization_code={YOUR_AUTHORIZATION_CODE}&redirect_uri=http://localhost:3000/callback ``` -------------------------------- ### Webhook payload structure example (JSON) Source: https://docs.tink.com/resources/account-check/webhooks-account-check-integration Provides a sample JSON payload that Tink sends to the configured webhook endpoint. It includes context metadata, detailed event content, and the event type identifier. Useful for parsing and handling incoming webhook notifications. ```json { "context": { "externalReference": "f1b3688c649946cc8ee163d1554e853e", "userId": "3db31bdcc75555c4f0b8952984a9bd4f" }, "content": { "reports": [ { "id": "32f468a81dd7490cb3ffe4a7cf763f5", "type": "ACCOUNT_VERIFICATION_REPORT", "status": "CREATED" }, { "type": "TRANSACTION_REPORT", "status": "FAILED", "error": "PRECONDITION_FAILED" } ] },n "event" : "reports-generation:completed" } ``` -------------------------------- ### Launch Tink Risk Insights Flow Source: https://docs.tink.com/resources/risk-insights/setup-and-integrate-risk-insights Creates and presents Tink Risk Insights view controller with market configuration. Handles completion callback with success/failure results. The view controller must be manually dismissed by the developer. Market parameter expects a valid market code string. Returns result containing response data or error information. ```swift let viewController = Tink.RiskInsights.createReport(configuration: configuration, market: Market(<#String#>)) { result in // Handle result } present(viewController, animated: true) ``` ```swift switch result { case .success(let response): // Handle success case case .failure(let error): // Handle error case } ``` ```swift let viewController = Tink.RiskInsights.createReport(configuration: configuration, market: Market(<#String#>)) { [weak self] result in // Handle result self?.dismiss(animated: true) } ``` -------------------------------- ### Fetch Budget Details with cURL Source: https://docs.tink.com/resources/money-manager/money-manager-api/progress-of-budget This snippet shows how to make a GET request to the Tink API to fetch budget details. Requires a budget ID, start and end timestamps in milliseconds, and a user access token with the `budgets:read` scope. ```bash curl -X GET 'https://api.tink.com/api/v1/budgets/{YOURBUDGETID}/details?start=1549976786000&end=1552395986000' \ -H 'Authorization: Bearer {YOUR_USER_ACCESS_TOKEN}' ``` -------------------------------- ### Launch IncomeCheck Report (Kotlin) Source: https://docs.tink.com/resources/income-check/setup-and-integrate-income-check This code snippet demonstrates launching the IncomeCheck product flow by passing the configuration object, the request object, and a launch mode. Success and error callbacks are included for handling the outcomes of the flow. ```kotlin Tink.IncomeCheck.createReport( activity, configuration, request, FullScreen(...), { success -> // Callback for handling success case }, { error -> // Callback for handling error case } ) ``` -------------------------------- ### Handle Risk Insights SDK redirect response Source: https://docs.tink.com/resources/risk-insights/setup-and-integrate-risk-insights Example of the redirect URI response after successful Risk Insights report generation. Contains risk_insights_id parameter that can be used to retrieve the report data. This response is appended as query parameters to the redirect_uri. ```url {YOUR_REDIRECT_URI}?risk_insights_id=ff8ae53bc46e45fe9a37c4fd1353e60d ``` -------------------------------- ### GET /1.0/account-check/create-report Source: https://docs.tink.com/resources/account-check/account-check-sdk-reference This endpoint initializes the Account Check SDK flow by generating a URL that redirects users to start their authentication and report creation journey. It supports various parameters for customization such as client ID, redirect URI, market, and locale. Upon completion, users are redirected back with success parameters appended to the redirect URI. ```APIDOC ## GET https://link.tink.com/1.0/account-check/create-report ### Description This endpoint is used to initiate the Account Check SDK by constructing a URL with optional and required parameters. It directs users to the Tink Link interface for authenticating with their financial provider and generating an account verification report. After completion, the user is redirected to the specified `redirect_uri` with response parameters. ### Method GET ### Endpoint https://link.tink.com/1.0/account-check/create-report ### Parameters #### Path Parameters None #### Query Parameters - **client_id** (string) - Required - Your client ID (retrieved from Console). - **redirect_uri** (string) - Required - The page the end-user is redirected to after completing the flow together with the response parameters (configured in Console). - **app_uri** (string) - Optional - The deep link for an Android or iOS hosting app. - **auto_redirect_mobile** (boolean) - Optional, but recommended for mobile integrations - Use for Android or iOS integrations. When TRUE, this will directly open the bank app during the authentication step if installed on the user's device or otherwise fall back to a web-based authentication flow in the system's default browser. - **external_reference** (string) - Optional - The external reference identifier to be included in the report. Allowed characters: uppercase or lowercase formatting, letters, numbers, and the dash character. Maximum length: 50 characters. - **input_provider** (string) - Optional - The unique name of the provider (ex: sbab-bankid). If provided, user can skip provider selection. - **input_username** (string) - Optional - Prefills the username field for supported providers. - **locale** (string) - Optional (default: en_US) - The locale used for UI text. - **market** (string) - Optional (default: SE) - The market code for the country Tink should list providers for. - **refreshable_items** (string) - Optional - Account types, separated by comma. Options: IDENTITY_DATA, CHECKING_ACCOUNTS, SAVING_ACCOUNTS. - **session_id** (string) - Optional - Used to securely configure Tink Link, prefill data or apply merchant customization. - **state** (string) - Optional, but recommended - Helps defend against CSRF attacks. A randomized value that Tink returns in the callback. - **theme** (string) - Optional - Specifying LIGHT or DARK overrides the user’s system preference. #### Request Body None ### Request Example https://link.tink.com/1.0/account-check/create-report?client_id={YOUR_CLIENT_ID}&redirect_uri=http://localhost:3000/callback&market=GB ### Response #### Success Response (Redirect) Upon successful completion, the user is redirected to the provided `redirect_uri` with appended parameters. - **account_verification_report_id** (string) - Always - Identifier that can be used to retrieve the generated account verification report. - **state** (string) - If provided in the request - The state value that was provided in the URL when starting the journey. #### Response Example http://localhost:3000/callback?account_verification_report_id=6915ab99857fec1e6f2f6c078 ``` -------------------------------- ### Construct Expense Check SDK URL for Web Source: https://docs.tink.com/resources/expense-check/setup-and-integrate-expense-check Example URL for launching the Tink Link SDK flow for Expense Check reports. Requires replacing {YOUR_CLIENT_ID} with actual client ID from Console. Redirects user to bank selection and authentication flow. ```url https://link.tink.com/1.0/expense-check/create-report?client_id={YOUR_CLIENT_ID}&redirect_uri=https://console.tink.com/callback&market=GB ``` -------------------------------- ### Example Expense Check Response URL Source: https://docs.tink.com/resources/expense-check/setup-and-integrate-expense-check Example of successful response URL after user completes Expense Check flow. Contains expense_check_id parameter that can be used to retrieve the report. ```url {YOUR_REDIRECT_URI}?expense_check_id=ff8ae53bc46e45fe9a37c4fd1353e60d ```