Checking access…

Skip to main content
Audience: CCG Platform Engineers

Payment Service Dependencies

Platform engineers assessing blast radius before a change, or on-call engineers tracing a failure to its upstream or downstream dependency and its resilience strategy. For the OAuth2 scopes referenced here, see Security & Compliance.

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-service β†’ wallet-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:

ScopeDescription
financial/commerce/checkout:merchantProduction merchant scope β€” /v2/payments, /v2/refunds, and /v2/sessions
financial/commerce/nonprodcheckout:merchantSame as above, non-production (staging/dev)
financial/commerce/checkout:userWidget scope β€” see User-Scoped Requests for the full operation list and required headers
financial/commerce/nonprodcheckout:userSame as above, non-production
financial/commerce/checkout:merchant-pciPOST /v2/token/payments β€” token-based payments (restricted scope)
financial/commerce/nonprodcheckout:merchant-pciSame as above, non-production

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)