#512: making the "total" field optional in PaymentRequest API

Visit on Github.

Opened May 4, 2020

Hello TAG!

I'm requesting a TAG review of making the "total" field optional in PaymentRequest API.

Given that when Digital Goods API is used with PaymentRequest API, the total amount is unnecessary, we propose to make the “total” field optional in PaymentRequest API spec, along with a few consequent changes.

Discussions

Discussed May 1, 2020 (See Github)

Dan: this looks small

Ken: this looks ok to me maybe we can just pass it and propose close?

Sangwhan: ok with me...

Comment by @kenchris May 12, 2020 (See Github)

This looks very sensible to me. No further comments from my side

Comment by @cynthia May 12, 2020 (See Github)

LGTM2.

Comment by @hober May 12, 2020 (See Github)

This statement seems wrong:

Payment Request by itself is inadequate for making in-app purchases in existing digital stores, because that API simply asks the user to make a payment of a certain amount

But in Payment Request they can describe the item being purchased and have that description shown alongside the price. Certainly, users want to see both product names and prices. “Please authorize the purchase of SHINY_SWORD” without saying how much SHINY_SWORD costs seems wrong to me.

Comment by @maxlgu May 12, 2020 (See Github)

Hi @hober ,

Note that whether the total is optional or not, it's up to the payment apps to decide whether to show the total price - this proposal doesn't change this behaviour. Whether before or after the proposal, if the payment apps would like to over-charge the users (more than the requested total amount), they can do that. After all, it's the payment apps who have the access to the users' wallets. Also because of that, they would need to show the final charge to the users before the transaction so as to maintain the users' trust.

Comment by @aestes May 12, 2020 (See Github)

Rather than making total optional, can the existing pending boolean on PaymentItem be used to support this use case?

For cases like ride sharing, where the total amount is unknown at the time of payment authorization, the total item can be marked as pending. In Apple Pay, for instance, the payment sheet will not display pending amounts.

Seems like if we support both pending totals and optional totals, it becomes more difficult for authors to understand which mechanism is appropriate for a given scenario.

Comment by @hober May 28, 2020 (See Github)

@maxlgu, any thoughts on @aestes' comment above?

Comment by @rsolomakhin May 29, 2020 (See Github)

Let's loop in @danyao and @mgiuca who have been having similar conversations in such places as https://github.com/w3c/payment-request/issues/912.

Comment by @rsolomakhin May 29, 2020 (See Github)

And https://github.com/WICG/digital-goods/issues/5.

Comment by @maxlgu May 29, 2020 (See Github)

@aestes : pending total makes sense only for the use case where the final price charged will be determined at some point in the future, like authorizing a payment for a service such as Uber. Optional total makes sense when the total is already known to the payment app, which has just provided it to the merchant through the digital goods API.

Discussed Jun 1, 2020 (See Github)

Tess: I asked them some questions, and I pulled a colleague in. They've since replied to our questions but I haven't had a chance to wrap my head around this thread since.

David: It's also interesting because of the connection to Digital Goods API. The use case for this is really a separate spec that probably brings up more issues to think about.

Tess: push this out a week?

Discussed Jun 1, 2020 (See Github)

Tess: Suggestion that this should be merged into Digital Goods API design review. Not sure what I think about that.

Tess: The change to this spec can be motivated by some other spec. Feel like it needs to stand on its own merits.

Tess: Figure out course of conversation prior to that -- confusion about pending totals versus optional totals. Different use cases.

David: Is part of our design review process judging whether things are useful? Other than that, it's pretty independent, but that could be big...

Tess: I like the idea of closing one rather than keeping 2 reviews open indefinitely. But still an open discussion I want to drive to some sort of conclusion. I think that's on me; need to go through comments after my last comment.

(does Digital Goods API review even exist?)

Tess: Push a week or two, give time to both follow up on above and time for them to file Digital Goods API

Comment by @mgiuca Jun 1, 2020 (See Github)

I agree @maxlgu . It sounds like "pending" has very different semantics to when total would be omitted because it is already known to the server.

Comment by @maxlgu Jun 11, 2020 (See Github)

Since the main argument of this feature is for the digital good api, this tag review should merge into that one once it exists. Set this tag review as blocked.

Discussed Jul 1, 2020 (See Github)

Tess: Last time we talked about this, we were asked to wait for the TAG review of the digital goods API, so we can skip this for now

Comment by @kenchris Sep 23, 2020 (See Github)

Hi there, any update on this and the Digital Goods API? Will that be send to TAG review anytime soon?

Comment by @maxlgu Sep 23, 2020 (See Github)

This was blocked on @mgiuca 's work on the Digital Goods API.

@mgiuca , what's the status of the Digital Goods API?

Comment by @mgiuca Oct 12, 2020 (See Github)

Apologies for leaving this one. I thought we had already discussed Digital Goods in TAG, but it seems it was only in the context of this one issue.

We will open a TAG review for DG.

Comment by @phoglenix Nov 16, 2020 (See Github)

TAG review opened for Digital Goods API: https://github.com/w3ctag/design-reviews/issues/571

Discussed Jan 1, 2021 (See Github)

Dependency on digital goods, asked if Tess has issues with the feature

Comment by @kenchris Jan 27, 2021 (See Github)

@hober did you have any issues with this review issue? It has a dep on Digital Goods, but it would be good to close, if you don't

Discussed May 1, 2021 (See Github)

Ken: [leaving comment] depending on @hober

Comment by @kenchris May 11, 2021 (See Github)

@hober this seems to be depending on you? :-) Can you have a look so that we can potentially close this

Discussed Sep 1, 2021 (See Github)

set to propose close

Comment by @cynthia Sep 14, 2021 (See Github)

We apologize this took so long - we think this has past it's due date, and the other reviewers were happy with this. We are going to close this in the rollups of our VF2F today.