Purchases
SDK configuration to send purchases info to Appflow.ai
This part of SDK is important for subscriptions information
Ready to work Configure product information in Google Play
Displaying Products
To fetch the products, you have to call method:
Example
API Reference
SkuDetailsListener | |
---|---|
onReceived(map: HashMap<String, ProductDetails>) | Success callback |
onError(error : PurchasesError) | Failure callback |
PurchasesError | |
---|---|
code | error code |
message | error message |
ProductDetails | |
---|---|
getDescription() : String | Returns the description of the product. |
getName() : String | Returns the name of the product being sold. |
getProductId() : String | Returns the product's Id. |
getProductType() : String | Returns the BillingClient.ProductType of the product. |
getTitle() : String | Returns the title of the product being sold. |
getOneTimePurchaseOfferDetails : ProductDetails.OneTimePurchaseOfferDetails | eturns the offer details of an one-time purchase product. |
getSubscriptionOfferDetails() : List<ProductDetails.SubscriptionOfferDetails> | returns a list containing all available offers to purchase a subscription product. |
PurchaseType | |
---|---|
INAPP | A type of SKU for Android apps in-app products |
SUBS | A type of SKU for Android apps subscriptions |
ProductDetails.OneTimePurchaseOfferDetails | |
---|---|
getFormattedPrice() : String | Returns formatted price for the payment, including its currency sign. |
getPriceAmountMicros() : Long | Returns the price for the payment in micro-units, where 1,000,000 micro-units equal one unit of the currency. |
getPriceCurrencyCode() : String | Returns ISO 4217 currency code for price. |
ProductDetails.SubscriptionOfferDetails | |
---|---|
getBasePlanId() : String | Returns the base plan id associated with the subscription product. |
getOfferId() : String | Returns the offer id associated with the subscription product. |
getOfferTags() : List | Returns the offer tags associated with this Subscription Offer. |
getOfferToken() : String | Returns the offer token required to pass in launchBillingFlow to purchase the subscription product with these pricing phases. |
getPricingPhases() : ProductDetails.PricingPhases | Returns the pricing phases for the subscription product. |
ProductDetails.PricingPhases | |
---|---|
getPricingPhaseList() : List<ProductDetails.PricingPhase> | Returns the pricing phases as a time ordered list of Pricing phase. |
ProductDetails.PricingPhase | |
---|---|
getBillingCycleCount() : Int | Number of cycles for which the billing period is applied. |
getBillingPeriod() : String | Billing period for which the given price applies, specified in ISO 8601 format. |
getFormattedPrice() : String | Returns formatted price for the payment cycle, including its currency sign. |
getPriceAmountMicros() : Long | Returns the price for the payment cycle in micro-units, where 1,000,000 micro-units equal one unit of the currency. |
getPriceCurrencyCode() : String | Returns ISO 4217 currency code for price. |
getRecurrenceMode() : Int | Returns ProductDetails.RecurrenceMode for the pricing phase. |
Making Purchases
Making Purchases, you have to call method:
Example
API Reference
Subscription Status
Get the subscription status of a product, you have to call method:
Example
API Reference
Upgrade/Downgrade product
**To upgrade/downgrade a product, you have to call method:
Example
API Reference
Last updated