# AlternativeBillingListener

# AlternativeBillingListener

<br />

```
public interface AlternativeBillingListener
```

<br />

*** ** * ** ***

| **This interface is deprecated.**   
|
| Use[BillingClient.Builder#enableUserChoiceBilling](https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder#enableUserChoiceBilling(com.android.billingclient.api.UserChoiceBillingListener))with[UserChoiceBillingListener](https://developer.android.com/reference/com/android/billingclient/api/UserChoiceBillingListener)instead.

Listener interface for the developer-managed alternative billing flow, when it is chosen by the user when initiating a purchase.

## Summary

| ### Public methods |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract void`    | ~~[userSelectedAlternativeBilling](https://developer.android.com/reference/com/android/billingclient/api/AlternativeBillingListener#userSelectedAlternativeBilling(com.android.billingclient.api.AlternativeChoiceDetails))~~`(` ` `[AlternativeChoiceDetails](https://developer.android.com/reference/com/android/billingclient/api/AlternativeChoiceDetails)` alternativeChoiceDetails` `)` Called when a user has selected to make a purchase using alternative billing. |

## Public methods

### userSelectedAlternativeBilling

```
abstract void [userSelectedAlternativeBilling](https://developer.android.com/reference/com/android/billingclient/api/AlternativeBillingListener#userSelectedAlternativeBilling(com.android.billingclient.api.AlternativeChoiceDetails))(
    AlternativeChoiceDetails alternativeChoiceDetails
)
```

Called when a user has selected to make a purchase using alternative billing.

**Note:**

1. When this method is invoked, a developer-provided purchase flow should be rendered where the user could complete the transaction.
2. If the transaction is successful, it must be reported via the Google Play Developer API.
3. The entitlement corresponding to the purchase should be granted and managed by the developer.

|                                                                      Parameters                                                                       |
|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|
| [AlternativeChoiceDetails](https://developer.android.com/reference/com/android/billingclient/api/AlternativeChoiceDetails)` alternativeChoiceDetails` | The alternative billing choice details. |