# Requirements Archive: v1.1 SDK & Docs

**Archived:** 2026-01-21
**Status:** SHIPPED

This is the archived requirements specification for v1.1.
For current requirements, see `.planning/REQUIREMENTS.md` (created for next milestone).

---

# Requirements: OpenFacilitator v1.1

**Defined:** 2026-01-20
**Core Value:** SDK supports x402 v2 format; merchants have refund documentation

## v1.1 Requirements

Requirements for SDK v2 compliance and refund documentation.

### SDK Types

- [x] **SDK-01**: PaymentPayloadV1 interface with literal `x402Version: 1` discriminant
- [x] **SDK-02**: PaymentPayloadV2 interface with literal `x402Version: 2` and nested `accepted` field
- [x] **SDK-03**: Union type `PaymentPayload = PaymentPayloadV1 | PaymentPayloadV2`
- [x] **SDK-04**: Type guard `isPaymentPayloadV1()` for runtime discrimination
- [x] **SDK-05**: Type guard `isPaymentPayloadV2()` for runtime discrimination
- [x] **SDK-06**: Helper function `getSchemeNetwork()` extracts scheme/network regardless of version
- [x] **SDK-07**: Export all new types from package index
- [x] **SDK-08**: `assertNever` utility for exhaustive version checking
- [x] **SDK-09**: PaymentRequirementsV1 and PaymentRequirementsV2 types with union
- [x] **SDK-10**: Update `verify()` method to handle both v1 and v2 formats using getSchemeNetwork
- [x] **SDK-11**: Update `settle()` method to handle both v1 and v2 formats using getSchemeNetwork
- [x] **SDK-12**: Update request body construction to pass correct format to facilitator endpoints

### Refund Documentation

- [x] **DOCS-01**: MDX page at `/docs/sdk/refunds/` with refund guide content
- [x] **DOCS-02**: Sidebar navigation entry for refunds page
- [x] **DOCS-03**: Code examples for `reportFailure` usage
- [x] **DOCS-04**: Code examples for `withRefundProtection` middleware

## Out of Scope

Explicitly excluded from v1.1.

| Feature | Reason |
|---------|--------|
| Breaking API changes | Backward compatibility required |
| Screenshots in docs | Code-only for v1.1, images later |
| PaymentAuthorization type updates | Not needed for v2 compliance |

## Traceability

| Requirement | Phase | Status |
|-------------|-------|--------|
| SDK-01 | Phase 12 | Complete |
| SDK-02 | Phase 12 | Complete |
| SDK-03 | Phase 12 | Complete |
| SDK-04 | Phase 13 | Complete |
| SDK-05 | Phase 13 | Complete |
| SDK-06 | Phase 13 | Complete |
| SDK-07 | Phase 14 | Complete |
| SDK-08 | Phase 13 | Complete |
| SDK-09 | Phase 12 | Complete |
| SDK-10 | Phase 14 | Complete |
| SDK-11 | Phase 14 | Complete |
| SDK-12 | Phase 14 | Complete |
| DOCS-01 | Phase 15 | Complete |
| DOCS-02 | Phase 15 | Complete |
| DOCS-03 | Phase 15 | Complete |
| DOCS-04 | Phase 15 | Complete |

---

## Milestone Summary

**Shipped:** 16 of 16 v1.1 requirements
**Adjusted:** None — all requirements implemented as specified
**Dropped:** None

---
*Archived: 2026-01-21 as part of v1.1 milestone completion*
