[Chrome 139] Updated IsReadyToPayService AIDL

2 views
Skip to first unread message

Rouslan Solomakhin

unread,
May 28, 2025, 11:01:25 AMMay 28
to payment...@chromium.org, paymen...@chromium.org
If your Android payment app does not rely on the intent extras in the IS_READY_TO_PAY intent, you can stop reading now.

TL;DR: New "in Bundle parameters" in the isReadyToPay() method.

Hi everyone,

Starting with version 139.0.7205.0, Chromium and WebView now use the following AIDL for querying the IS_READY_TO_PAY service:

interface IsReadyToPayService {
    oneway void isReadyToPay(
            IsReadyToPayServiceCallback callback,
            in Bundle parameters);
}

The difference from earlier versions is the addition of the "in Bundle parameters",  which contains the same data as the intent extras used to connect to the IS_READY_TO_PAY service.

This change is necessary because Android OS can cache and reuse the connection to the IS_READY_TO_PAY service. When that happens, the services's onBind(Intent) method is not called, so the payment app's service does not receive the updated parameters in the intent extras. This can lead to inconsistent results being returned from Payment Request's JavasScript methods canMakePayment()and hasEnrolledInstrument().

Check the "in Bundle parameters" for null before falling back to the intent extras. Always check all IPC (Inter-Process Communication) data for null. That handles both earlier versions of Chromium and is a general precaution for receiving calls from other apps.

This change is backwards compatible:
  • Earlier versions of Chromium pass in null parameters.
  • A payment app can continue to use the previous version of the AIDL, without the parameters.

Cheers,
Rouslan
Reply all
Reply to author
Forward
0 new messages