

# Subscription

A user's subscription to a plan for an app.

## Contents
<a name="API_Subscription_Contents"></a>

 ** appId **   <a name="appmonetization-Type-Subscription-appId"></a>
The ID of the app that the subscription belongs to.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Za-z0-9_-]+`   
Required: Yes

 ** billingAnchorDate **   <a name="appmonetization-Type-Subscription-billingAnchorDate"></a>
The fixed reference instant the recurring billing cycle is measured from. It is set when the subscription first takes effect and stays fixed as periods roll forward, so it is normally an older date than the current period — not the start of the current period. For the end of the current cycle, use `currentPeriodEndsAt` on GetSubscriptionResponse (derived from this anchor and the billing cycle) rather than this value.  
Type: Timestamp  
Required: Yes

 ** effectiveAt **   <a name="appmonetization-Type-Subscription-effectiveAt"></a>
The time when the subscription took effect.  
Type: Timestamp  
Required: Yes

 ** userId **   <a name="appmonetization-Type-Subscription-userId"></a>
The opaque end-user identifier that the subscription belongs to.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[A-Za-z0-9_.~-]+`   
Required: Yes

 ** billingCycle **   <a name="appmonetization-Type-Subscription-billingCycle"></a>
The billing cycle of the subscription, such as monthly or annual.  
Type: String  
Valid Values: `MONTHLY | ANNUAL | ONE_TIME`   
Required: No

 ** planId **   <a name="appmonetization-Type-Subscription-planId"></a>
The ID of the plan that the user is subscribed to.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-z0-9-]+`   
Required: No

## See Also
<a name="API_Subscription_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/appmonetization-2022-07-26/Subscription) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/appmonetization-2022-07-26/Subscription) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/appmonetization-2022-07-26/Subscription) 