Customer Migration β Engineering Internals
This guide was generated from the wallet-migration-service repository. Engineering has not reviewed or approved the described flow, operational steps, or environment behavior. Confirm the details with the migration engineering team before using or referring to this guide for a migration or incident.
This page explains the file-based customer and payment-method migration pipeline implemented by wallet-migration-service (Maven artifact migration-service). It is for CCG platform engineers. The merchant migration guide covers what a merchant submits; the run-and-monitor guide, reference, and troubleshooting guide cover internal work.
Source snapshot: wallet-migration-service main at f63cfa3c, inspected 2026-11-26. Recheck the deployed revision before relying on a detail here.
What the service ownsβ
The service reads a migration file from Azure Blob Storage, creates staging records, calls the Customer service to create or resolve customers, and follows one of two payment-method paths. It stores progress in MERCHANT_MIGRATION_STATUS and exposes a status lookup. The code also provides separate jobs for merchant extracts and archive. It does not expose one endpoint that executes the whole file migration from beginning to end.
The MigrationController exposes a start endpoint for each major job. Most starts schedule work on a bounded-elastic thread and return 202 Accepted immediately. That response means the request was accepted for processing; it does not prove that the job or its records succeeded. The caller must check the persisted status and record counts before the next stage.
The diagram shows source-backed dependencies, not a confirmed production orchestrator. Merchant and error extracts are separate jobs; the code permits merchant extract generation at STRIPE_EXTRACT_COMPLETED or COMPLETED, so their approved timing is not represented as a fixed final step. The repository does not identify which external component receives the ECG QuickConnect/SFTP file, starts each job, processes the Stripe extract, or sends merchant notifications. Those handoffs require migration engineering review.
Shared stagesβ
- Stage records. The staging endpoint chooses the card or bank-account import task from the
X-Migration-Typeheader. Each task downloads the input file, checks prior migration state, creates a migration-status record, writes staging rows, updates counts/status, and archives the input file. Rows may be skipped or fail independently; inspect counts as well as the top-level status. - Create customers. The customer-creation job selects a card or bank-account step from the saved migration type. Its validation normally requires
STAGING_COMPLETEDorCUSTOMER_CREATION_INITIATED. Aforce-rerunflag bypasses that check in code; it is not an approved recovery instruction. - Take the type-specific path. Card processing generates a Stripe extract and later reconciles a returned response file. Bank-account processing sets up payment methods and reconciles staging records. The code requires the preceding completed status before these jobs proceed.
- Inspect and report. Status lookup returns the migration type, status, row counts, and file locations. Merchant and error extract generation are separate endpoints; their exact operational timing and delivery owner need engineering confirmation.
Other capabilities in this repositoryβ
The service also has Event Grid consumers for vendor/customer and payment-method events, EIMP/Kafka consumption, transfer-payment-method handlers, event replay, and archive jobs. Their existence does not mean they are stages of this file migration. Keep their operational contracts separate until engineering confirms how they interact.
Related pagesβ
- Run and monitor a customer migration β ordered internal procedure with review gates
- Migration service reference β endpoints, statuses, fields, and source map
- Troubleshoot a migration run β symptom-led checks
- Migration Extracts β merchant-facing interpretation of output files