Beamable SDK
Public Member Functions | List of all members
Beamable.Api.Payments.PaymentService Class Reference

This type defines the Client main entry point for the Payments feature. More...

Public Member Functions

 PaymentService (IPlatformService platform, IPlatformRequester requester)
 
Promise< EmptyResponseTrack (TrackPurchaseRequest trackPurchaseRequest)
 Handles starting the coroutine to track a purchase request client-authoritatively Note: This is disabled by default, and requires the developer to enable it via the Portal. More...
 
Promise< PurchaseResponseBeginPurchase (string purchaseId)
 Handles starting the coroutine to make the begin purchase request. More...
 
Promise< EmptyResponseCompletePurchase (CompletedTransaction transaction)
 This request is made after the provider has charged the player. It is used to verify the legitimacy of the purchase by verifying the receipt as well as completing the item fulfillment process. More...
 
Promise< EmptyResponseCancelPurchase (long txid)
 Handles starting the coroutine to make the cancel purchase request. More...
 
Promise< EmptyResponseFailPurchase (long txid, string reason)
 Handles starting the coroutine to make the fail purchase request. More...
 
Promise< PurchaseResponseRedeemCoupon (string purchaseId)
 Attempts to consume a coupon to redeem an offer More...
 
Promise< GetSKUsResponseGetSKUs ()
 Get commerce SKUs from platform
 
Promise< GetOffersResponseGetOffers (string[] stores=null)
 Get catalog from platform
 
Promise< CouponsCountResponseGetCouponsCount ()
 Get the count of coupons
 
void RefreshCoupons ()
 
void SubscribeCoupons (Action< int > callback)
 

Detailed Description

This type defines the Client main entry point for the Payments feature.

Related Links

img beamable-logo

Member Function Documentation

◆ BeginPurchase()

Promise< PurchaseResponse > Beamable.Api.Payments.PaymentService.BeginPurchase ( string  purchaseId)
inline

Handles starting the coroutine to make the begin purchase request.

Parameters
purchaseIdThe id of the item the player wishes to purchase.

◆ CancelPurchase()

Promise< EmptyResponse > Beamable.Api.Payments.PaymentService.CancelPurchase ( long  txid)
inline

Handles starting the coroutine to make the cancel purchase request.

Parameters
txidThe id of the transaction the player wishes to cancel.

◆ CompletePurchase()

Promise< EmptyResponse > Beamable.Api.Payments.PaymentService.CompletePurchase ( CompletedTransaction  transaction)
inline

This request is made after the provider has charged the player. It is used to verify the legitimacy of the purchase by verifying the receipt as well as completing the item fulfillment process.

Parameters
transactionThe completed transaction.

◆ FailPurchase()

Promise< EmptyResponse > Beamable.Api.Payments.PaymentService.FailPurchase ( long  txid,
string  reason 
)
inline

Handles starting the coroutine to make the fail purchase request.

Parameters
txidThe id of the transaction the player wishes to mark failed.
reasonThe reason the transaction failed

◆ RedeemCoupon()

Promise< PurchaseResponse > Beamable.Api.Payments.PaymentService.RedeemCoupon ( string  purchaseId)
inline

Attempts to consume a coupon to redeem an offer

Parameters
purchaseIdThe id of the item the player wishes to purchase.

◆ Track()

Promise< EmptyResponse > Beamable.Api.Payments.PaymentService.Track ( TrackPurchaseRequest  trackPurchaseRequest)
inline

Handles starting the coroutine to track a purchase request client-authoritatively Note: This is disabled by default, and requires the developer to enable it via the Portal.

Parameters
trackPurchaseRequestThe request structure for tracking the purchase.

The documentation for this class was generated from the following file: