Skip to content

Limit information available during canmakepayment event #413

@ianbjacobs

Description

@ianbjacobs

(Below I quote previous text from the Chrome team, moving it from this pull request [1] to an issue)
[1] w3c/webpayments#261

When a Payment Request is constructed, the Payment Handler specification requires the user-agent to fire a "canmakepayment" event1
to any matching installed Service Workers. The Service Worker is able to handle the event and return (via respondWith) either true or false.

To support native Android apps, Chrome also fires an IS_READY_TO_PAY intent to the matching installed native applications.

The "canmakepayment" event (and IS_READY_TO_PAY intent) currently conveys the following information to the Payment App:

The transfer of this information is invisible to the user and without consent (reminder that it happens on Payment Request construction, long before any UI might be shown). Because Payment Apps run in a 1p context, it could be used to track the user.

Proposed Mitigation

Remove the topOrigin, paymentRequestOrigin, and methodData fields from "canmakepayment" event. The payment app may still respond based on its own knowledge (e.g., checking 1p data for this user), but that knowledge is compressed into only one bit for the merchant to consume (true/false).

Footnotes

  1. Not to be confused with the canMakePayment() method of the Payment Request API. The "canmakepayment"event is fired at> construction time, not in response to acanMakePayment()call, and is used to answerhasEnrolledInstrument()` instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions