Skip to main content
Version: v2

Dependency Map

Overview

This document catalogues every upstream and downstream dependency of the wallet-payment-service, including external vendors, internal shared libraries, and infrastructure services.


Dependency Diagram


Dependency Catalog

External Dependencies

DependencyPurposeProtocolFailure ImpactResilience
Stripe APIPayment processing (PaymentIntent, charges, refunds)HTTPS RESTPayments fail; no fallback vendorCircuit breaker, timeout, retry
Stripe WebhooksInbound event notifications from StripeHTTPS POST (inbound)Delayed state updatesStripe automatic retry

Internal Dependencies

DependencyPurposeProtocolFailure ImpactResilience
CCG API GatewayRequest routing, OAuth2 enforcementHTTPSService unreachableGateway HA / load balancing
PostgreSQLPayment state persistenceTCP/SQLAll operations failConnection pooling, read replicas
OAuth2 Token ServiceToken validation at gatewayHTTPSAuth failuresToken caching at gateway
Secret VaultStripe API keys, DB credentialsHTTPS / sidecarService cannot startLocal cache with TTL
Merchant Service (Webhook Delivery)Async event dispatch to merchants via wallet-merchant-servicewallet-merchant-webhook-proxyHTTPS POST (outbound via Event Grid)Merchant not notifiedRetry queue with exponential backoff

API Scopes

The gateway enforces the following OAuth2 scopes before routing to the service:

ScopeEndpointsDescription
financial/commerce/checkout:merchantAll /v2/payments, /v2/refunds, /v2/sessionsProduction merchant scope
financial/commerce/nonprodcheckout:merchantSame as aboveNon-production (staging/dev)
financial/commerce/checkout:userPOST /v2/payments (widget-initiated), GET /v2/paymentsWidget/user scope
financial/commerce/nonprodcheckout:userSame as aboveNon-production user scope
financial/commerce/checkout:merchant-pciPOST /v2/token/paymentsToken-based payments (restricted scope)
financial/commerce/nonprodcheckout:merchant-pciSame as aboveNon-production token scope

Environment Routing

The X-Upstream-Env header controls environment targeting in non-production:

Header ValueTarget Environment
devDevelopment
stageStaging
testTest / QA
(not set)Production (header not required)