Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Develop
Test
Publish
Monetize
Engage users
Device specifications
Resources
Skip to main content
The Amazon Appstore SDK provides developers with the ability to offer Tiered Subscription functionality to their Unity apps. To use tiered subscriptions in your Unity project, you must first manually create subscriptions, tiers, and terms in the developer console as IAP items. Enter data about these IAP items one at a time, and submit each subscription. In this way, you will be able to use them in your app. You can update your IAP items at any time. Read Setting Up Tiered Subscriptions in Developer Console before getting started. This document gives an overview of the available methods and events to Modify Tiered Subscriptions for the Unity plugin. It also provides you with some examples to help get started.

Unity Plugin Modify Subscription Methods

Requests are initiated by the developer as method calls. Parameters and events are described in the Supporting Data Objects table below.
Return TypeMethodMethod SummaryEvent
RequestOutputModifySubscription(ModifySubscriptionInput input)Initiates a request to modify subscription for a term sku with a given proration mode.ModifySubscriptionResponse

Modify Subscription Supporting Data Objects

Objects used as method and event parameters are described in the following table.
ObjectMembersDescription
ModifySubscriptionInputSkuInput skuInputSkuInput for the subscription term.
string prorationModeProrationMode specifies when the modification takes effect with the value of IMMEDIATE or DEFERRED.
ModifySubscriptionResponsestring requestIdThe request ID originally returned by ModifySubscription.
AmazonUserData amazonUserDataSee AmazonUserData.
List receiptsSee PurchaseReceipt.
string statusSame as PurchaseResponse status.
PurchaseReceiptstring receiptIdA receipt ID, which is a unique identifier of a purchase.
long cancelDateThe cancel date for the purchase, in milliseconds since January 1, 1970, 00:00:00 GMT, or 0 if it is not canceled.
long purchaseDateThe purchase date for the purchase, in milliseconds since January 1, 1970, 00:00:00 GMT.
string productTypeThe type of product. Can be CONSUMABLE, ENTITLED or SUBSCRIPTION. See Understanding In-App Purchasing for more information.
long deferredDateDate for deferred modification if modified in deferred proration mode. See Deferred ProrationMode for more information.
string deferredSkuThe Sku the customer will be switching from in deferred mode.
string termSkuNew Sku the customer will switch to.

Proration Modes

When you modify a subscription, there are two proration modes defined that determines behaviour when the modification intended becomes effective.

Modify Subscription API Sample Code

If you aren’t familiar with calling methods and handling events in Unity, see Initiate method calls and Handle events in Unity.

ModifySubscription

ModifySubscription Initiates a request to modify subscription for a term sku with a given proration mode.

ModifySubscriptionResponse

ModifySubscriptionResponse returns the response from the ModifySubscription call.
Last modified on December 3, 2024