What happened?
Description
AP2 PaymentReceipt(status="Success") should represent payment success, not only successful mandate verification.
The Python SDK helper creates a Success Payment Receipt directly and fills psp_confirmation_id / network_confirmation_id with a generated UUID. The Python MPP sample verifies the mandate chain, then signs this receipt without requiring payment-rail success, settlement, or finality evidence.
Impact
A downstream party may treat a signed PaymentReceipt(status="Success") as proof that payment succeeded, even though the sample path has not shown PSP/network acceptance, settlement, or finality.
Checkout completion, delivery, or entitlement release may then depend on a receipt that proves mandate verification but not payment success.
Steps to Reproduce
-
Review code/sdk/schemas/ap2/payment_receipt.json:36-63. A success receipt requires PSP/network confirmation IDs, but the schema does not require evidence behind them.
-
Review code/sdk/python/ap2/sdk/receipt_wrapper.py:44-75. create_payment_receipt() always creates status='Success' and uses a generated UUID as both confirmation IDs.
-
Review code/samples/python/src/roles/merchant_payment_processor_mcp/server.py:249-286. After mandate verification, the MPP sample creates the success receipt without a payment-rail success/finality check.
-
Review code/sdk/python/ap2/tests/receipt_wrapper_tests.py:29-49. The test confirms that the helper returns status='Success' and derives the PSP confirmation ID from the generated payment ID.
Relevant log output
Code of Conduct
What happened?
Description
AP2
PaymentReceipt(status="Success")should represent payment success, not only successful mandate verification.The Python SDK helper creates a
SuccessPayment Receipt directly and fillspsp_confirmation_id/network_confirmation_idwith a generated UUID. The Python MPP sample verifies the mandate chain, then signs this receipt without requiring payment-rail success, settlement, or finality evidence.Impact
A downstream party may treat a signed
PaymentReceipt(status="Success")as proof that payment succeeded, even though the sample path has not shown PSP/network acceptance, settlement, or finality.Checkout completion, delivery, or entitlement release may then depend on a receipt that proves mandate verification but not payment success.
Steps to Reproduce
Review
code/sdk/schemas/ap2/payment_receipt.json:36-63. A success receipt requires PSP/network confirmation IDs, but the schema does not require evidence behind them.Review
code/sdk/python/ap2/sdk/receipt_wrapper.py:44-75.create_payment_receipt()always createsstatus='Success'and uses a generated UUID as both confirmation IDs.Review
code/samples/python/src/roles/merchant_payment_processor_mcp/server.py:249-286. After mandate verification, the MPP sample creates the success receipt without a payment-rail success/finality check.Review
code/sdk/python/ap2/tests/receipt_wrapper_tests.py:29-49. The test confirms that the helper returnsstatus='Success'and derives the PSP confirmation ID from the generated payment ID.Relevant log output
Code of Conduct