You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc83b04
Browse filesBrowse the repository at this point in the historyBrowse files
fix(checkout): emit Payment-Receipt header on MPP success (#50)
## Summary
- Add `payment_receipt_header` symmetric to the existing
`payment_response_header` on `SettleOutcome` + `MppxComposeOutcome`.
- `make_mppx_compose_hook` serializes the upstream pympp Receipt
(`Receipt.to_payment_receipt()`) and threads it onto the outcome.
Defensive `getattr` so older pympp versions without the helper leave it
`None`.
- `Checkout` echoes `outcome.payment_receipt_header` as the
`payment-receipt` HTTP header on success, mirroring `payment-response`
for x402.
- x402 + the two `$0` zero-settle carve-outs explicitly pass `None`
(x402 uses payment-response only).
Surfaced when smoke-testing live `agents.martinestate.com` via `tempo
request`: every successful Tempo purchase printed `Warning: missing
Payment-Receipt on successful paid charge response`. paymentauth.org §5
mandates the header so spec-strict MPP clients can lift tx_hash + source
from headers without parsing the JSON body. We had the symmetric path
for x402; just never wired the MPP one.
Additive change. Existing consumer code keeps working (default `None`
skips the echo).
## Test plan
- [x] python: 1199 tests pass (4 new — checkout + make_mppx_compose_hook
receipt round-trip + omitted-helper fallback)
- [x] node (parallel PR): 1150 tests pass (3 new)
- [x] ruff + ty clean
- [ ] After merge + publish, re-run `tempo request` against live martin
(post `agentscore-commerce@2.0.1` bump) and confirm the warning
disappears
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments