V2 API Environment Availability
This page describes which V2 endpoints are available in each CCG environment, what status codes to expect when an endpoint is not available, and how the blocking mechanism works at both the application and infrastructure layers.
Environment Access Matrix
| Environment | V2 Endpoints Available | Behaviour |
|---|---|---|
dev | ✅ Yes | All implemented endpoints accessible; stubs return 501 |
test | ✅ Yes | All implemented endpoints accessible; stubs return 501 |
reg | ✅ Yes | All implemented endpoints accessible; stubs return 501 |
perf | ✅ Yes | All implemented endpoints accessible; stubs return 501 |
stage | ❌ No | All V2 routes return 503 Service Unavailable |
prod | ❌ No | All V2 routes return 503 Service Unavailable |
The V2 API is currently in active development. All /v2/ paths are blocked in stage and production until the full split-tender implementation is complete and has passed production readiness review.
Response Codes
503 — Environment Block (stage / prod)
Any request to a /v2/ path in stage or prod returns a 503 Service Unavailable before reaching the application:
{
"status": 503,
"title": "V2_ENDPOINT_UNAVAILABLE",
"detail": "V2 endpoints are not available in this environment. V2 API access is restricted to non-production environments only."
}
This block operates at two independent layers — either is sufficient to stop the request:
- Istio VirtualService fault injection — the service mesh rejects the request at the gateway before it enters the cluster.
- Application filter (
V2EndpointFilter) — a Spring WebFlux filter short-circuits the request at the service level with a 503 JSON response.
501 — Not Yet Implemented (lower environments only)
In dev, test, reg, and perf, a subset of V2 endpoints are available as declared stubs — routes that are registered in the router but whose implementation is in progress. Calling one of these returns a 501 Not Implemented:
{
"status": 501,
"title": "V2_ENDPOINT_NOT_IMPLEMENTED",
"detail": "Capture for split-tender V2 is under active development and not yet available for consumption."
}
The detail field contains an endpoint-specific message describing what is under development.
Endpoint Status Reference
Payment Service (wallet-payment-service)
| Endpoint | Method | Status | Notes |
|---|---|---|---|
/v2/payments | POST | ✅ Implemented | Create split-tender payment |
/v2/payments | GET | ✅ Implemented | Get payment by merchantTransactionId |
/v2/payments/{id} | GET | ✅ Implemented | Get payment by paymentId |
/v2/payments/{id}/capture | PATCH | ✅ Implemented | Capture authorized payment |
/v2/payments/{id}/cancel | PATCH | 🔧 Stub (501) | In development |
/v2/refunds | POST | ✅ Implemented | Create refund |
/v2/refunds/{refundId} | GET | ✅ Implemented | Get refund status |
Auth Service (wallet-auth-service)
| Endpoint | Method | Status | Notes |
|---|---|---|---|
/v2/sessions | POST | ✅ Implemented | Create checkout session |
/v2/sessions/{id} | GET | ✅ Implemented | Get session status |
/v2/checkout-sessions/{id} | GET | 🔧 Stub (501) | In development |
/v2/checkout-sessions/{id}/cancel | POST | 🔧 Stub (501) | In development |
/v2/checkout-sessions/{id}/child-sessions | POST | 🔧 Stub (501) | In development |
/v2/checkout-sessions/{id} | PATCH | 🔧 Stub (501) | In development |
How It Works
The access control model uses two orthogonal, independently operating layers:
Incoming /v2/ request
│
▼
┌───────────────────────────────────────────────────────────┐
│ Layer 1: Istio VirtualService (gateway) │
│ stage / prod → fault injection: HTTP 503 │
│ lower envs → pass through to cluster │
└───────────────────────────────────────────────────────────┘
│ (lower envs only)
▼
┌───────────────────────────────────────────────────────────┐
│ Layer 2: V2EndpointFilter @Order(-200) │
│ stage / prod → 503 JSON response (application level) │
│ lower envs → pass through to next filter │
└───────────────────────────────────────────────────────────┘
│ (lower envs only)
▼
┌───────────────────────────────────────────────────────────┐
│ Layer 3: V2NotImplementedFilter @Order(-100) │
│ Handler annotated @V2NotImplemented → 501 JSON response │
│ Handler not annotated → pass through │
└───────────────────────────────────────────────────────────┘
│ (implemented endpoints only)
▼
Controller handler executes normally
Both infrastructure controls (Istio) and application controls (V2EndpointFilter) independently enforce the production block. This provides defense-in-depth: even if one layer is misconfigured, the other prevents exposure.
Infrastructure Routing
V2 public paths are routed through the CCG API v2 VirtualService (ccg-api-v2). All CCG V2 endpoints are exposed via Istio VirtualService — there is no direct HCP ingress for any of these paths. The Istio IngressGateway (istio-ingressgateway) sits at the cluster edge and forwards traffic to the appropriate service via the VirtualService route rules.
| Method | Public path | Rewrites to | Service | Routing |
|---|---|---|---|---|
POST | /payments | /v2/payments | payment-service | Virtual (Istio) |
GET | /payments | /v2/payments | payment-service | Virtual (Istio) |
POST | /token/payments | /v2/payments | payment-service (PCI) | Virtual (Istio) |
PATCH | /payments/{id}/cancel | /v2/payments/{id}/cancel | payment-service | Virtual (Istio) |
POST | /payments/{id}/capture | /v2/payments/{id}/capture | payment-service | Virtual (Istio) |
POST | /refunds | /v2/refunds | payment-service | Virtual (Istio) |
GET | /refunds/{refundId} | /v2/refunds/{refundId} | payment-service | Virtual (Istio) |
POST | /sessions | /v2/sessions | auth-service | Virtual (Istio) |
GET | /sessions/{sessionId} | /v2/sessions/{sessionId} | auth-service | Virtual (Istio) |
GET | /checkout-sessions/{id} | /v2/checkout-sessions/{id} | auth-service | Virtual (Istio) |
POST | /checkout-sessions/{id}/cancel | /v2/checkout-sessions/{id}/cancel | auth-service | Virtual (Istio) |
POST | /checkout-sessions/{id}/child-sessions | /v2/checkout-sessions/{id}/child-sessions | auth-service | Virtual (Istio) |
PATCH | /checkout-sessions/{id} | /v2/checkout-sessions/{id} | auth-service | Virtual (Istio) |
In stage and prod, Istio fault injection (HTTPFaultInjection.Abort, 100% rate, HTTP 503) is applied to all routes before the rewrite reaches the destination service.