Integration landscape
The map
There is no API gateway. The application holds ~15 base URLs and each service
wrapper reads the one it needs from AppConfigService.
┌────────────────────────────────┐
│ Internal Admin │
└──┬──────┬───────┬──────┬───────┘
X-Session-Token ─────┘ │ │ │
│ │ │
┌─────────────────────────────────▼──┐ │ │
│ internalApiUrl database_v2/internal │ │
│ suppliers, marketplaces links, payment │ │
│ configs, deposit accounts, fees, │ │
│ reserves, reports, logins, perms, │ │
│ lookups, advances, UCC, pending_review,│ │
│ paymentBatches, search2/search3 │ │
└─────────────────────────────────────────┘ │
┌───────────────────────┐ ┌─────────────────────▼──────┐
│ cliApiUrl │ │ actionsToolsUrl │
│ database_v2/cli │ │ CRM activity + settings │
│ scripted/bulk ops │ │ notes, tasks, files, │
└───────────────────────┘ │ filters, global settings │
└────────────────────────────┘
┌───────────────────────┐ ┌────────────────────────────┐
│ eventLoggerUrl │ │ eventRulesOldUrl │
│ event stream, │ │ event rules v1 + │
│ es-changelog, track │ │ Elasticsearch em_events │
└───────────────────────┘ └────────────────────────────┘
┌───────────────────────┐ ┌────────────────────────────┐
│ messagingUrl │ │ authToolsApiUrl │
│ outbound email/SMS │ │ supplier tokens, SMS nums │
└───────────────────────┘ └────────────────────────────┘
┌───────────────────────┐ ┌────────────────────────────┐
│ workflowApiUrl (+GCI) │ │ automaticMarketplaceApiUrl │
│ b2btaskmanager │ │ automatic UW tool, │
│ jobs + SSE stream │ │ real-time validation │
└───────────────────────┘ └────────────────────────────┘
┌───────────────────────┐ ┌────────────────────────────┐
│ marketplaceApiUrl │ │ supWidgetsApiUrl │
│ marketplace service │ │ onboarding widgets │
└───────────────────────┘ └────────────────────────────┘
┌──────────────────────────────────────────────────────┐
│ Four document/file backends │
│ b2bDocumentsApiUrl · pybDocumentsApiUrl · │
│ documentsApiUrl · s3FilesProviderApi │
└──────────────────────────────────────────────────────┘
┌───────────────────────┐ ┌────────────────────────────┐
│ evaApiUrl (iframes, │ │ supplierUrl / │
│ postMessage, cookie) │ │ supplierReferralUrl │
└───────────────────────┘ └────────────────────────────┘
Third parties reached directly from the browser:
Google Identity (SSO) · Segment analytics.js · Google Analytics ·
TinyMCE assets (self-hosted) · Sentry DSN configured but unused in code
Payability backends
| Base URL key | Service | Primary consumers |
|---|---|---|
|
The main internal API ( |
~35 services — |
|
The CLI service ( |
|
|
Actions Tools — CRM activity storage and the global key/value settings store. |
|
|
Event logger v2 — the domain event stream, the Elasticsearch changelog
( |
|
|
Event logger v1 — event-rule CRUD ( |
|
|
Messaging — outbound email and SMS. |
|
|
Auth tools — supplier auth-token issuance and SMS number provisioning. |
|
|
B2B task manager — long-running jobs (earnings/remittance loads) plus a
server-sent-events progress stream ( |
|
|
Marketplace service — supplier-marketplace data. |
|
|
Automatic underwriting tool web API. |
|
|
Supplier widget endpoints used during onboarding. |
|
|
B2B document service. |
|
|
PYB documents service — behind the |
|
|
Documents Lambda — deposit-account documents. |
|
|
S3 file provider. |
Configured in |
|
The supplier self-service site — target for "log in as supplier". |
|
|
Referral link base. |
|
|
EVA micro-front-end origin. Not an HTTP API from this app’s perspective — it is
an iframe |
|
Endpoint-level detail is in services and endpoints; the environment values per stage are in environment configuration keys.
Authentication across integrations
| Mechanism | Where |
|---|---|
|
Added to every |
|
Only the login call ( |
|
|
|
`MonitorService’s event-logger call — a hardcoded credential. Known debt. |
|
|
|
The CRM "what is this about" key — kept in sync by a store subscription inside
|
EVA cookie |
|
Google ID token |
Exchanged for a Payability JWT via |
See authentication for the flows.
Third parties in the browser
| Provider | Integration |
|---|---|
Google Identity |
|
Segment ( |
|
Google Analytics |
|
Elasticsearch |
The |
TinyMCE |
Self-hosted: the build copies |
Sentry |
|
Plaid |
Reached indirectly — bank-transaction data arrives through the internal API’s
external-report endpoints ( |
Marqeta / Airwallex / EFS |
Card issuing. All reached through the internal API’s card-management endpoints — the app never calls the issuers directly. See cards. |
Real-time and cross-window channels
| Channel | Detail |
|---|---|
Server-sent events |
|
|
The EVA protocol: |
Browser extension |
|
VPN gating
VpnTesterService, started by AppComponent when the CHECK_VPN flag is on,
probes whether the operator is on the corporate network. It is a soft check that
warns rather than blocks; the authoritative network restriction is enforced
upstream of the application.
Adding a new integration
-
Add the base URL to
IEnvironment(src/environments/environment.interface.ts). -
Add the corresponding
exportto bothdeployment/setup_template-dev.cfganddeployment/setup_template-production.cfg. -
Add the field to the generated template in
deployment/set-env.ts. -
Regenerate your local environment (
./deployment/setenv.sh exp) — do not hand-editsrc/environments/environment.ts, it is overwritten. -
Read it in the service via
AppConfigService, neverimport { environment }. -
Document it here and in environment configuration keys.
Missing any of steps 2–3 produces the classic failure: the key is undefined in
CI/deployed builds while working locally. See
environments.