Unreal Plugin
unreal plugin samsung iap unreal engine plugin v6 5 0 11 1mb april 20, 2026 the samsung iap unreal engine plugin comes with all the content necessary for your integration integrate samsung iap into your app this section explains how to use the samsung in-app purchase iap functionality by integrating the samsung iap unreal engine plugin system requirements to avoid compatibility issues, the plugin requires the following tools epic game launcher android sdk unreal engine 4 18 or later install samsung iap plugin download the samsung iap unreal engine plugin file create plugins folder inside the <unreal_project_directory> directory if it does not exist copy the samsungiap folder and its contents to plugins folder from the samsung iap unreal plugin file now open the editor and navigate to the edit->plugins menu and enable the samsung iap plugin add samsung iap dependency modify the <unreal_project_name> build cs file by adding "samsungiap" to the publicdependencymodulenames section code snippet publicdependencymodulenames addrange new string[] { "core", "coreuobject", "engine", "inputcore", "umg", "slate", "slatecore", "samsungiap" } ; implement samsung iap this section explains the fundamental aspects of integrating samsung iap functionality into your android app by making plugin method calls to support the offering and sale of in-app products notefor details about samsung iap method calls, see the programming guide include iap header file access the samsung iap api by including the iap header file iap h in the related classes of your project code snippet #include "iap h" set the iap operating mode use the setoperationmode method to set the operating mode cautionensure the operation mode is set to iap_mode_production before submitting for beta test or normal publication in other words, iap_mode_test or iap_mode_test_failure must be set only if the app status in seller portal is registering or updating mode description iap_mode_production startpayment requests are processed as specified, financial transactions do occur for successful requests, and actual results are returned successful or failed note for all other iap requests only products purchased in iap_mode_production mode are considered owned products iap_mode_test startpayment requests are processed as specified, except financial transactions do not occur licensed testers are not billed for product purchases , and successful results are always returned for details of the payment window shown in iap_mode_test mode, see the payment window note for all other iap requests only products purchased in iap_mode_test mode are considered owned products in order to purchase in-app products, testers must be registered as a license tester in the seller's seller portal profile in this mode, licensed testers always get your in-app products for free all other users see an error message if they try to purchase an in-app product iap_mode_test_failure all iap requests fail this mode is for negative testing to ensure that your app can handle errors such as improper input and user actions code snippet samsung iap setoperationmode iap_mode_test ; get user-owned products requirementyou must call getownedlist whenever launching the application in order to check for unconsumed items or subscription availability use the getownedlist method to get information about some or all of the products the user has already purchased product type description item returns all purchased non-consumable items, consumable items that have not been consumed subscription returns all active subscriptions all returns all purchased non-consumable items, consumable items that have not been consumed and active subscriptions noteboth purchased consumable items that were previously reported as consumed and expired subscriptions are not returned code snippet samsung iap getownedlist "all" ; after processing is complete, the ongetownedproducts callback is triggered, containing information about the specified purchased products and api call processing listen to callback events // listener delcaration void ongetownedproducts int result, const fstring& msg, const std vector<samsung ownedproductvo>& data ; // listener implementation void samsungiaplistener ongetownedproducts int result, const fstring& msg, const vector<ownedproductvo>& data { for auto& i data { print fstring printf text "owned item %s" , *i mitemname ; } } get in-app product details use the getproductsdetails method to get detailed information for example, item id, price, and description about some or all of the in-app products registered to your app that are available for user purchase specify one or more unique in-app product id values comma delimited to get information about the specified products specify an empty string "" to get information about all registered products code snippet //get information about three in-app products samsung iap getproductsdetails "com mygame product1, com mygame product2, com mygame product3" ; //get information about all in-app products samsung iap getproductsdetails "" ; after processing is complete, the ongetproducts callback is triggered, which contains information about the specified products and api call processing listen to callback events // listener delcaration void ongetproducts int result, const fstring& msg, const std vector<samsung productvo>& data ; // listener implementation void samsungiaplistener ongetproducts int result, const fstring& msg, const vector<productvo>& data { for auto& i data { print fstring printf text " name %s" , *i mitemname ; } } purchase an in-app product use the startpayment method to initiate a purchase and payment transaction for a specified in-app product you can optionally specify the obfuscated account id and profile id in the request for startpayment the obfuscated account id and profile id are returned in the response galaxy store uses this value to detect fraudulent payments notethis method was deprecated in samsung iap unreal engine plugin v6 5 0 samsung iap startpayment "com mygame product1", "passthroughparam" ; passthroughparam, which is a unique identifier that your app assigned to the product purchase and payment transaction, has been deprecated in plugin v6 5 0 code snippet //start purchase and payment of an in-app product samsung iap startpayment "com mygame product1", "obfuscatedaccountid", "obfuscatedprofileid" ; after processing is complete, the onpayment callback is triggered, which contains information about the purchased product, the transaction, and api call processing listen to callback events // listener delcaration void onpayment int result, const fstring& msg, const samsung purchasevo& data ; // listener implementation void samsungiaplistener onpayment int result, const fstring& msg, const purchasevo& data { print fstring printf text "item %s" , *data mitemname ; } notify samsung iap that the purchase was processed consumable items use the consumepurchaseditems method and the purchase id of a consumable in-app item to enable it to be purchased again whether or not the user has actually used the item your app receives an item's purchase id in the onpayment and ongetownedlist callbacks code snippet //consume purchased items samsung iap consumepurchaseditems "purchase_id" ; after processing is complete, the onconsumepurchaseditems callback is triggered, which contains information about the consumed item and api call processing listen to callback events // listener delcaration void onconsumepurchaseditems int result, const fstring& msg, const std vector<samsung consumevo>& data ; // listener implementation void samsungiaplistener onconsumepurchaseditems int result, const fstring& msg, const vector<consumevo>& data { for auto& i data { print fstring printf text "owned item %s" , *i mpurchaseid ; } } non-consumable items and subscriptions use the acknowledgepurchases method to acknowledge that the user has been granted entitlement for one or more purchased non-consumable items or subscriptions code snippet //acknowledge non-consumable items and subscriptions samsung iap acknowledgepurchases "purchase_id" ; after processing is complete, the onacknowledgepurchases callback is triggered, which returns non-consumable items or subscription data notewe recommend reporting purchased consumable items immediately after verifying their purchase and reporting all unreported products in one consumepurchaseditems or acknowledgepurchases method call in order to avoid system overload or malfuction listen to callback events // listener delcaration void onacknowledgepurchases int result, const fstring& msg, const std vector<samsung acknowledgevo>& data ; // listener implementation void samsungiaplistener onacknowledgepurchases int result, const fstring& msg, const vector<acknowledgevo>& data { for auto& i data { print fstring printf text "owned item %s" , *i mpurchaseid ; } } get promotion eligibility for subscription use the getpromotioneligibility method to get the pricing options of a subscription, such as free trials and introductory prices, applicable to the customer specify one or more unique subscription id values, comma delimited code snippet //get promotional offers of items and subscriptions samsung iap getpromotioneligibility "subitemid_1, subitemid_2" ; after processing is complete, the ongetpromotioneligibility callback is triggered, which contains information about the pricing policy list and api call processing listen to callback events // listener delcaration void ongetpromotioneligibility int result, const fstring& msg, const std vector<samsung promotioneligibilityvo>& data ; // listener implementation void samsungiaplistener ongetpromotioneligibility int result, const fstring& msg, const vector<promotioneligibilityvo>& data { for auto& i data { print fstring printf text "owned item %s" , *i itemid ; } } change subscription plan use the changesubscriptionplan method to allow your customer to change their existing subscription to another tier of the same subscription proration mode description proration_mode_instant_prorated_date the subscription is upgraded or downgraded immediately any time remaining is adjusted based on the price difference and credited toward the new subscription by pushing forward the next billing date there is no any additional payment proration_mode_instant_prorated_charge for upgraded subscriptions only the subscription is upgraded immediately but the billing cycle remains the same the price difference for the remaining period is then charged to the user proration_mode_instant_no_proration for upgraded subscriptions only the subscription is upgraded immediately and the new price is charged when the subscription renews the billing cycle remains the same proration_mode_deferred the subscription is upgraded or downgraded when the subscription renews when the subscription renews, the new price is charged a downgrade is always executed with this mode see proration modes for more details about the four modes code snippet //change from one subscription plan to another samsung iap changesubscriptionplan "olditemid", "newitemid", proration_mode_instant_prorated_date, "obfuscatedaccountid", "obfuscatedprofileid" ; after processing is complete, the onchangesubscriptionplan callback is triggered, which contains information about the purchased product, the transaction, and api call processing listen to callback events // listener delcaration void onchangesubscriptionplan int result, const fstring& msg, const samsung purchasevo& data ; // listener implementation void samsungiaplistener onchangesubscriptionplan int result, const fstring& msg, const purchasevo& data { print fstring printf text "item %s" , *data mitemname ; }