Checking access…

Skip to main content
Version: v2

CCG Microservices Overview

Document Status β€” Draft

Status: Draft β€” April 21, 2026 | Audience: Engineers and TPMs

Reviewer: ranga_chenna@optum.com

⚠️ This document is a work in progress and must be kept up to date as services evolve. Engineers making changes to service contracts, flows, or configurations are expected to reflect those changes here before merging.

Several services are marked "yet to be documented."


1. System Overview​

The Convenient Checkout Gateway (CCG) is a payment gateway that enables merchants to integrate a hosted checkout UI or API-first payment flows into their platforms. It supports one-time payments, saved payment methods (pay-and-save), split-tender transactions, refunds, and reporting.

Architectural Style​

CCG uses a hybrid architecture combining three integration patterns:

PatternUsed For
Synchronous RESTReal-time payment, session, and customer operations
Event-drivenMerchant configuration propagation and outbound webhook notifications
File-based ingestioncustomer and Payment method migration from other payment gateways

Key Integration Patterns​

  • Merchants integrate via a widget (UI) initialized through wallet-auth-service, or directly via the API.
  • Payment orchestration is owned by wallet-payment-service, which delegates processor-level operations to wallet-stripe-adapter-service.
  • Merchant configuration changes and payment events are propagated outbound as webhooks via wallet-merchant-service.

2. Service Catalog​

warning

⚠️ This is the source of truth for service responsibilities. Update this when adding or modifying services.

CCG is composed of seven documented microservices. Each service owns a distinct domain and communicates with others through well-defined interfaces.

note

Additional services exist but are not yet documented.

Services at a Glance​

ServicePrimary Role
wallet-auth-serviceSession and authorization entry point for UI integrations
wallet-merchant-serviceMerchant configuration and webhook dispatch
wallet-customer-serviceCustomer identity, wallets, and payment method lifecycle
wallet-payment-servicePayment orchestration and transaction state management
wallet-stripe-adapter-serviceStripe integration and model translation layer
wallet-reporting-serviceMerchant reporting and payout views
wallet-migration-serviceBulk migration of card/ACH payment instruments

Service Details (Collapsible)​

wallet-auth-service - Session and authorization entry point
AttributeDetails
PurposeEntry point for merchant UI integration; manages sessions and authorization
Key ResponsibilitiesSession creation/retrieval, widget initialization, scope-level authorization
Upstream callersMerchants (widget consumers), external API clients
Downstream dependencieswallet-merchant-service (merchant config validation); possibly wallet-customer-service (session context resolution) - not confirmed
Data OwnershipSessions, scopes/permissions
wallet-merchant-service - Merchant config and webhook notifications
AttributeDetails
PurposeOwns all merchant configuration and settings; drives outbound notifications
Key ResponsibilitiesMerchant config storage, publishing config/settings change events, dispatching webhooks for payments and payment-method events
Upstream callersInternal services consuming merchant config, admin tooling
Downstream dependenciesNot documented
Data OwnershipMerchant profiles, webhook subscriptions, merchant settings
wallet-customer-service - Customer identity and wallet lifecycle
AttributeDetails
PurposeOwns customer identity and the payment method/wallet lifecycle
Key ResponsibilitiesCustomer identification, wallet resolution, payment method search/retrieval/update/deletion, set-up payment method flows
Upstream callerswallet-payment-service, merchant API clients
Downstream dependencieswallet-stripe-adapter-service (Stripe-side customer/wallet sync) - not confirmed
Data OwnershipCustomer records, wallets, payment methods
wallet-payment-service - Payment orchestration engine
AttributeDetails
PurposeOrchestrates all payment transactions
Key ResponsibilitiesPayment initiation, capture, refund submission, split-tender support, one-time pay, pay-and-save, token-based payment flows
Upstream callersMerchants (API), wallet-auth-service (session-gated flows), internal clients
Downstream dependencieswallet-stripe-adapter-service, wallet-customer-service
Data OwnershipPayment records, refund records, transaction state
wallet-stripe-adapter-service - Stripe integration adapter
AttributeDetails
PurposeAdapter / anti-corruption layer between CCG and Stripe
Key ResponsibilitiesSubmits payments to Stripe, manages Stripe-side wallets and customers, translates CCG payment models to Stripe API contracts
Upstream callerswallet-payment-service; possibly wallet-customer-service
Downstream dependenciesStripe (external payment processor)
Data OwnershipStripe-mirrored state only - source of truth is upstream CCG services
wallet-reporting-service - Financial reporting surface
AttributeDetails
PurposeProvides financial reporting for merchants
Key ResponsibilitiesPayout reports, combined payout reports
Upstream callersMerchant API clients, internal tooling
Downstream dependenciesNot documented
Data OwnershipReport data, payout aggregations
wallet-migration-service - Bulk payment instrument migration
AttributeDetails
PurposeHandles bulk migration of existing payment instruments
Key ResponsibilitiesIngests Card and ACH migration files (via ECG) from merchants
Upstream callersMerchant-initiated (file-based via ECG)
Downstream dependencieswallet-customer-service (to register migrated payment methods) - not confirmed
Data OwnershipMigration job state

