[w3c/payment-request] Handling in-app shipping changes (Issue #1042)

Hi team, we’re looking for guidance on handling in-app shipping changes using the PaymentRequest API. It looks like the existing [shippingaddresschange](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/shippingaddresschange_event) and [shippingoptionchange](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/shippingoptionchange_event) events are both deprecated, so we're unsure if it's recommended to use them in our implementation. In our testing we found a way to handle bidirectional shipping callbacks using [paymentmethodchange](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/paymentmethodchange_event), but we're concerned about future breaking changes with that approach, since it doesn't seem like we're using the API as intended- we're essentially using [changePaymentMethod()](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/changePaymentMethod) as a means of exchanging arbitrary data between the payment app and our SDK on the merchant page. For context, [here's a repo](https://github.com/dtjones404/payment-request-reproduction/blob/paymentmethodchange-demo/src/index.ts) with a minimal reproduction of the strategy we're considering.

A couple of questions:
1. What is the status of the shippingaddresschange and shippingoptionchange deprecations?  Are there plans to remove them from future versions of the spec?
2. Currently paymentmethodchange allows for the exchange of arbitrary data between the payment app and the merchant page.  Will this continue to be true in the future?

<p align="center">
  <img src=https://github.com/user-attachments/assets/de684e4c-a7c1-4626-990b-b6490fd2e8b8 width="300"></img>
</p>

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/1042
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/issues/1042@github.com>

Received on Friday, 3 January 2025 23:11:34 UTC