Integrate with Enhance - App Inventor
In App Payments
The connector library provides a set of functions which help you to make use of different In-App Payment SDKs in your app.
Example Usage

Methods
IsPurchasingSupported
boolean IsPurchasingSupported()
Return Value:
Returns true
if available, false
otherwise.
AttemptPurchase
void AttemptPurchase(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
ConsumePurchase
void ConsumePurchase(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
ManuallyRestorePurchases
void ManuallyRestorePurchases()
IsItemOwned
boolean IsItemOwned(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
Return Value:
Returns true
if owned, false
otherwise.
GetOwnedItemCount
number GetOwnedItemCount(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
Return Value:
Returns a number of the given product copies.
GetPurchaseDisplayPrice
text GetPurchaseDisplayPrice(
text productName,
text defaultPrice
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultPrice
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display price.
GetPurchaseDisplayTitle
text GetPurchaseDisplayTitle(
text productName,
text defaultTitle
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultTitle
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display title.
GetPurchaseDisplayDescription
text GetPurchaseDisplayDescription(
text productName,
text defaultDescription
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultDescription
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display description.