Service Catalog

Services in src/app/core/pyb/services/ are root-provided (@Injectable({ providedIn: 'root' })) unless noted. Feature-scoped services are provided by their own module.

Identity and permissions

PermissionsService

Calculates the full PermissionsEnum[] from the User. The single source of feature gating. Permissions System

UserService

Reactive access to the current user. Subscribes once in its constructor, caches user, userId, and decodes the JWT for login_key and tfa_verified. Exposes getCurrentUser(), getCurrentUserId(), getUserLoginKey(), isTFAConfirmed(), isAprUserContract() and user$.

PersistentStateManager

localStorage read/write/clear behind the persistent meta-reducer. State Persistence

UserService reads the JWT with jwtDecode (utils/jwt-decode.ts) to extract tfa_verified — the 2FA challenge state lives in the token, not in the store.

Contracts and products

DocusignVerificationService

All six DocuSign flows, redirect construction and the replay guard. DocuSign Contract Flows

InstantTransferService

Instant Transfer setup via TabaPay, fee calculation, error mapping. Instant Transfer

AirwallexCardService

Airwallex and unified card HTTP surface. Marqeta & Airwallex

AdvanceLineActivationService

Advance Line activation helpers (advance-line-activation/).

AdvanceLineTooltipTextService

Contextual tooltip copy for the Advance Line widget.

ContractsOverviewTextService

Descriptive copy for the contracts overview report.

FeesScheduleHelperService

Reads the fees slice; getInstantTransferFees(), crateInstantTransferFeesData(), hasFreeAccessPaymentFee().

SupplierTransferPermissionsService

Transfer-permission checks (supplier-transfer-permissions/).

PunchCardService

Reward/progress punch-card logic (punch-card/).

Session-wide orchestration

GlobalSubscriptionsService

The single place session-scoped background behaviour is started. Idempotent via an initialized flag. Architecture Overview

CancellationBannerInitializerService

Builds the pending/reached cancellation banners from marketplace opt-out dates. Cancellation & Reactivation

SuspensionReasonInitializerService

Resolves the suspension reason to copy and opens the remediation modal. Suspension

TwoFactorSetupBannerInitializerService

Shows the 2FA enrolment banner when the supplier has not enrolled.

InternalMessagesService

RxJS message bus for cross-component communication; also owns the account-cancelled banner.

UI services

BannerService

Persistent banners. showBanner(), deleteBanner(), getBanners(), getDeleteBanners().

BreakpointService

Reactive responsive breakpoints, backed by BreakpointsEnum.

DashboardPageHelperService

Detects a supplier on the wrong environment host and rebuilds the URL to redirect them, optionally with a session token.

ExportService

Opens the export progress dialog and the export form dialog. Reports

NavigationService

Named navigation helpers wrapping Router.

RouteUrlHelperService

Typed URL construction and prevUrl tracking (used by TwoFactorAuthenticationGuard).

HyperlinkService

Turns plain text into safe HTML links. addHyperlink(), hyperlinkEmails(), and phone linking with PhonePattern formats. Default CSS class injected via HYPER_LINK_CONFIG_TOKEN.

SupportHelperService

Resolves contextual help articles from help-articles.const.ts.

FeedbackService

Opens SwitchCdDialogComponent (checking/deposit switch), with an optional revert flag.

ClientProviderService

White-label / theme resolution (service-provider/). Run as an APP_INITIALIZER.

BannerService.showBanner is delayed by one second
showBanner(banner: Banner) {
    setTimeout(() => this.bannerSubject.next(banner), 1000);
}

The delay lets the shell finish rendering before a banner appears. It also means a banner shown and immediately deleted may still appear, since the delete is not queued.

Analytics

EventLoggerService

The Segment wrapper. identify() and track(). Event Logger

MarketplaceEventsService

Emits MarketplaceEventType events.

AmazonEventTrackerService

Amazon Seller Central connection events.

CloudWatchService

putMetricData() (in vendors/cloud-watch/). Observability

Identity verification

EntrustIdentityService

Creates an Entrust verification session.

EntrustIdentityLauncherService

Orchestrates the session, modal and tracking. Entrust Identity

Infrastructure

LocalStorageService

Typed localStorage wrapper with serialization.

OAuthTokenService

Holds the Plaid OAuth return URL and link token. Plaid

ServiceWorkerService

PWA update detection and reload prompt.

FormHelpersService

Reactive-form helpers — mark-all-touched, reset, common FormGroup builders.

FileHelperService

File reading as base64, type and size validation.

HttpErrorHandlerInterceptor

Error toasts and special-case handling (http-error-handler/). HTTP Interceptors

BlogService

CMS blog access (blog/).

Widget services

core/pyb/services/widgets/

product-summary/product-summary.service.ts

Product summary data for the dashboard panel.

product-summary/product-summary-grid.service.ts

Grid configuration for that panel.

instant-access/

Instant Access widget logic.

seller-card/

Seller Card widget logic.

MessageModalService (@pyb-modals/message-modal)

openMessageModal(), openSuccessModal() — the standard result dialogs used across every flow.

TwoFactorAuthenticationModalService

Opens the SMS challenge dialog.

BankVerificationInfoModalService

Plaid bank-verification explainer; check(plaidConfig).

CancellationSurveyShowWhenDeactivatingAccountService

Shows the survey during deactivation.

services/modals/cancellation-survey/

Cancellation survey modal services.

Feature-scoped services

Provided by their own module rather than root.

ReportsService

Reports shell state (ReportsModule).

SupplierKeyProviderService

Supplies the supplier key to report data services.

ManageAccountService

Manage Account tab state (ManageAccountModule).

ProductOfferingsService

Cross-sell availability and offer configuration.

SendMoneyPageService

Vendor Pay send-money submission.

PartnersService

Partner catalog and filtering.

ReferralService

Builds the personalised referral link.

UploadIdService

ID document upload.

CancellationWorkflowService

Deactivation and reactivation (root-provided but feature-specific).

TopBarService

Onboarding pre-activation status bar (root-provided).

VendorpayReportsService / VendorpayReportsMappingService

Vendor Pay report data and mapping (one pair per report).

AirwallexCardBlockService / …UnblockService / …ViewService

Airwallex card operations.

SellerCardBlockService / …UnblockService / …ViewService / SellerCardActivateService

Marqeta card operations.

Flows

core/pyb/flows/ — see Flows & Tasks Engine.

AdvanceLineWithdrawFlow

Draw funds.

AdvanceLineAcceptOfferFlow

Accept an offer.

AdvanceLinePendingActivationFlow

Expedited first draw.

AdvanceLineLegacyActivationFlow

Legacy product activation.

LtcFlowService

New Long Term Contract.

LtcRenewalFlowService

LTC renewal, with a change-contract fallback.

ReSignContractFlow

Re-sign an updated agreement.