AppMonetization / Client / list_subscriptions

list_subscriptions

AppMonetization.Client.list_subscriptions(**kwargs)

Returns the subscriptions for an app. We recommend using pagination to ensure that the operation returns quickly and successfully.

See also: AWS API Documentation

Request Syntax

response = client.list_subscriptions(
    appId='string',
    maxResults=123,
    nextToken='string',
    scope='sandbox'|'live'
)
Parameters:
  • appId (string) –

    [REQUIRED]

    The ID of the app.

  • maxResults (integer) – The maximum number of items to return in a single page.

  • nextToken (string) – An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.

  • scope (string) –

    [REQUIRED]

    Required. The environment: live or sandbox.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'appId': 'string',
            'userId': 'string',
            'planId': 'string',
            'effectiveAt': datetime(2015, 1, 1),
            'billingAnchorDate': datetime(2015, 1, 1),
            'billingCycle': 'MONTHLY'|'ANNUAL'|'ONE_TIME'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Output for ListSubscriptions.

    • items (list) –

      The page of subscription summaries for the app.

      • (dict) –

        A summary of a user’s subscription to a plan for an app, read from the user’s latest subscription record. While a change is scheduled, planId, effectiveAt and billingCycle describe the scheduled change. Call GetSubscription for the subscription in effect.

        • appId (string) –

          The ID of the app that the subscription belongs to.

        • userId (string) –

          The opaque end-user identifier that the subscription belongs to.

        • planId (string) –

          The ID of the plan on the user’s latest subscription record. If a plan change is scheduled, this is the plan the subscription moves to; if a cancellation is scheduled or has taken effect, it is absent. Call GetSubscription for the plan in effect.

        • effectiveAt (datetime) –

          The time when the subscription took effect.

        • billingAnchorDate (datetime) –

          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. The resolved current-period end ( currentPeriodEndsAt) is available on GetSubscription for a single user; this summary carries only the anchor.

        • billingCycle (string) –

          The billing cycle of the subscription, such as monthly or annual.

    • nextToken (string) –

      An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.

Exceptions

  • AppMonetization.Client.exceptions.AccessDeniedException

  • AppMonetization.Client.exceptions.ValidationException

  • AppMonetization.Client.exceptions.InternalServerException

  • AppMonetization.Client.exceptions.ThrottlingException