# GetWalletCardsCallback

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# GetWalletCardsCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/service/quickaccesswallet/GetWalletCardsCallback "View this page in Kotlin")\|Java

`
public


interface
GetWalletCardsCallback
`  
`


`

|----------------------------------------------------------|
| android.service.quickaccesswallet.GetWalletCardsCallback |

<br />

*** ** * ** ***

Handles response from the[QuickAccessWalletService](https://developer.android.com/reference/android/service/quickaccesswallet/QuickAccessWalletService)for[GetWalletCardsRequest](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsRequest)

## Summary

|                                                                                                                                                                                                                                                                                                                                                      ### Public methods                                                                                                                                                                                                                                                                                                                                                       ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onFailure](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsCallback#onFailure(android.service.quickaccesswallet.GetWalletCardsError))`(`[GetWalletCardsError](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsError)` error) ` Notifies the Android System that an[QuickAccessWalletService.onWalletCardsRequested](https://developer.android.com/reference/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback))could not be handled by the service.                 |
| ` abstract void` | ` `[onSuccess](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsCallback#onSuccess(android.service.quickaccesswallet.GetWalletCardsResponse))`(`[GetWalletCardsResponse](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsResponse)` response) ` Notifies the Android System that an[QuickAccessWalletService.onWalletCardsRequested](https://developer.android.com/reference/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback))was successfully handled by the service. |

## Public methods

### onFailure

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onFailure (GetWalletCardsError error)
```

Notifies the Android System that an[QuickAccessWalletService.onWalletCardsRequested](https://developer.android.com/reference/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback))could not be handled by the service.

<br />

|                                                                                                   Parameters                                                                                                    ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `error` | `GetWalletCardsError`: The error message.**Note:** this message should**not** contain PII (Personally Identifiable Information, such as username or email address). This value cannot be`null`. <br /> |

|                                                                                                                                                                     Throws                                                                                                                                                                      ||
|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) | if this method or[onSuccess(GetWalletCardsResponse)](https://developer.android.com/reference/android/service/quickaccesswallet/GetWalletCardsCallback#onSuccess(android.service.quickaccesswallet.GetWalletCardsResponse))was already called. |

### onSuccess

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onSuccess (GetWalletCardsResponse response)
```

Notifies the Android System that an[QuickAccessWalletService.onWalletCardsRequested](https://developer.android.com/reference/android/service/quickaccesswallet/QuickAccessWalletService#onWalletCardsRequested(android.service.quickaccesswallet.GetWalletCardsRequest,%20android.service.quickaccesswallet.GetWalletCardsCallback))was successfully handled by the service.

<br />

|                                                                                                                                                                                                 Parameters                                                                                                                                                                                                  ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `response` | `GetWalletCardsResponse`: The response contains the list of[walletCards](https://developer.android.com/reference/android/service/quickaccesswallet/WalletCard)to be shown to the user as well as the index of the card that should initially be presented as the selected card. The list should not contain more than the maximum number of cards requested. This value cannot be`null`. <br /> |