Skip to content

[Bug]: Payment receipt Success can be issued without payment-rail success evidence #327

Description

@mh-yu

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

  1. 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.

  2. 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.

  3. 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.

  4. 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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions