API Contract Freeze Index
This page freezes the current Receipt Verify API mock and API contract direction before SafeGate moves into merchant verification console design.
Payment is the trigger. Trust is the product.
1. Frozen API Review Pages
v5.1 Receipt Verify API Mock
Public mock architecture for receipt verification. Shows how a finalized payment can map to receipt proof, access unlock, and merchant-side record.
v5.2 API Contract + Error Boundary
Defines the response envelope, success and error responses, fail-secure behavior, no secret exposure, no ID enumeration, and production readiness checklist.
Merchant/API Direction
Shows the broader merchant/API path without claiming a live production public API.
Security Hardening Check
Public security boundary and hardening checklist for reviewer context.
2. Frozen Contract Scope
{
"frozenStage": "v5.2.1",
"scope": "Receipt Verify API Mock + API Contract + Error Boundary",
"productionPublicApiClaim": false,
"publicApiKeySystemClaim": false,
"backendSecretExposure": false,
"piMainnetSettlementProofClaim": false,
"currentEvidence": "Pi Testnet controlled post-payment trust flow",
"nextStage": "v5.3 Merchant Verification Console Mock"
}
3. Frozen Response Coverage
- 200 RECEIPT_VERIFIED success response.
- 400 INVALID_RECEIPT_ID malformed input response.
- 404 RECEIPT_NOT_FOUND generic not-found response.
- 401 UNAUTHORIZED_MERCHANT future production boundary.
- 429 RATE_LIMITED future anti-enumeration boundary.
- 503 VERIFICATION_AMBIGUOUS fail-secure no-unlock boundary.
4. Frozen Security Rules
- No backend secret, service role, wallet passphrase, access token, or API key exposure.
- No stack trace, database name, table name, internal file path, or infrastructure leakage.
- No ID enumeration through receipt IDs, merchant IDs, payment IDs, or adjacent records.
- Invalid, missing, ambiguous, timed-out, or conflicting states must fail secure.
- Access must not unlock from UNKNOWN, FAILED, PENDING, ambiguous, or duplicate replay states.
5. Why This Freeze Matters
SafeGate is moving from public proof pages into merchant-facing verification design. Freezing v5.1 and v5.2 creates a stable review checkpoint before adding UI/console layers.