Goal
Extend the MVP verify path so credit-asset payments must match both invoice.assetCode and invoice.assetIssuer. Native XLM invoices must still require asset_type === 'native'.
Context
docs/ASSETS.md requires USDC invoices to be identified by code plus issuer. Today backend/src/server-mvp.ts only compares asset_code, and backend/src/utils/verify-invoice-payment.ts has no issuer field. A payment in a different testnet USDC token with the same code could be accepted as settlement.
Related but separate: #457 covers validation tests for USDC + issuer on create, not Horizon verify matching.
Acceptance criteria
Out of scope
- Shared invoice API contract types
- Proof PDF / quittance output changes
- Automatic payment detection / streaming
- Mock API retirement
- Invoice expiry enforcement
Conflict rule
- Do not edit:
frontend/lib/export.ts, frontend/lib/mock-api.ts, frontend/app/pay/[id]/page.tsx
Complexity
Complexity: Medium — 150 points (Stellar Wave)
Goal
Extend the MVP verify path so credit-asset payments must match both
invoice.assetCodeandinvoice.assetIssuer. Native XLM invoices must still requireasset_type === 'native'.Context
docs/ASSETS.mdrequires USDC invoices to be identified by code plus issuer. Todaybackend/src/server-mvp.tsonly comparesasset_code, andbackend/src/utils/verify-invoice-payment.tshas no issuer field. A payment in a different testnet USDC token with the same code could be accepted as settlement.Related but separate: #457 covers validation tests for USDC + issuer on create, not Horizon verify matching.
Acceptance criteria
verify-invoice-payment.tsaccepts optional issuer fields and rejects credit payments when issuers differserver-mvp.tsverify handler passespaymentOp.asset_issuerand compares againstinvoice.assetIssuerfor non-native assetsverify-invoice-payment.test.ts: XLM match, USDC code+issuer match, wrong issuer →ASSET_MISMATCHdocs/VERIFY.mddocuments issuer checksOut of scope
Conflict rule
frontend/lib/export.ts,frontend/lib/mock-api.ts,frontend/app/pay/[id]/page.tsxComplexity
Complexity: Medium — 150 points (Stellar Wave)