3. End-to-End Payment Flow​

The sections below trace the most common flows across CCG services.

For UI-based flows, session management is a shared prerequisite and is documented once in a common flow. For Direct API flows, the same business operations are available without widget session bootstrap.

FlowUI (Widget)Direct API
Session managementYesNot required
Pay with walletYesYes
One-time pay / pay-and-saveYesYes
Wallet/payment method managementYesYes
RefundNoYes

UI Session Management Flow​

Pay with Wallet Flow​


One-Time Pay and Pay-and-Save Flow​


Refund Flow​


Wallet Management Flow​


5. APIs & Communication Patterns​

This section lists the known API surface for each service and summarizes inter-service communication patterns.

Communication Patterns​

PatternUsage
Synchronous RESTPayment initiation, session management, customer/payment method operations β€” real-time request/response
Event publishingwallet-merchant-service publishes internal config/settings change events and dispatches outbound webhooks to merchants
File-based ingestionwallet-migration-service ingests Card/ACH migration files via ECG
External API callwallet-stripe-adapter-service β†’ Stripe REST API
note

The internal event/messaging infrastructure (e.g., Kafka, SQS, direct HTTP) used by wallet-merchant-service is not documented.

Key APIs per service

wallet-auth-service
MethodPathDescription
POST/sessionsCreate session; returns token for widget initialization
GET/sessionsRetrieve session state
wallet-payment-service
MethodPathDescription
POST/paymentsInitiate payment
GET/payments/{paymentId}Retrieve by payment ID
GET/payments?merchantTransactionId=Retrieve by merchant transaction ID
PATCH/capture-paymentCapture a pre-authorized payment
POST/refundSubmit refund
GET/refunds/{refundId}Retrieve refund
POST/token/paymentsToken-based payment initiation
GET/token/payments/{paymentId}Retrieve token-based payment
wallet-customer-service
MethodPathDescription
POST/find-payment-method-searchSearch for payment methods
GET/payment-methods/{paymentMethodId}Retrieve payment method
PATCH/payment-methods/{paymentMethodId}Update payment method
DELETE/payment-methods/{paymentMethodId}Remove payment method
POST/token/set-up-payment-methodTokenized payment method setup
GET/token/set-up-payment-method/{setupPaymentMethodId}Retrieve setup status
wallet-merchant-service
  • Outbound webhooks: payments event, payment-method event
  • Internal events: Merchant config/settings change publications (mechanism not documented)
wallet-reporting-service
note

Exact endpoint paths are not yet documented.

  • Payout report
  • Combined payout report
wallet-stripe-adapter-service
note

Internal service only β€” no public API surface. Called exclusively by wallet-payment-service. Internal contract and error response schema are not documented.


6. Failure Handling & Resilience​

ConcernDetailStatus
Idempotencywallet-payment-service supports idempotent payment initiation via merchantTransactionId. Retry handling is documented in Payments β€” Retry Handling.Documented
Stripe call retrywallet-stripe-adapter-service retries failed Stripe calls automatically with exponential backoff starting at 2 seconds, up to 3 attempts.Documented
Webhook retryRetry logic for failed outbound merchant webhook deliveries is documented in Webhook Error Handling & Retry Strategies.Documented
Error propagationwallet-stripe-adapter-service returns structured errors upstream to wallet-payment-service. The error code mapping between Stripe errors and CCG error responses is yet to be documented.Partially documented
Compensation / rollbackPOST /refund is the explicit compensation mechanism for completed payments. Split-tender transactions are supported via POST /payments β€” no partial failure handling applies.Documented
Session expirySessions managed by wallet-auth-service expire after 15 minutes of inactivity. Re-initialization requires a new POST /sessions call from the merchant backend.Documented