Skip to content

fix: preserve receipt subscription ids#172

Open
Osraka wants to merge 1 commit into
tempoxyz:mainfrom
Osraka:osraka/preserve-receipt-subscription-id
Open

fix: preserve receipt subscription ids#172
Osraka wants to merge 1 commit into
tempoxyz:mainfrom
Osraka:osraka/preserve-receipt-subscription-id

Conversation

@Osraka

@Osraka Osraka commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • Add optional Receipt.subscription_id support for subscriptionId receipt metadata.
  • Preserve subscriptionId when parsing receipts produced by another SDK and when formatting receipts back to Payment-Receipt.
  • Add regression coverage for optional-field roundtrip and foreign receipt parsing.

This aligns pympp with the Rust SDK receipt behavior, where subscription receipts keep subscriptionId as a first-class optional field instead of silently dropping it.

Tests

  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m pytest tests/test_parsing.py -q
  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m ruff check src/mpp/__init__.py src/mpp/_parsing.py tests/test_parsing.py
  • PYTHONPATH=/tmp/pympp-test-deps:src python3 -m py_compile src/mpp/__init__.py src/mpp/_parsing.py tests/test_parsing.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant