PICO Unreal Platform SDK
FPicoIAPInterface Class Reference

PicoIAPInterface class. More...

#include <Pico_IAP.h>

Public Member Functions

bool ConsumePurchase (const FString &SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate)
 Records the order fulfillment result for a consumable. More...
 
bool GetProductsBySKU (TArray< FString > ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate)
 Gets a list of purchasable add-ons in the current app. More...
 
bool GetNextProductsArrayPage (UPico_ProductArray *InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate)
 Gets the next page of purchasable add-ons. More...
 
bool GetViewerPurchases (FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate)
 Gets a list of purchased add-ons for a user, including durables and unfulfilled consumables. More...
 
bool GetNextPurchaseArrayPage (UPico_PurchaseArray *InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate)
 Gets the next page of purchased add-ons. More...
 
bool LaunchCheckoutFlow (const FString &SKU, const FString &Price, const FString &Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate)
 Launches the checkout flow to purchase a durable or consumable. More...
 
bool LaunchCheckoutFlowV2 (const FString &SKU, const FString &Price, const FString &Currency, const FString &OuterId, FLaunchCheckoutFlow_V2Delegate InLaunchCheckoutFlow_V2Delegate)
 Launches the checkout flow to purchase a subscription add-on. More...
 
bool GetSubscriptionStatus (const FString &SKU, FGetSubscriptionStatusDelegate InGetSubscriptionStatusDelegate)
 Gets the subscription status of an add-on. More...
 
bool LaunchCheckoutFlowV3 (const FString &SKU, const FString &Price, const FString &Currency, const FString &OuterId, const FString &OrderComment, FLaunchCheckoutFlow_V3Delegate InLaunchCheckoutFlow_V3Delegate)
 Launches the checkout flow to purchase a subscription add-on. More...
 

Detailed Description

PicoIAPInterface class.

Member Function Documentation

◆ ConsumePurchase()

bool ConsumePurchase ( const FString &  SKU,
FConsumePurchaseDelegate  InConsumePurchaseDelegate 
)

Records the order fulfillment result for a consumable.

Note
Users are unable to repurchase the same consumable until the previous order is fulfilled.
Parameters
SKUThe unique identifier of the consumable.
InConsumePurchaseDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ GetNextProductsArrayPage()

bool GetNextProductsArrayPage ( UPico_ProductArray InProductArray,
FGetNextProductArrayPageDelegate  InGetNextProductArrayPageDelegate 
)

Gets the next page of purchasable add-ons.

Parameters
InProductArrayThe current object of product array.
InGetNextProductArrayPageDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_ProductArray *, ProductArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ GetNextPurchaseArrayPage()

bool GetNextPurchaseArrayPage ( UPico_PurchaseArray InPurchaseArray,
FGetNextPurchaseArrayPageDelegate  InGetNextPurchaseArrayPageDelegate 
)

Gets the next page of purchased add-ons.

Parameters
InPurchaseArrayThe current object of purchase array.
InGetNextPurchaseArrayPageDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_PurchaseArray *, PurchaseArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ GetProductsBySKU()

bool GetProductsBySKU ( TArray< FString >  ProductSKUs,
int32  Count,
FGetProductsBySKUDelegate  InGetProductsBySKUDelegate 
)

Gets a list of purchasable add-ons in the current app.

Parameters
ProductSKUsThe unique identifiers of add-ons. If this parameter is empty, all purchasable add-ons will be returned. If SKUs are specified, add-ons with corresponding SKUs will be returned.
CountThe number of 'ProductSKUs' arrays to return.
InGetProductsBySKUDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_ProductArray *, ProductArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ GetSubscriptionStatus()

bool GetSubscriptionStatus ( const FString &  SKU,
FGetSubscriptionStatusDelegate  InGetSubscriptionStatusDelegate 
)

Gets the subscription status of an add-on.

Parameters
SKUThe SKU of the add-on.
InGetSubscriptionStatusDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_SubscriptionStatus *, Purchase).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ GetViewerPurchases()

bool GetViewerPurchases ( FGetViewerPurchasesDelegate  InGetViewerPurchasesDelegate)

Gets a list of purchased add-ons for a user, including durables and unfulfilled consumables.

Parameters
InGetViewerPurchasesDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_PurchaseArray *, PurchaseArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ LaunchCheckoutFlow()

bool LaunchCheckoutFlow ( const FString &  SKU,
const FString &  Price,
const FString &  Currency,
FLaunchCheckoutFlowDelegate  InLaunchCheckoutFlowDelegate 
)

Launches the checkout flow to purchase a durable or consumable.

Parameters
SKUThe unique identifier of the add-on the user wants to purchase.
PriceThe price for the add-on.
CurrencyThe currency of the payment.
InLaunchCheckoutFlowDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_Purchase *, Purchase).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ LaunchCheckoutFlowV2()

bool LaunchCheckoutFlowV2 ( const FString &  SKU,
const FString &  Price,
const FString &  Currency,
const FString &  OuterId,
FLaunchCheckoutFlow_V2Delegate  InLaunchCheckoutFlow_V2Delegate 
)

Launches the checkout flow to purchase a subscription add-on.

Parameters
SKUThe unique identifier of the subscription add-on the user wants to purchase.
PriceThe price for the subscription add-on.
CurrencyThe currency of the payment.
OuterIdThe unique identifier of the subscription period in the subscription add-on.
InLaunchCheckoutFlow_V2DelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_Purchase *, Purchase).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure

◆ LaunchCheckoutFlowV3()

bool LaunchCheckoutFlowV3 ( const FString &  SKU,
const FString &  Price,
const FString &  Currency,
const FString &  OuterId,
const FString &  OrderComment,
FLaunchCheckoutFlow_V3Delegate  InLaunchCheckoutFlow_V3Delegate 
)

Launches the checkout flow to purchase a subscription add-on.

Parameters
SKUThe unique identifier of the subscription add-on the user wants to purchase.
PriceThe price for the subscription add-on.
CurrencyThe currency of the payment.
OuterIdThe unique identifier of the subscription period in the subscription add-on.
OrderCommentExtended comment field for a purchase and you can input any necessary information.
InLaunchCheckoutFlow_V3DelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_Purchase *, Purchase).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure