This page focuses only on API integration.
Overview
Finhost exposes a single REST surface called Client API. It includes traditional banking features (clients, companies, accounts, transfers, transactions) and optional crypto‑exchange features.- All requests are JSON over HTTPS with Bearer auth.
- Crypto endpoints are namespaced under
/crypto-exchangewithin the same base URL.
Environments & Base URLs
Your tenant uses customer‑scoped hostnames.
- Dev:
https://client-api.dev.{your-domain}.io - Prod:
https://client-api.{your-domain}.io
{your-domain} with your assigned tenant domain (e.g., acmebank). Keep these values in env vars:
Authentication (Cognito)
Finhost relies on Amazon Cognito User Pools for user authentication and token issuance.What you need
- User Pool ID and Region
- Web App Client ID (no client secret for public web/mobile apps)
- (Optional) Hosted UI domain if you use Cognito’s OAuth2/PKCE login
How it works
- Your web/mobile app authenticates the end user against Cognito:
- Hosted UI + PKCE (recommended) or a library like AWS Amplify Auth.
- Cognito returns short‑lived JWTs:
- ID token (user identity claims)
- Access token (authorization for APIs)
- Refresh token (to renew tokens silently)
- Your app calls Finhost Client API with the Access token in the header:
- On expiry, renew tokens via the refresh token (Amplify or Hosted UI session) and retry.
Register your front‑end origins in CORS. Avoid storing tokens in
localStorage; prefer memory or secure, httpOnly cookies where applicable.Example — fetch profile (JS)
Example — cURL
Canonical integration flows
A) Individual onboarding (KYC → account → bank details → payments)
- Initiate client —
POST /client - Accept contract (client) —
POST /v2/clients/contract-accept - Get KYC access token —
GET /v1/kyc/access-token(for Sumsub Web SDK) - Create account —
POST /v1/accounts - Fetch bank details —
GET /v1/ext-accounts/{extAccountId} - Initiate external transfer —
POST /v2/transfer - List transactions (cursor) —
GET /v1/transactions
B) Company onboarding (KYB)
- List companies —
GET /v2/companies - Get KYB access token —
GET /v2/companies/{companyId}/kyb-access-token - Accept contract (company) —
POST /v2/companies/contract-accept
Crypto features (under Client API)
The crypto‑exchange feature set lives under the same base URL, namespaced at/crypto-exchange.
- List orders (paginated) —
GET /crypto-exchange/orders - Get order —
GET /crypto-exchange/orders/{orderId}(eventual consistency) - Create order —
POST /crypto-exchange/orders - Create wallet (external account) —
POST /crypto-exchange/wallets - Create payout (transaction) —
POST /crypto-exchange/payouts
Pagination differs by area: core banking uses
limit/lastKey; crypto uses pageLimit/pageKey/pageSort.Status codes & patterns
- 200 OK — successful GET/POST (lists, tokens, reads)
- 201 Created — resource/operation created (transfers, accounts, orders)
- 400 / 403 / 404 — validation/auth/lookup errors
- 500 — server error
- Include
Authorization: Bearer <access_token>on every request. - Set
Content-Type: application/jsonfor bodies. - Prefer cursor pagination (
lastKeyorpageKey) over offset. - Prefer new endpoints under
/v2when available. - Avoid deprecated paths such as
/account/details/{account}.
Quick reference
| Feature | Endpoint |
|---|---|
| Get client profile | GET $CLIENT_API_BASE/client |
| Initiate client | POST $CLIENT_API_BASE/client |
| Accept contract (client) | POST $CLIENT_API_BASE/v2/clients/contract-accept |
| Get KYC token | GET $CLIENT_API_BASE/v1/kyc/access-token |
| List companies | GET $CLIENT_API_BASE/v2/companies |
| Get KYB token | GET $CLIENT_API_BASE/v2/companies/{companyId}/kyb-access-token |
| Create account | POST $CLIENT_API_BASE/v1/accounts |
| Get bank details | GET $CLIENT_API_BASE/v1/ext-accounts/{extAccountId} |
| External transfer | POST $CLIENT_API_BASE/v2/transfer |
| Internal transfer | POST $CLIENT_API_BASE/v2/transfer/internal |
| List transactions | GET $CLIENT_API_BASE/v1/transactions |
| List orders | GET $CLIENT_API_BASE/crypto-exchange/orders |
| Get order | GET $CLIENT_API_BASE/crypto-exchange/orders/{orderId} |
Next steps
- Configure Cognito (User Pool, Web Client ID, Hosted UI/PKCE) and CORS allow‑lists.
- Use Dev for integration; switch env vars to Prod at go‑live.
- Enable crypto features if required; endpoints will be available under
/crypto-exchange.