V2 Implementations — Engineering Guide
This is the entry point for the whole V2 engineering guide — start here if you're new to V2, then jump to the role table below (Who This Guide Is For) to find the right starting doc for your work.
Purpose
This overview is the starting point for engineers building, maintaining, or extending documented V2 implementations across the Convenient Checkout platform. It links to cross-service standards, the shared commons library, and the V2 domain guides available today.
Use the domain index to find the implementation guide for a specific flow and the sections below for shared patterns and architecture decisions.
Who This Guide Is For
| Role | Start Here |
|---|---|
| Backend engineer — new to V2 | V1 vs V2 — What Changed and Why → Shared Standards → Commons Library → relevant domain section |
| Backend engineer — working on payments | Payment Lifecycle States → Split-Tender Payment |
| Backend engineer — working on commons library | Commons Library — Versioning & Deployment Strategy |
| QE / test engineer | Testing Strategy + API Design Conventions + relevant domain section |
| Reviewing a PR | Coding Standards + Error Strategy + relevant domain section |
| Investigating a production issue | Troubleshooting → Observability |
Platform Ecosystem
The Convenient Checkout platform is a microservices architecture. See the Service Catalog for the full service inventory, ownership, and integration patterns.
V2 Shared Standards
These apply to all domains and all services. Every v2 implementation must comply:
| Standard | What It Governs | Key Rule |
|---|---|---|
| V1 vs V2 Guide | What changed, migration checklist, side-by-side comparisons | Read this first if coming from V1 |
| Coding Standards | Package structure, Lombok, Reactor, constants, exceptions, Javadoc | No magic strings, no .block(), no swallowed exceptions |
| API Design Conventions | URL patterns, HTTP methods, status codes, request/response envelopes | Resources as plural nouns, 202 for async, amounts in cents |
| Security & Compliance | Data protection, OAuth2 scopes, data masking, audit trails | Never log sensitive data; all state transitions audited |
| Commons Library | Shared DTOs, enums, events, versioning & deployment strategy | All cross-service contracts live in wallet-event-commons; V1 and V2 packages coexist during migration |
| Error Handling | Error taxonomy, Problem DTO, error propagation | Use ErrorGroup enum; 400/422/500 classification |
| V2 Endpoint Environment Controls | Operation readiness, routing, and @V2NotImplemented stubs | V2 is available in production; confirm each operation and merchant enablement; stubs return 501 where routed |
| Testing | Test pyramid, coverage, naming | Unit + Integration + Contract tests on every PR |
| Observability | Logging, monitoring, alerting, dashboards | Azure Application Insights + Splunk; structured JSON logs |
Domain Guides
Each domain has its own section covering domain-specific flows, data models, API contracts, and webhook events:
| Domain | Service | Status |
|---|---|---|
| Payments | wallet-payment-service | Architecture, idempotency, and flows documented |
| Customers | wallet-customer-service | Shared customer data handling and customer creation flow documented |
| Merchants | wallet-merchant-service | 🔲 Planned |
| Reporting | wallet-reporting-service | 🔲 Planned |
| Sessions | wallet-auth-service | Vendor config session contract authored; other flows planned |
| Disputes | wallet-payment-service | Shared V1/V2 processing documented |
| Notifications | wallet-notification-service | 🔲 Planned |
V2 API Inventory
| Method | Path | Domain | Operation |
|---|---|---|---|
POST | /v2/payments | Payments | Create payment (single or split-tender) |
GET | /v2/payments?merchantTransactionId={id} | Payments | Get payment by merchant ID |
GET | /v2/payments/{paymentId} | Payments | Get payment by platform ID |
PATCH | /v2/payments/{paymentId}/cancel | Payments | Cancel a payment |
PATCH | /v2/payments/{paymentId}/capture | Payments | Capture a pre-authorized payment |
POST | /v2/token/payments | Payments (Token) | Create payment with raw card token |
POST | /v2/refunds | Payments | Create a refund |
GET | /v2/refunds/{refund-id} | Payments | Get refund status |
POST | /v2/sessions | Sessions | Create checkout session |
GET | /v2/sessions/{sessionId} | Sessions | Get session details |
GET | /v2/checkout-sessions/{checkoutSessionId} | Checkout Sessions | Get checkout session status |
PATCH | /v2/checkout-sessions/{checkoutSessionId} | Checkout Sessions | Update checkout session (operation-based) |
PATCH | /v2/checkout-sessions/{checkoutSessionId}/cancel | Checkout Sessions | Cancel checkout session |
POST | /v2/checkout-sessions/{checkoutSessionId}/child-sessions | Checkout Sessions | Create child session |
Current State vs. Target State
For current-versus-target tracking per area (commons coexistence, error model, test coverage, observability, and more), along with migration paths and priorities, see the Improvement Roadmap.
How This Guide Is Organized
The Engineering Guide groups V1 and V2 pages by domain. Start with Engineering Standards & Practices for V2 standards, the commons library, and testing guidance, then open the domain index to find the V2 flow you are working on. Operate and troubleshoot and the improvement roadmap cover investigation and planned changes.
Related Documentation
| Resource | Link |
|---|---|
| Payment API Reference (OpenAPI) | API Reference V2 |
| Webhook Reference | Webhooks V2 |
| Payment Error Codes | Error Codes |
| Business Guide — Payments | Business Payments |
| Test Scenarios & Data | Test Cards |