feat: Tink open banking demo — 6-step API walkthrough

Demonstrates the full Tink integration flow for open banking:
  Step 1 — Client credentials auth (app token)
  Step 2 — Create Tink user with external_user_id
  Step 3 — Connect bank via Tink Link OAuth redirect
  Step 4 — List accounts (v2 endpoint)
  Step 5 — List transactions (v2 endpoint, cursor pagination)
  Step 6 — Webhooks (register endpoint, receive events)

Built with Python / FastAPI + Jinja2 templates.
Each step shows live JSON responses, cURL examples and API version badges.
Includes server-side token store (prevents session cookie overflow),
asyncio lock on OAuth callback, and demo mode with realistic mock data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henrik Jess Nielsen
2026-05-23 02:08:27 +02:00
commit ab591be464
23 changed files with 2477 additions and 0 deletions

18
.env.example Normal file
View File

@@ -0,0 +1,18 @@
# Tink API credentials — get these from https://console.tink.com
TINK_CLIENT_ID=your_client_id_here
TINK_CLIENT_SECRET=your_client_secret_here
# Must match what you configure in Tink Console under Redirect URIs
# Local dev: http://localhost:8000/callback
# Production: https://tink-demo.i80.dk/callback
TINK_REDIRECT_URI=http://localhost:8000/callback
# Base URL for this app (used in webhook registration etc.)
APP_BASE_URL=http://localhost:8000
# Secret for signing session cookies (generate with: python -c "import secrets; print(secrets.token_hex(32))")
SESSION_SECRET=change_me_to_a_random_secret
# Tink API base URL (sandbox = production, use test credentials from Tink Console)
TINK_API_BASE=https://api.tink.com
TINK_LINK_BASE=https://link.tink.com