Table of contents

This is not the latest version of this document; to access the latest version, click here.
Official Content

Store API is a component of the GeneXus Smart Devices API which allow to manage In-App Purchases in our applications.

It consists of one External Object (Store, the main component), three Structured Data Types (SDT) used by the Store EO methods (PurchaseReceiptInformation, PurchaseResult and StoreProductCollection) and one Procedure (ValidatePurchase, used to call a purchase validation process in the platform store).

Store External Object



Store.GetProducts(ProductsIdentifications) : StoreProductCollection

ProductIdentifications is a VarChar(100) Collection

Given a list of products, returns a collection with detailed information about them. Useful to get the title in the user local language and the price in the user local currency.

Store.PurchaseProduct(ProductIdentifier, Quantity) : PurchaseResult

ProductIdentifier is VarChar(100)
Quantity is Numeric(8.0)

Sends the purchase request of the given product to the platform In-App Purchases store.

Store.GetPurchasedProducts() : VarChar(100) Collection

Gets a list of identifiers of the user's purchased products.

Note: This method has been deprecated since GeneXus X Evolution 3 Upgrade 5. Use GetPurchases instead.

Store.GetPurchases(): Collection (PurchaseResult)

Gets a list of information of the user's purchased products.


GeneXus X Evolution 3 Upgrade 5

Store.IsEnabled(ProductIdentifier) : Boolean

ProductIdentifier is VarChar(100)

Checks in the platform In-App Purchases store if the specified product has been purchased.



ProductIdentifier is VarChar(100)

These methods are used to set the purchased status of a product in the In-App Purchases platform. Typically, the EnableProduct method is called right after a success result when using the PurchaseProduct method. The DisableProduct method is called right after an In-App product ("Consumable" product in the store) has been used; the objective is to disable it, so it cannot be selected again.

Note that even when getting a success result, PurchaseProduct method does not implicitly makes an EnableProduct action. It is a GeneXus user task to manage the purchased product enabled/disabled status.


PurchaseResult SDT

PurchaseResult - GX15

Success : Boolean Indicates if the purchase process was successfully completed
ProductIdentifier : VarChar(100) Purchased product identifier
TransactionData : VarChar(100) Encrypted data of the purchase transaction that can be optionally used to call the ValidatePurchase procedure (only available for iOS In-App Purchases)

StoreProductCollection SDT


Is a collection of:

LocalizedTitle : VarChar(100) Product title in the user local language.
LocalizedDescription : VarChar(100) Product description in the user local language.
LocalizedPriceAsString : VarChar(100) String with the product price indicated in the user local currency.
ProductIdentifier : VarChar(100) Product identifier.
Purchased : Boolean Indicates if the product has been purchased by the user.

ValidatePurchase Procedure

This procedure receives a parameter with TransactionData -VarChar(100)- and return receipt information based on PurchaseReceiptInformation SDT. TransactionData is obtained from a previous call to the PurchaseProduct method of the Store External Object. Typically, before enabling the product in the platform store (using EnableProduct method), this procedure is called to make a final validation.

Note: ValidatePurchase procedure validation is only available for iOS In-App Purchases.

PurchaseReceiptInformation SDT


Store the result of calling the ValidatePurchase procedure (only available for iOS In-App Purchases)

Valid : Boolean Indicates if the checked purchased was valid or not.
ProductIdentifier : VarChar(100) Purchased product identifier.
Quantity : Numeric(8.0) Quantity purchased.
TransactionId : VarChar(40) Identifier of the transaction given by the In-App Purchases store. Useful to identify later purchase information in the reports provided by the In-App Purchases stores.
PurchaseDate : DateTime Purchase date.
OriginalTransactionId : VarChar(40) Usually, when a transaction is aborted because communication problems, platform store retry the purchase and a new transaction Id is generated. In those cases, this field store the original Transaction Id which had the communication problem.
OriginalPurchaseDate : DateTime Original failed purchase date.
ApplicationItemsId : VarChar(100) Identifier of the application which originates the purchase. Useful when a server is used for purchases in more than one application.


Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant