Open sahel-sh opened 4 years ago
@sahel-sh, sounds interesting. Could you expand a bit on what you are proposing? If possible, please provide some examples from a couple of websites or services or native apps.
Thanks Marcos for reviewing this!
As an example Gpay is using this field to provide more details about each shipping option to their users, and they would like to have this field in payment request/handler APIs as well.
Since the shippingOptions in PaymentRequestEvent comes from payment details provided in PaymentRequest's constructor, changing the PaymentShippingOption dictionary in PaymentRequest spec would be enough.
dictionary PaymentShippingOption {
required DOMString id;
required DOMString label;
required PaymentCurrencyAmount amount;
DOMString description;
boolean selected = false;
};
I don't have any objections to adding this to the spec, but we'd probably want to get some more implementer buy-in (or payment handler buy-in). It's pretty trivial to add and pass along to a payment handler... so if it's of value, then I don't see any objection.
Folks following along a home - would love to hear some more expressions of support!
Sent a PR for it https://github.com/w3c/payment-request/pull/910 - @sahel-sh, would appreciate your feedback!
This issue was raised in Payment Request, but closed once we removed addresses from that API. We anticipate adding addresses back to the specification and so are re-opening this issue proactively.
We added addresses back to the specification in the 7 August 2024 CRD
Payment apps supporting shipping delegation and/or use agents can use the merchant provided description field to show more details about each shipping option upon user interaction (e.g. when user hovers over the shipping option label)