Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the payment request contain line item details? #49

Closed
msporny opened this issue Mar 14, 2016 · 13 comments
Closed

Should the payment request contain line item details? #49

msporny opened this issue Mar 14, 2016 · 13 comments
Labels
Core Functionality Priority: Low security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.

Comments

@msporny
Copy link
Member

msporny commented Mar 14, 2016

Migrating from w3c/webpayments#38:

The paymentRequest API currently includes a Payment Details object in a payment request:

http://wicg.github.io/paymentrequest/specs/paymentrequest.html#paymentdetails-dictionary
http://wicg.github.io/paymentrequest/specs/paymentrequest.html#paymentrequest-interface

The Web Payments CG's Browser API specifically does not provide such an interface because small and large retailers have stated that they do not want that information leaked outside of their customer-merchant environment.

Does introducing this line-item list create an issue w/ the "private" customer-merchant environment? Will most merchants opt to not include line item data?

msporny added a commit to msporny/browser-payment-api that referenced this issue Mar 16, 2016
@mattsaxon mattsaxon added security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. Core Functionality labels Mar 21, 2016
@mattsaxon mattsaxon added this to the Priority: High milestone Mar 21, 2016
@adrianba
Copy link
Contributor

Line items are entirely optional so merchants can provide what they want. At most you need to provide one item with the total amount.

@halindrome
Copy link
Contributor

Note that I continue to object to having one of the line items be the total. The total should be a separate entry in the data structure.(see issue #18)

@adrianba
Copy link
Contributor

Note that I continue to object to having one of the line items be the total. The total should be a separate entry in the data structure.(see issue #18)

I wasn't taking a view on that here. The current proposal is modeled on an existing (non-web) API. Issue #18 is called out in the spec in section 6.

@msporny
Copy link
Member Author

msporny commented Mar 30, 2016

Walmart and Target, for example, have specifically stated that they do not want to include line item data. Will most merchants opt to not include line item data once they find out that the browser vendors could mine that data? If so, that would be a strong signal to not include line item data in the API.

@adrianhopebailie
Copy link
Collaborator

I think this is a red herring.

The list items are not intended for showing a basket of goods (although I guess there is nothing stopping a merchant doing that) but rather the set of final "sub-totals" that constitute the final total. i.e. Things like shipping, discounts, etc

@halindrome
Copy link
Contributor

I disagree with your conclusion @adrianhopebailie - that list of items is 1) called items, and 2) the examples include the information about what is the basket.

@adrianhopebailie
Copy link
Collaborator

Which examples are you referring to @halindrome ?

This one from the spec has no details of the basket of goods:

{
  "items": [
    {
      "id": "basket",
      "label": "Sub-total",
      "amount": { "currencyCode": "USD", "value" : "55.00" }, // US$55.00
    },
    {
      "id": "tax",
      "label": "Sales Tax",
      "amount": { "currencyCode": "USD", "value" : "5.00" }, // US$5.00
    },
    {
      "id": "total",
      "label": "Total due",
      "amount": { "currencyCode": "USD", "value" : "60.00" }, // US$60.00
    }
  ]
}

@halindrome
Copy link
Contributor

Wow. And LOL. I actually thought "basket" in this instance was, you know, a basket someone was buying. Not a "Basket" of goods. Never even occurred.to me. Now I really don't like having total in here as per #18. This is not a list of "items". It is a list of.... I have no idea what. Not items I have ordered. Not line items of an invoice. My question for the author of this section is "what sort of items are supposed to be in this list?" The spec says:

A sequence of one or more PaymentItem dictionaries is included in the PaymentDetails dictionary to indicate the what the payment request is for and the value asked for.

Which is fine and generic, but as a user gives me no guidance.

@adrianhopebailie
Copy link
Collaborator

PR #133 proposes moving total to the details (passed to the app) and putting these line items (which are for display purposes only) in the options.

If we are happy with #133 can I close this and also PR #83?

@corwinAmbre
Copy link

Hello,
being able to provide the list of items bought by the user to the payment platform is usefull for refund / chargeback processes, especially for physical goods and pre-purchases as well. When user wants to partically cancel an order, having such details directly in payment back-office (if supported by payment) is really usefull for merchant.

@adrianhopebailie
Copy link
Collaborator

@corwinAmbre that is not what we have heard to date. In contrast we have heard that merchants are concerned about third-party PSPs having access to this data.

I think it's out of scope of this API to be gathering the full details of the basket of goods. This can be exchanged via an out of band channel using electronic invoices or similar. The APi rpovides everythign that is required to pass the invoice number or reference in the payment data to ensure that they can be effectively matched on the back-end.

@corwinAmbre
Copy link

Hello, thanks for your quick feedback. I raised this concern because our monetization team openned this topic recently for multi-product cart. As I said before anyway, it also depends on PSPs since the support of details is not widely available (at least for the ones I'm working with).

@adrianba
Copy link
Contributor

Other payment APIs allow for the optional display of line items (e.g., sometimes it is necessary to call out tax as a separate value). The API currently makes showing more than one item optional. I recommend closing this issue.

@adrianhopebailie adrianhopebailie modified the milestone: Priority: Low Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Functionality Priority: Low security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.
Projects
None yet
Development

No branches or pull requests

6 participants