API reference

AlternativeChoiceDetails Class

Modifiers: final
DeprecatedUse BillingClient.Builder.enableUserChoiceBilling with UserChoiceBillingListener and UserChoiceDetails in the listener callback instead.
Details related to a user's choice of alternative billing.
Alternative Billing for IAP is not supported by Meta.
The equivalent Google Play Billing Library class can be found at the Android developer documentation for AlternativeChoiceDetails⁠.

Signature

data class AlternativeChoiceDetails(val externalTransactionToken: String, val originalExternalTransactionId: String, val products: List<AlternativeChoiceDetails.Product>)

Constructors

AlternativeChoiceDetails ( externalTransactionToken , originalExternalTransactionId , products )
Signature
constructor(externalTransactionToken: String, originalExternalTransactionId: String, products: List<AlternativeChoiceDetails.Product>)
Parameters
externalTransactionToken: String  A token that represents the user's prospective purchase via alternative billing.
originalExternalTransactionId: String  The external transaction Id of the originating subscription, if the purchase is a subscription upgrade/downgrade.
products: List  A list of Product to be purchased in the alternative billing flow.
Returns
AlternativeChoiceDetails

Properties

externalTransactionToken : String
[Get]
A token that represents the user's prospective purchase via alternative billing.
Signature
val externalTransactionToken: String
originalExternalTransactionId : String
[Get]
The external transaction Id of the originating subscription, if the purchase is a subscription upgrade/downgrade.
Signature
val originalExternalTransactionId: String
products : List
[Get]
A list of Product to be purchased in the alternative billing flow.
Signature
val products: List<AlternativeChoiceDetails.Product>

Inner Class

Product Class

Modifiers: final
Details about a product being purchased.

Signature

data class Product(val id: String, val offerToken: String, val type: String)

Constructors

Product ( id , offerToken , type )
Signature
constructor(id: String, offerToken: String, type: String)
Parameters
id: String  The id of the product being purchased.
offerToken: String  The id of the product being purchased.
type: String  The BillingClient.ProductType of the product being purchased
Returns
AlternativeChoiceDetails.Product

Properties

id : String
[Get]
The id of the product being purchased.
Signature
val id: String
offerToken : String
[Get]
The id of the product being purchased.
Signature
val offerToken: String
type : String
[Get]
The BillingClient.ProductType of the product being purchased
Signature
val type: String