SDK for PHP V3

Client: Aws\AppMonetization\AppMonetizationClient
Service ID: appmonetization
Version: 2022-07-26

This page describes the parameters and results for the operations of the AWS App Monetization (2022-07-26), and shows how to use the Aws\AppMonetization\AppMonetizationClient object to call the described operations. This documentation is specific to the 2022-07-26 API version of the service.

Service Description

AWS App Monetization is a billing and entitlement service for applications that you build on AWS. You define pricing plans and usage metrics for an app, record usage as it occurs, and check whether a user is entitled to a feature. Your users subscribe, pay, and manage their billing through hosted pages that AWS App Monetization provides. The service also reports subscription, usage, revenue, and AWS infrastructure cost analytics for each app.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

ArchiveMetric ( array $params = [] )
Archives a metric, removing its definition from the app's draft configuration.
ArchivePlan ( array $params = [] )
Archives a plan, removing it from the app's draft configuration so that it can no longer be subscribed to.
CancelSubscription ( array $params = [] )
Cancels a user's subscription at the end of the current billing period.
CreateApp ( array $params = [] )
Creates an app.
CreateAppPaymentRegistration ( array $params = [] )
Creates a hosted URL that an app owner uses to register payment and tax details.
CreateBillingPortalSession ( array $params = [] )
Opens the AWS App Monetization hosted customer billing portal for a user.
CreateMetric ( array $params = [] )
Creates a usage metric definition for an app.
CreateOneTimeCheckoutSession ( array $params = [] )
Creates a checkout session for a one-time purchase of usage packs or add-ons against the user's current subscription, or against the app when the user has no subscription.
CreateOneTimePrice ( array $params = [] )
Creates a one-time price for an app.
CreatePlan ( array $params = [] )
Creates a pricing plan for an app.
CreateSubscriptionCheckoutSession ( array $params = [] )
Subscribes a user to a plan or changes the user's current plan.
DeleteApp ( array $params = [] )
Deletes an app.
DeleteOneTimePrice ( array $params = [] )
Deletes a one-time price from an app.
DeleteThirdPartyCost ( array $params = [] )
Removes a third-party cost.
GetApp ( array $params = [] )
Returns the details of an app.
GetAppInfraCostSummary ( array $params = [] )
Returns infrastructure cost for an app, grouped by service (the default), user, or time.
GetAppPaymentRegistration ( array $params = [] )
Returns the current payment registration status and seller profile for an app.
GetAppRevenueSummary ( array $params = [] )
Returns billed revenue for an app for a billing period, grouped by plan.
GetAppSubscriptionSummary ( array $params = [] )
Returns subscription counts for an app, grouped by status (the default) or by plan.
GetAppUsageSummary ( array $params = [] )
Returns usage for an app, grouped by metric (the default), user, or time.
GetEntitlementDecision ( array $params = [] )
Returns an entitlement decision for a user action, indicating whether the action is allowed and why.
GetMetric ( array $params = [] )
Returns the details of a metric.
GetMetricUsage ( array $params = [] )
Returns a user's raw per-metric usage over a caller-supplied window.
GetOneTimePrice ( array $params = [] )
Returns the details of a one-time price.
GetPlan ( array $params = [] )
Returns the details of a plan.
GetPlanRecommendation ( array $params = [] )
Returns a recommended pricing model and plan set for an app, calculated from the billable actions, costs, customer types, alternatives and preferences in the request.
GetSubscription ( array $params = [] )
Returns a user's current subscription and any pending change.
GetSubscriptionHistory ( array $params = [] )
Returns the historical subscription records for a user.
GetThirdPartyCost ( array $params = [] )
Returns a single third-party cost by its identifier.
ListApps ( array $params = [] )
Returns the apps owned by the caller.
ListMetrics ( array $params = [] )
Returns the metrics for an app.
ListOneTimePrices ( array $params = [] )
Lists the one-time prices for an app.
ListPlans ( array $params = [] )
Returns the plans for an app.
ListSubscriptions ( array $params = [] )
Returns the subscriptions for an app.
ListTagsForResource ( array $params = [] )
Lists the tags on an app, pricing plan, billing metric or one-time price.
ListThirdPartyCosts ( array $params = [] )
Returns the third-party costs for an app.
PublishDraft ( array $params = [] )
Publishes the app's current draft configuration to live in a single atomic operation.
PutAwsServiceEvent ( array $params = [] )
Records an AWS service usage event for cost attribution.
PutCustomCharges ( array $params = [] )
Adds charges that you compute to the end user's next subscription invoice.
PutEvent ( array $params = [] )
Records a usage event for a user of an app.
PutThirdPartyCost ( array $params = [] )
Adds or updates a seller-declared third-party (non-AWS) monthly cost for an app.
TagResource ( array $params = [] )
Adds or overwrites tags on an app, pricing plan, billing metric or one-time price.
UntagResource ( array $params = [] )
Removes tags from an app, pricing plan, billing metric or one-time price.
UpdateApp ( array $params = [] )
Updates an existing app.
UpdateAppPaymentRegistration ( array $params = [] )
Updates the payment and tax details on an app's payment registration.
UpdateMetric ( array $params = [] )
Updates an existing metric.
UpdateOneTimePrice ( array $params = [] )
Updates the definition of a one-time price.
UpdatePlan ( array $params = [] )
Updates an existing plan.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

GetMetricUsage
GetSubscriptionHistory
ListApps
ListMetrics
ListOneTimePrices
ListPlans
ListSubscriptions
ListThirdPartyCosts

Operations

ArchiveMetric

$result = $client->archiveMetric([/* ... */]);
$promise = $client->archiveMetricAsync([/* ... */]);

Archives a metric, removing its definition from the app's draft configuration. The removal takes effect on the next call to PublishDraft. Already-recorded usage events and usage history are retained; archiving only stops the metric from aggregating further usage. Any plan quota or usage pack keyed to the metric is removed with it. If the metric was published, its metric ID and display name are permanently retired and cannot be reused.

Parameter Syntax

$result = $client->archiveMetric([
    'appId' => '<string>', // REQUIRED
    'metricId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

metricId
Required: Yes
Type: string

The ID of the metric to archive.

Result Syntax

[
    'appId' => '<string>',
    'metricId' => '<string>',
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app the archived metric belonged to.

metricId
Required: Yes
Type: string

The ID of the archived metric.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

ArchivePlan

$result = $client->archivePlan([/* ... */]);
$promise = $client->archivePlanAsync([/* ... */]);

Archives a plan, removing it from the app's draft configuration so that it can no longer be subscribed to. The removal takes effect on the next call to PublishDraft. Existing subscriptions to the plan are unaffected, and the plan's display name is freed for reuse. The plan's included quotas are removed with it.

Parameter Syntax

$result = $client->archivePlan([
    'appId' => '<string>', // REQUIRED
    'planId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

planId
Required: Yes
Type: string

The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.

Result Syntax

[
    'appId' => '<string>',
    'planId' => '<string>',
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app the archived plan belonged to.

planId
Required: Yes
Type: string

The server-generated identifier of the archived plan.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

CancelSubscription

$result = $client->cancelSubscription([/* ... */]);
$promise = $client->cancelSubscriptionAsync([/* ... */]);

Cancels a user's subscription at the end of the current billing period.

Parameter Syntax

$result = $client->cancelSubscription([
    'appId' => '<string>', // REQUIRED
    'effectiveAt' => <integer || string || DateTime>, // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

effectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The subscription's current effective time, as returned by GetSubscription, used as an optimistic-concurrency check. If GetSubscription returns a pending change, pass pendingChange.effectiveAt; otherwise pass subscription.effectiveAt. This value does not choose when the cancellation takes effect: a new cancellation takes effect at the end of the current billing period, returned as cancellationEffectiveAt. If the subscription's effective time has changed since you read it (for example, because another plan change was made), the value no longer matches and the request fails with ConflictException; call GetSubscription again and retry with the new value. If the subscription is already cancelled or a cancellation is already scheduled, the request returns its current state and does not compare this value.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

userId
Required: Yes
Type: string

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'cancellationEffectiveAt' => <DateTime>,
    'subscription' => [
        'appId' => '<string>',
        'billingAnchorDate' => <DateTime>,
        'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
        'effectiveAt' => <DateTime>,
        'planId' => '<string>',
        'userId' => '<string>',
    ],
]

Result Details

Members
cancellationEffectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the cancellation takes effect, at the end of the current billing period. The subscription remains active until this time.

subscription
Required: Yes
Type: Subscription structure

The subscription as it stands after the cancellation is scheduled.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

CreateApp

$result = $client->createApp([/* ... */]);
$promise = $client->createAppAsync([/* ... */]);

Creates an app. AWS App Monetization assigns a unique app identifier. This operation is idempotent: a repeated request with the same clientToken returns the app created by the original request.

Parameter Syntax

$result = $client->createApp([
    'clientToken' => '<string>',
    'costTracking' => [
        'roleArn' => '<string>', // REQUIRED
    ],
    'description' => '<string>',
    'name' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

costTracking
Type: CostTrackingConfiguration structure

Optional cost-tracking configuration: the IAM role AWS App Monetization uses to track this app's AWS costs. To pass a role, you must have permission for iam:PassRole on it.

description
Type: string

A longer description of what the app does.

name
Required: Yes
Type: string

A human-readable display name for the app.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Optional tags to add to the app when it is created. To add tags when you create the app, you must also have permission for appmonetization:TagResource.

Result Syntax

[
    'app' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'description' => '<string>',
        'name' => '<string>',
        'status' => 'ACTIVE|DELETED',
    ],
]

Result Details

Members
app
Required: Yes
Type: App structure

The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

IdempotencyConflictException:

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ThrottlingException:

The request was denied due to request throttling.

CreateAppPaymentRegistration

$result = $client->createAppPaymentRegistration([/* ... */]);
$promise = $client->createAppPaymentRegistrationAsync([/* ... */]);

Creates a hosted URL that an app owner uses to register payment and tax details.

Parameter Syntax

$result = $client->createAppPaymentRegistration([
    'appId' => '<string>', // REQUIRED
    'businessType' => 'INDIVIDUAL|REGISTERED_BUSINESS',
    'clientToken' => '<string>',
    'developerAddress' => [
        'city' => '<string>', // REQUIRED
        'country' => '<string>', // REQUIRED
        'postalCode' => '<string>', // REQUIRED
        'state' => '<string>', // REQUIRED
        'street1' => '<string>', // REQUIRED
        'street2' => '<string>',
    ],
    'displayName' => '<string>',
    'email' => '<string>',
    'invoiceLogo' => <string || resource || Psr\Http\Message\StreamInterface>,
    'legalName' => '<string>',
    'refreshUrl' => '<string>', // REQUIRED
    'returnUrl' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'supportEmail' => '<string>',
    'supportPhone' => '<string>',
    'taxRegistrationNumber' => '<string>',
    'taxRegistrations' => [
        [
            'collectionType' => '<string>', // REQUIRED
            'countryCode' => '<string>', // REQUIRED
            'locality' => '<string>',
            'registrationId' => '<string>',
            'registrationType' => 'SALES_USE|RETAIL_DELIVERY_FEE|VAT|VAT_OSS|VAT_IOSS|GST|FEDERAL_EIN|CPF|CNPJ|SST|TIN|NIP|NPWP|NCID',
            'state' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app being registered for payment.

businessType
Type: string

Whether the seller is an individual or a registered business.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time.

developerAddress
Type: DeveloperAddress structure

Your business address.

displayName
Type: string

Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.

email
Type: string

Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.

invoiceLogo
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.

legalName
Type: string

Your registered legal name.

refreshUrl
Required: Yes
Type: string

The URL the seller's browser is redirected to if the hosted registration session expires.

returnUrl
Required: Yes
Type: string

The URL the seller's browser is redirected to after completing hosted registration.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

supportEmail
Type: string

Your support email address, displayed in the invoice footer.

supportPhone
Type: string

Customer-facing support phone number shown to buyers on invoices.

taxRegistrationNumber
Type: string

Your tax registration number (for example, VAT, GST, or EIN).

taxRegistrations
Type: Array of TaxRegistration structures

The jurisdictions where the seller is registered to collect tax.

Result Syntax

[
    'expiresAt' => <DateTime>,
    'registrationUrl' => '<string>',
]

Result Details

Members
expiresAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the registration URL expires.

registrationUrl
Required: Yes
Type: string

The hosted URL the seller opens to finish entering payment and tax details.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

CreateBillingPortalSession

$result = $client->createBillingPortalSession([/* ... */]);
$promise = $client->createBillingPortalSessionAsync([/* ... */]);

Opens the AWS App Monetization hosted customer billing portal for a user. This operation returns the billing portal URL that your application redirects the user's browser to. No state is persisted.

Parameter Syntax

$result = $client->createBillingPortalSession([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'refreshUrl' => '<string>', // REQUIRED
    'returnUrl' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'sessionDurationSeconds' => <integer>,
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the portal is for.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

refreshUrl
Required: Yes
Type: string

A URL in your app. A plan checkout started from the portal doesn't redirect here: if the buyer cancels, they return to the portal's plans page. Bound into the session alongside returnUrl.

returnUrl
Required: Yes
Type: string

A URL in your app. A plan checkout started from the portal doesn't redirect here: after payment, the buyer returns to the portal's My subscription page. Bound into the session and reused for every checkout the buyer launches from the portal.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

sessionDurationSeconds
Type: int

The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long billingPortalUrl works; see expiresAt.

userId
Required: Yes
Type: string

The ID of the end user the portal is for. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'billingPortalUrl' => '<string>',
    'expiresAt' => <DateTime>,
    'manageToken' => '<string>',
    'sessionToken' => '<string>',
]

Result Details

Members
billingPortalUrl
Required: Yes
Type: string

The URL of the billing portal page to redirect the end user's browser to. The URL carries a short-lived session token or a single-use link in its fragment. The link works once, until expiresAt or the end of the session if sooner.

expiresAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the single-use link in billingPortalUrl expires, 10 minutes after it was created. After this time the URL no longer works and you must create a new session.

manageToken
Type: string

A short-lived token that authorizes updates to the buyer profile from the billing portal. Returned only with sessionToken.

sessionToken
Type: string

The billing portal session token carried in the fragment of billingPortalUrl. Absent when billingPortalUrl carries a single-use link instead.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

CreateMetric

$result = $client->createMetric([/* ... */]);
$promise = $client->createMetricAsync([/* ... */]);

Creates a usage metric definition for an app. A metric beyond the Metrics per app quota is refused with ServiceQuotaExceededException.

Parameter Syntax

$result = $client->createMetric([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'definition' => [ // REQUIRED
        'filters' => [ // REQUIRED
            [
                'field' => '<string>', // REQUIRED
                'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN', // REQUIRED
                'values' => ['<string>', ...], // REQUIRED
            ],
            // ...
        ],
        'function' => 'SUM|COUNT|MAX', // REQUIRED
        'functionField' => '<string>',
        'groupBy' => ['<string>', ...], // REQUIRED
        'period' => 'MONTHLY', // REQUIRED
    ],
    'description' => '<string>', // REQUIRED
    'eventType' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'unitName' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the metric belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

definition
Required: Yes
Type: MetricDefinition structure

The aggregation definition: filters, aggregation function, grouping, and period.

description
Required: Yes
Type: string

A description of what the metric measures.

eventType
Required: Yes
Type: string

The event type this metric aggregates. Must match the eventType sent on PutEvent.

name
Required: Yes
Type: string

A human-readable display name for the metric (for example, Riddles Solved).

tags
Type: Associative array of custom strings keys (TagKey) to strings

Optional tags to add to the metric when it is created. Tagging on create also requires permission for appmonetization:TagResource.

unitName
Required: Yes
Type: string

The unit of measure for the metric (for example, "requests" or "tokens").

Result Syntax

[
    'metric' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'filters' => [
                [
                    'field' => '<string>',
                    'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN',
                    'values' => ['<string>', ...],
                ],
                // ...
            ],
            'function' => 'SUM|COUNT|MAX',
            'functionField' => '<string>',
            'groupBy' => ['<string>', ...],
            'period' => 'MONTHLY',
        ],
        'description' => '<string>',
        'eventType' => '<string>',
        'metricId' => '<string>',
        'name' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'unitName' => '<string>',
    ],
]

Result Details

Members
metric
Required: Yes
Type: Metric structure

The newly created metric, in the app's draft. It goes live on the next app-level PublishDraft.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

IdempotencyConflictException:

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

CreateOneTimeCheckoutSession

$result = $client->createOneTimeCheckoutSession([/* ... */]);
$promise = $client->createOneTimeCheckoutSessionAsync([/* ... */]);

Creates a checkout session for a one-time purchase of usage packs or add-ons against the user's current subscription, or against the app when the user has no subscription. A one-time purchase always requires payment, so the response returns a checkout URL and a checkout session identifier. To subscribe a user to a plan or change the user's plan, use CreateSubscriptionCheckoutSession.

Parameter Syntax

$result = $client->createOneTimeCheckoutSession([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'items' => [ // REQUIRED
        [
            'oneTimePriceId' => '<string>', // REQUIRED
            'quantity' => <integer>,
        ],
        // ...
    ],
    'returnUrl' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the purchase is for.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

items
Required: Yes
Type: Array of CheckoutItem structures

The purchasables to buy. Each line is a usage pack or add-on and the number of units to buy.

returnUrl
Required: Yes
Type: string

The URL the buyer's browser is sent to after they complete payment at checkout (the checkout page's success-redirect target). A one-time purchase always requires payment, so there is no cancel-redirect field on this operation.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

userId
Required: Yes
Type: string

The ID of the end user making the purchase. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'checkoutSessionId' => '<string>',
    'checkoutUrl' => '<string>',
    'expiresAt' => <DateTime>,
]

Result Details

Members
checkoutSessionId
Required: Yes
Type: string

The ID of the created checkout session.

checkoutUrl
Required: Yes
Type: string

An absolute HTTP or HTTPS URL the buyer's browser is redirected to in order to complete payment.

expiresAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the checkout session expires.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceUnavailableException:

The service is temporarily unavailable. Retry the request after the time in retryAfterSeconds.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

CreateOneTimePrice

$result = $client->createOneTimePrice([/* ... */]);
$promise = $client->createOneTimePriceAsync([/* ... */]);

Creates a one-time price for an app. The one-time price exists on the draft (DRAFT) offering until published.

Parameter Syntax

$result = $client->createOneTimePrice([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'definition' => [ // REQUIRED
        'capacity' => <integer>, // REQUIRED
        'metricId' => '<string>', // REQUIRED
        'name' => '<string>', // REQUIRED
        'price' => [ // REQUIRED
            'amount' => '<string>', // REQUIRED
            'currencyCode' => '<string>', // REQUIRED
        ],
    ],
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the one-time price belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

definition
Required: Yes
Type: OneTimePriceDefinition structure

The definition of the one-time price to create, including its display name, price, metric, and credited capacity.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Optional tags to add to the one-time price when it is created. Tagging on create also requires permission for appmonetization:TagResource.

Result Syntax

[
    'oneTimePrice' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'capacity' => <integer>,
            'metricId' => '<string>',
            'name' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
        ],
        'oneTimePriceId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
    ],
]

Result Details

Members
oneTimePrice
Required: Yes
Type: OneTimePrice structure

The newly created one-time price.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

IdempotencyConflictException:

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

CreatePlan

$result = $client->createPlan([/* ... */]);
$promise = $client->createPlanAsync([/* ... */]);

Creates a pricing plan for an app. The plan's identifier is not supplied in the request; AWS App Monetization mints a server-generated planId and returns it on the created plan. The new plan exists on the draft (DRAFT) offering until it is published with PublishDraft.

Parameter Syntax

$result = $client->createPlan([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'definition' => [ // REQUIRED
        'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME', // REQUIRED
        'description' => '<string>',
        'includedQuotas' => [
            '<MetricId>' => [
                'flat' => [
                    'includedQuantity' => <integer>, // REQUIRED
                    'maxQuantity' => <integer>,
                    'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                    'overagePrice' => [
                        'amount' => '<string>', // REQUIRED
                        'currencyCode' => '<string>', // REQUIRED
                    ],
                    'tieredOverage' => [
                        'semantics' => 'GRADUATED|VOLUME', // REQUIRED
                        'tiers' => [ // REQUIRED
                            [
                                'firstUnit' => <integer>, // REQUIRED
                                'lastUnit' => <integer>,
                                'unitPrice' => [ // REQUIRED
                                    'amount' => '<string>', // REQUIRED
                                    'currencyCode' => '<string>', // REQUIRED
                                ],
                            ],
                            // ...
                        ],
                    ],
                ],
                'tiered' => [
                    'includedQuantity' => <integer>, // REQUIRED
                    'maxQuantity' => <integer>,
                    'tieredPrice' => [ // REQUIRED
                        'semantics' => 'GRADUATED|VOLUME', // REQUIRED
                        'tiers' => [ // REQUIRED
                            [
                                'firstUnit' => <integer>, // REQUIRED
                                'lastUnit' => <integer>,
                                'unitPrice' => [ // REQUIRED
                                    'amount' => '<string>', // REQUIRED
                                    'currencyCode' => '<string>', // REQUIRED
                                ],
                            ],
                            // ...
                        ],
                    ],
                ],
            ],
            // ...
        ],
        'name' => '<string>', // REQUIRED
        'paymentFailurePolicy' => [
            'downgradeToPlanId' => '<string>',
            'retryAttempts' => <integer>,
            'retryWindowDays' => <integer>,
        ],
        'subscriptionPrice' => [ // REQUIRED
            'amount' => '<string>', // REQUIRED
            'currencyCode' => '<string>', // REQUIRED
        ],
        'taxCode' => '<string>',
    ],
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the plan belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

definition
Required: Yes
Type: PlanDefinition structure

The pricing and packaging definition for the plan. The plan's identifier is not supplied here: CreatePlan mints a server-generated planId and returns it on the created plan.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Optional tags to add to the plan when it is created. Tagging on create also requires permission for appmonetization:TagResource.

Result Syntax

[
    'plan' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'definition' => [
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'description' => '<string>',
            'includedQuotas' => [
                '<MetricId>' => [
                    'flat' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                        'overagePrice' => [
                            'amount' => '<string>',
                            'currencyCode' => '<string>',
                        ],
                        'tieredOverage' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                    'tiered' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'tieredPrice' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                ],
                // ...
            ],
            'name' => '<string>',
            'paymentFailurePolicy' => [
                'downgradeToPlanId' => '<string>',
                'retryAttempts' => <integer>,
                'retryWindowDays' => <integer>,
            ],
            'subscriptionPrice' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'taxCode' => '<string>',
        ],
        'planId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
plan
Required: Yes
Type: Plan structure

The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

IdempotencyConflictException:

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

CreateSubscriptionCheckoutSession

$result = $client->createSubscriptionCheckoutSession([/* ... */]);
$promise = $client->createSubscriptionCheckoutSessionAsync([/* ... */]);

Subscribes a user to a plan or changes the user's current plan. The response returns exactly one outcome: payment is required (a checkout URL is returned), payment is not required (an effective date is returned), or, when no plan identifier is provided, plan selection is required (the hosted pricing page URL is returned). To make a one-time purchase of usage packs or add-ons, use CreateOneTimeCheckoutSession.

Parameter Syntax

$result = $client->createSubscriptionCheckoutSession([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'planId' => '<string>',
    'refreshUrl' => '<string>', // REQUIRED
    'returnUrl' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'sessionDurationSeconds' => <integer>,
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the subscription is for.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

planId
Type: string

The plan to subscribe to or change to. Absent to open the hosted pricing page for the buyer to choose; the response then carries planSelectionRequired.pricingUrl.

refreshUrl
Required: Yes
Type: string

The URL the buyer's browser is sent to if they cancel or abandon the hosted checkout page without completing payment (the checkout page's cancel-redirect target). Point it at a page where the buyer can retry. If you omit planId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.

returnUrl
Required: Yes
Type: string

The URL the buyer's browser is sent to after they complete payment at checkout. If the buyer is sent to a hosted checkout page, this is that page's success-redirect target. If you omit planId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

sessionDurationSeconds
Type: int

The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long pricingUrl works; see expiresAt.

userId
Required: Yes
Type: string

The ID of the end user being subscribed. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'outcome' => [
        'paymentNotRequired' => [
            'effectiveAt' => <DateTime>,
        ],
        'paymentRequired' => [
            'checkoutUrl' => '<string>',
            'expiresAt' => <DateTime>,
        ],
        'planSelectionRequired' => [
            'expiresAt' => <DateTime>,
            'pricingUrl' => '<string>',
            'sessionToken' => '<string>',
        ],
    ],
]

Result Details

Members
outcome
Required: Yes
Type: CheckoutOutcome structure

The outcome of the request. Exactly one member of the union is set.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceUnavailableException:

The service is temporarily unavailable. Retry the request after the time in retryAfterSeconds.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

DeleteApp

$result = $client->deleteApp([/* ... */]);
$promise = $client->deleteAppAsync([/* ... */]);

Deletes an app. If the app's published offering still has plans or metrics, the request fails with a ConflictException. Deleting an app that no longer exists returns a ResourceNotFoundException.

Parameter Syntax

$result = $client->deleteApp([
    'appId' => '<string>', // REQUIRED
    'identifier' => '<string>',
    'scope' => 'sandbox|live',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app to delete. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.

identifier
Type: string

The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app's sandbox; if you also send scope, the two must name the same environment.

scope
Type: string

The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.

Result Syntax

[
    'appId' => '<string>',
    'arn' => '<string>',
    'status' => 'ACTIVE|DELETED',
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the deleted app.

arn
Type: string

The resource ARN of the deleted app.

status
Required: Yes
Type: string

The resource status after deletion.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

DeleteOneTimePrice

$result = $client->deleteOneTimePrice([/* ... */]);
$promise = $client->deleteOneTimePriceAsync([/* ... */]);

Deletes a one-time price from an app. This operation is idempotent.

Parameter Syntax

$result = $client->deleteOneTimePrice([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'oneTimePriceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the one-time price belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

oneTimePriceId
Required: Yes
Type: string

The ID of the one-time price to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

DeleteThirdPartyCost

$result = $client->deleteThirdPartyCost([/* ... */]);
$promise = $client->deleteThirdPartyCostAsync([/* ... */]);

Removes a third-party cost. This operation is idempotent: removing a cost that is already absent still succeeds. A missing or unauthorized parent app returns a ResourceNotFoundException.

Parameter Syntax

$result = $client->deleteThirdPartyCost([
    'appId' => '<string>', // REQUIRED
    'costId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

costId
Required: Yes
Type: string

The ID of the cost to remove.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetApp

$result = $client->getApp([/* ... */]);
$promise = $client->getAppAsync([/* ... */]);

Returns the details of an app.

Parameter Syntax

$result = $client->getApp([
    'appId' => '<string>', // REQUIRED
    'identifier' => '<string>',
    'scope' => 'sandbox|live',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app to read. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.

identifier
Type: string

The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app's sandbox; if you also send scope, the two must name the same environment.

scope
Type: string

The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.

Result Syntax

[
    'app' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'description' => '<string>',
        'name' => '<string>',
        'status' => 'ACTIVE|DELETED',
    ],
]

Result Details

Members
app
Required: Yes
Type: App structure

The requested app.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetAppInfraCostSummary

$result = $client->getAppInfraCostSummary([/* ... */]);
$promise = $client->getAppInfraCostSummaryAsync([/* ... */]);

Returns infrastructure cost for an app, grouped by service (the default), user, or time. To use this operation, you must also have permission for ce:GetCostAndUsage on your primary billing view.

Parameter Syntax

$result = $client->getAppInfraCostSummary([
    'appId' => '<string>', // REQUIRED
    'costType' => 'ESTIMATE|ACTUAL', // REQUIRED
    'endedAt' => <integer || string || DateTime>, // REQUIRED
    'filterBy' => [
        '<InfraCostSummaryDimension>' => ['<string>', ...],
        // ...
    ],
    'groupBy' => 'SERVICE|USER|TIME',
    'scope' => 'sandbox|live', // REQUIRED
    'startedAt' => <integer || string || DateTime>, // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

costType
Required: Yes
Type: string

Specifies which cost data to return.

endedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End of the reporting window. Must be after startedAt, at most 720 hours after it, and not in the future.

filterBy
Type: Associative array of custom strings keys (InfraCostSummaryDimension) to stringss

Filter constraints keyed by dimension. A filter dimension may differ from groupBy.

groupBy
Type: string

The breakdown dimension. Defaults to SERVICE when omitted.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

startedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Start of the reporting window.

Result Syntax

[
    'appId' => '<string>',
    'costType' => 'ESTIMATE|ACTUAL',
    'currency' => 'USD',
    'endedAt' => <DateTime>,
    'groupBy' => 'SERVICE|USER|TIME',
    'groups' => [
        [
            'cost' => '<string>',
            'key' => '<string>',
        ],
        // ...
    ],
    'startedAt' => <DateTime>,
    'total' => '<string>',
    'updatedAt' => <DateTime>,
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app.

costType
Required: Yes
Type: string

The cost data that this summary reflects (echoes the request).

currency
Required: Yes
Type: string

The ISO 4217 currency code of the cost amounts.

endedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End of the reporting window the summary covers.

groupBy
Required: Yes
Type: string

The dimension that the summary is grouped by.

groups
Required: Yes
Type: Array of CostGroup structures

One row per value of the groupBy dimension (cost per service, user, or UTC day).

startedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Start of the reporting window the summary covers.

total
Required: Yes
Type: string

The total cost for the window.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the summary was last updated.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetAppPaymentRegistration

$result = $client->getAppPaymentRegistration([/* ... */]);
$promise = $client->getAppPaymentRegistrationAsync([/* ... */]);

Returns the current payment registration status and seller profile for an app.

Parameter Syntax

$result = $client->getAppPaymentRegistration([
    'appId' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

Result Syntax

[
    'appPaymentRegistration' => [
        'additionalAppEligibility' => 'ELIGIBLE|ONBOARDING_INCOMPLETE|IDENTITY_PENDING|REGISTRATION_FAILED',
        'appId' => '<string>',
        'businessType' => 'INDIVIDUAL|REGISTERED_BUSINESS',
        'createdAt' => <DateTime>,
        'developerAddress' => [
            'city' => '<string>',
            'country' => '<string>',
            'postalCode' => '<string>',
            'state' => '<string>',
            'street1' => '<string>',
            'street2' => '<string>',
        ],
        'displayName' => '<string>',
        'email' => '<string>',
        'legalName' => '<string>',
        'paymentRegistrationId' => '<string>',
        'paymentRegistrationStatus' => 'ACTIVE|PENDING|FAILED',
        'status' => 'ACTIVE|PENDING|FAILED',
        'supportEmail' => '<string>',
        'supportPhone' => '<string>',
        'taxRegistrationNumber' => '<string>',
        'taxRegistrations' => [
            [
                'collectionType' => '<string>',
                'countryCode' => '<string>',
                'locality' => '<string>',
                'registrationId' => '<string>',
                'registrationType' => 'SALES_USE|RETAIL_DELIVERY_FEE|VAT|VAT_OSS|VAT_IOSS|GST|FEDERAL_EIN|CPF|CNPJ|SST|TIN|NIP|NPWP|NCID',
                'state' => '<string>',
            ],
            // ...
        ],
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
appPaymentRegistration
Required: Yes
Type: AppPaymentRegistration structure

The app's current payment registration.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetAppRevenueSummary

$result = $client->getAppRevenueSummary([/* ... */]);
$promise = $client->getAppRevenueSummaryAsync([/* ... */]);

Returns billed revenue for an app for a billing period, grouped by plan.

Parameter Syntax

$result = $client->getAppRevenueSummary([
    'appId' => '<string>', // REQUIRED
    'filterBy' => [
        '<RevenueSummaryDimension>' => ['<string>', ...],
        // ...
    ],
    'groupBy' => 'PLAN',
    'period' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

filterBy
Type: Associative array of custom strings keys (RevenueSummaryDimension) to stringss

Filter constraints keyed by dimension. A filter dimension may differ from groupBy.

groupBy
Type: string

The breakdown dimension. Defaults to PLAN when omitted.

period
Type: string

The billing period, in "YYYY-MM" form. Defaults to the current month when omitted.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

Result Syntax

[
    'appId' => '<string>',
    'currency' => 'USD',
    'groupBy' => 'PLAN',
    'groups' => [
        [
            'key' => '<string>',
            'subscriptionRevenue' => '<string>',
            'totalRevenue' => '<string>',
            'usageRevenue' => '<string>',
            'users' => <integer>,
        ],
        // ...
    ],
    'period' => '<string>',
    'subscriptionRevenue' => '<string>',
    'totalRevenue' => '<string>',
    'updatedAt' => <DateTime>,
    'usageRevenue' => '<string>',
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app.

currency
Required: Yes
Type: string

The ISO 4217 currency code of the revenue amounts.

groupBy
Required: Yes
Type: string

The dimension that the summary is grouped by.

groups
Required: Yes
Type: Array of RevenueGroup structures

One row per value of the groupBy dimension (revenue per plan).

period
Required: Yes
Type: string

The billing period, in "YYYY-MM" form, that the summary covers.

subscriptionRevenue
Required: Yes
Type: string

The subscription revenue for the period.

totalRevenue
Required: Yes
Type: string

The total revenue for the period, as the sum of subscription and usage revenue.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the summary was last updated.

usageRevenue
Required: Yes
Type: string

The usage-based revenue for the period.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetAppSubscriptionSummary

$result = $client->getAppSubscriptionSummary([/* ... */]);
$promise = $client->getAppSubscriptionSummaryAsync([/* ... */]);

Returns subscription counts for an app, grouped by status (the default) or by plan. The summary contains no subscriber personally identifiable information.

Parameter Syntax

$result = $client->getAppSubscriptionSummary([
    'appId' => '<string>', // REQUIRED
    'filterBy' => [
        '<SubscriptionSummaryDimension>' => ['<string>', ...],
        // ...
    ],
    'groupBy' => 'STATUS|PLAN',
    'scope' => 'sandbox|live', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

filterBy
Type: Associative array of custom strings keys (SubscriptionSummaryDimension) to stringss

Filter constraints keyed by dimension. A filter dimension may differ from groupBy.

groupBy
Type: string

The breakdown dimension. Defaults to STATUS when omitted.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

Result Syntax

[
    'appId' => '<string>',
    'groupBy' => 'STATUS|PLAN',
    'groups' => [
        [
            'count' => <integer>,
            'key' => '<string>',
        ],
        // ...
    ],
    'totalSubscribers' => <integer>,
    'updatedAt' => <DateTime>,
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app.

groupBy
Required: Yes
Type: string

The dimension that the summary is grouped by.

groups
Required: Yes
Type: Array of SubscriptionGroup structures

One row per value of the groupBy dimension (subscriber count per status or per plan).

totalSubscribers
Required: Yes
Type: int

The total number of subscribers across the app.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the summary was last updated.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetAppUsageSummary

$result = $client->getAppUsageSummary([/* ... */]);
$promise = $client->getAppUsageSummaryAsync([/* ... */]);

Returns usage for an app, grouped by metric (the default), user, or time.

Parameter Syntax

$result = $client->getAppUsageSummary([
    'appId' => '<string>', // REQUIRED
    'endedAt' => <integer || string || DateTime>, // REQUIRED
    'filterBy' => [
        '<UsageSummaryDimension>' => ['<string>', ...],
        // ...
    ],
    'groupBy' => 'METRIC|USER|TIME',
    'scope' => 'sandbox|live', // REQUIRED
    'startedAt' => <integer || string || DateTime>, // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

endedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End of the reporting window. Must be after startedAt, at most 720 hours after it, and not in the future.

filterBy
Type: Associative array of custom strings keys (UsageSummaryDimension) to stringss

Filter constraints keyed by dimension. A filter dimension may differ from groupBy.

groupBy
Type: string

The breakdown dimension. Defaults to METRIC when omitted.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

startedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Start of the reporting window.

Result Syntax

[
    'appId' => '<string>',
    'endedAt' => <DateTime>,
    'groupBy' => 'METRIC|USER|TIME',
    'groups' => [
        [
            'key' => '<string>',
            'metricName' => '<string>',
            'usage' => <integer>,
        ],
        // ...
    ],
    'startedAt' => <DateTime>,
    'totalEvents' => <integer>,
    'updatedAt' => <DateTime>,
]

Result Details

Members
appId
Required: Yes
Type: string

The ID of the app.

endedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End of the reporting window the summary covers.

groupBy
Required: Yes
Type: string

The dimension that the summary is grouped by.

groups
Required: Yes
Type: Array of UsageGroup structures

One row per value of the groupBy dimension (usage per metric, user, or UTC day).

startedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Start of the reporting window the summary covers.

totalEvents
Required: Yes
Type: long (int|float)

The total number of usage events counted across the window.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the summary was last updated.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetEntitlementDecision

$result = $client->getEntitlementDecision([/* ... */]);
$promise = $client->getEntitlementDecisionAsync([/* ... */]);

Returns an entitlement decision for a user action, indicating whether the action is allowed and why. It takes the pending event's quantity and properties so the check sizes the decision per metric the way PutEvent counts the event: it applies each metric's filter to the properties, counts 1 for a COUNT metric, and reads the summed or maxed field value for a SUM or MAX metric. The decision is DENY when usage already reached the limit, or when folding this event in would push it past (a SUM or COUNT metric adds the increment to current usage, a MAX metric takes the larger of the two). Send the same eventType, quantity and properties you will send on the event: the check applies the rules PutEvent applies to that event. A SUM or MAX metric that reads a property rejects the check with a ValidationException when the property is missing or not a plain decimal, including when properties are omitted or sent as {}; a metric filter matches only properties that are present, so a filtered metric is skipped for an event with no properties, as PutEvent skips it. It is idempotent, and it may create the user's default-plan subscription on first use.

Parameter Syntax

$result = $client->getEntitlementDecision([
    'appId' => '<string>', // REQUIRED
    'eventType' => '<string>', // REQUIRED
    'properties' => ['<string>', ...],
    'quantity' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

eventType
Required: Yes
Type: string

The type of action the user is attempting, used to determine the applicable plan capability and quota. Use the same event type you will send on the event.

properties
Type: Associative array of custom strings keys (PropertyKey) to strings

The same event properties you will send on the event. Each metric's filter is applied to them, and a summed or maxed field value is read from them. Omit them or send {} when the event has none; a metric that sums or maxes a property then rejects the check, as PutEvent rejects the event. Do not include personally identifiable or otherwise sensitive data in these values.

quantity
Required: Yes
Type: string

The number of units the pending action will consume, as a non-negative decimal string (the same Quantity shape PutEvent uses). Send the real amount if known, otherwise your best upper estimate (for example a request's max tokens). Used when a metric counts events or sums or maxes the event quantity itself. The decision is DENY when usage already reached the limit, or when folding this event in would push it past (SUM and COUNT add the increment; MAX takes the larger of current usage and the increment).

scope
Required: Yes
Type: string

The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app's isolated test environment.

userId
Required: Yes
Type: string

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'decision' => 'ALLOW|DENY',
    'metrics' => [
        [
            'includedQuantity' => <integer>,
            'metricId' => '<string>',
            'remainingQuantity' => <integer>,
            'usedQuantity' => <integer>,
        ],
        // ...
    ],
    'planId' => '<string>',
    'reason' => [
        'category' => 'CAPABILITY|USAGE|SYSTEM',
        'code' => 'ALLOWED|WITHIN_QUOTA|NO_QUOTA_RESTRICTION|OVERAGE_ACCRUING|SERVICE_DEGRADED|PAYMENT_PAST_DUE|COVERED_BY_PURCHASED_UNITS|NO_SUBSCRIPTION|SUBSCRIPTION_INACTIVE|CAPABILITY_NOT_INCLUDED|QUOTA_EXCEEDED|SUBSCRIPTION_SUSPENDED|OUT_OF_UNITS',
    ],
]

Result Details

Members
decision
Required: Yes
Type: string

The decision indicating whether the user may perform the action.

metrics
Type: Array of EntitlementMetricStatus structures

The per-metric quota status relevant to the decision.

planId
Type: string

The ID of the plan the decision was evaluated against, when the user has a subscription.

reason
Required: Yes
Type: EntitlementReason structure

The reason behind the decision.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetMetric

$result = $client->getMetric([/* ... */]);
$promise = $client->getMetricAsync([/* ... */]);

Returns the details of a metric.

Parameter Syntax

$result = $client->getMetric([
    'appId' => '<string>', // REQUIRED
    'metricId' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'stage' => 'DRAFT|PUBLISHED',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

metricId
Required: Yes
Type: string

The ID of the metric to retrieve.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft.

stage
Type: string

The offering stage to read the metric from: DRAFT (the latest draft) or PUBLISHED (the offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.

Result Syntax

[
    'metric' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'filters' => [
                [
                    'field' => '<string>',
                    'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN',
                    'values' => ['<string>', ...],
                ],
                // ...
            ],
            'function' => 'SUM|COUNT|MAX',
            'functionField' => '<string>',
            'groupBy' => ['<string>', ...],
            'period' => 'MONTHLY',
        ],
        'description' => '<string>',
        'eventType' => '<string>',
        'metricId' => '<string>',
        'name' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'unitName' => '<string>',
    ],
]

Result Details

Members
metric
Required: Yes
Type: Metric structure

The requested metric.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetMetricUsage

$result = $client->getMetricUsage([/* ... */]);
$promise = $client->getMetricUsageAsync([/* ... */]);

Returns a user's raw per-metric usage over a caller-supplied window. Usage is aggregated by event time with each metric's aggregation function: summed or counted, or the largest value for a MAX metric, in the environment the scope selects (the live app or its sandbox). It returns usage only: it does not resolve the user's plan, apply quota, or attribute usage to a plan. Combine it with GetSubscriptionHistory to compute charges for each plan the user was on, or compare it against a plan's allowance to make an entitlement decision.

Usage is read at hour resolution: startedAt is floored to its hour and endedAt is rounded up to the next hour boundary, so the window read can be wider than the requested one.

Paginated over the app's metric set: one page of per-metric usage per call, continued with nextToken. The window is fixed across a pagination sequence.

Parameter Syntax

$result = $client->getMetricUsage([
    'appId' => '<string>', // REQUIRED
    'endedAt' => <integer || string || DateTime>, // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'startedAt' => <integer || string || DateTime>, // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

endedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Exclusive end of the reporting window. Must be after startedAt; the window may span at most 744 hours (31 days, the longest monthly billing period). Must not be in the future beyond a small clock-skew allowance.

maxResults
Type: int

Maximum number of per-metric usage entries to return in this page (1-25, default 25).

nextToken
Type: string

Opaque continuation token from a prior response. The window (startedAt/endedAt) must be unchanged across a pagination sequence.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox. sandbox reads the app's isolated test environment. Usage is kept separately per environment.

startedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Inclusive start of the reporting window (half-open [startedAt, endedAt)).

userId
Required: Yes
Type: string

The end user whose usage is read. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'nextToken' => '<string>',
    'usage' => [
        [
            'metricId' => '<string>',
            'quantity' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

Opaque continuation token. Present when more metrics remain; pass it back (with the same window) to read the next page. Absent on the last page.

usage
Required: Yes
Type: Array of MetricUsage structures

One entry per metric in this page, carrying its usage over the window. A metric with no events in the window is returned with usage = 0.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetOneTimePrice

$result = $client->getOneTimePrice([/* ... */]);
$promise = $client->getOneTimePriceAsync([/* ... */]);

Returns the details of a one-time price.

Parameter Syntax

$result = $client->getOneTimePrice([
    'appId' => '<string>', // REQUIRED
    'oneTimePriceId' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the one-time price belongs to.

oneTimePriceId
Required: Yes
Type: string

The ID of the one-time price to return.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering; sandbox reads the app's draft (what the sandbox runs).

Result Syntax

[
    'oneTimePrice' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'capacity' => <integer>,
            'metricId' => '<string>',
            'name' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
        ],
        'oneTimePriceId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
    ],
]

Result Details

Members
oneTimePrice
Required: Yes
Type: OneTimePrice structure

The requested one-time price.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetPlan

$result = $client->getPlan([/* ... */]);
$promise = $client->getPlanAsync([/* ... */]);

Returns the details of a plan.

Parameter Syntax

$result = $client->getPlan([
    'appId' => '<string>', // REQUIRED
    'planId' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'stage' => 'DRAFT|PUBLISHED',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

planId
Required: Yes
Type: string

The identifier of the plan. AWS App Monetization generates this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

stage
Type: string

The offering stage to read the plan from: DRAFT (the latest draft) or PUBLISHED (the offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.

Result Syntax

[
    'plan' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'definition' => [
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'description' => '<string>',
            'includedQuotas' => [
                '<MetricId>' => [
                    'flat' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                        'overagePrice' => [
                            'amount' => '<string>',
                            'currencyCode' => '<string>',
                        ],
                        'tieredOverage' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                    'tiered' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'tieredPrice' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                ],
                // ...
            ],
            'name' => '<string>',
            'paymentFailurePolicy' => [
                'downgradeToPlanId' => '<string>',
                'retryAttempts' => <integer>,
                'retryWindowDays' => <integer>,
            ],
            'subscriptionPrice' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'taxCode' => '<string>',
        ],
        'planId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
plan
Required: Yes
Type: Plan structure

The requested plan.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetPlanRecommendation

$result = $client->getPlanRecommendation([/* ... */]);
$promise = $client->getPlanRecommendationAsync([/* ... */]);

Returns a recommended pricing model and plan set for an app, calculated from the billable actions, costs, customer types, alternatives and preferences in the request. Built to be called by an agent working with the developer: most inputs are estimates the agent gathers from the app's code and from the developer (who the users are, what an action saves them, what it costs to serve), and each optional member's documentation says what its absence means, so send only the inputs you have a basis for. Stateless: nothing is stored, no app is required, and repeating a request returns the same recommendation unless the service has been updated in between. Every response carries the rendered texts summary and details. Smallest call (MEDIUM confidence): {"segment":"CONSUMER","appType":"DAILY_WORKFLOW","actions":[{"unitCost":0.02,"typicalMonthlyUsage":30,"valuePerUse":0.40}]}.

Parameter Syntax

$result = $client->getPlanRecommendation([
    'actions' => [ // REQUIRED
        [
            'minutesSaved' => <float>,
            'moneySaved' => <float>,
            'name' => '<string>',
            'typicalMonthlyUsage' => <float>, // REQUIRED
            'unit' => '<string>',
            'unitCost' => <float>,
            'valuePerUse' => <float>,
        ],
        // ...
    ],
    'alternatives' => [
        'comparables' => [
            [
                'cap' => <float>,
                'features' => [<float>, ...],
                'includedUnits' => <float>,
                'mechanism' => 'PAID_SUB|PER_REQUEST|FREE_CAPPED|FREEMIUM|ONE_TIME', // REQUIRED
                'name' => '<string>',
                'overageRate' => <float>,
                'price' => [ // REQUIRED
                    'amount' => '<string>', // REQUIRED
                    'currencyCode' => '<string>', // REQUIRED
                ],
                'quality' => <float>,
                'url' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'comparablesOptIn' => 'OPTED_IN|OPTED_OUT',
        'outsideOptions' => [
            [
                'features' => [<float>, ...],
                'monthlyCost' => <float>, // REQUIRED
                'name' => '<string>', // REQUIRED
                'quality' => <float>,
            ],
            // ...
        ],
    ],
    'appName' => '<string>',
    'appType' => 'INFRASTRUCTURE|DAILY_WORKFLOW|PERIODIC_WORKFLOW|POINT_UTILITY|CREATIVE|API_WRAPPER', // REQUIRED
    'context' => [
        'customerTypeDescriptions' => ['<string>', ...],
        'expectedUsersBasis' => '<string>',
        'nonAwsCostsNote' => '<string>',
        'usageSources' => ['<string>', ...],
        'valueBasis' => '<string>',
    ],
    'costs' => [
        'fixedMonthlyCost' => <float>,
        'margins' => [<float>, ...],
        'source' => 'ACTUALS|LIVE|ESTIMATE|NONE',
        'unknown' => ['<string>', ...],
    ],
    'features' => [
        'appScores' => [<float>, ...], // REQUIRED
        'weights' => [<float>, ...],
    ],
    'hourlyRate' => <float>,
    'market' => [
        'checkoutDropOff' => [
            'flat' => <float>,
            'freePlan' => <float>,
            'perUse' => <float>,
            'tiered' => <float>,
        ],
        'customerTypes' => [
            [
                'featureWeights' => [<float>, ...],
                'name' => '<string>', // REQUIRED
                'share' => <float>, // REQUIRED
                'usageMultiplier' => <float>, // REQUIRED
                'usageSpread' => 'SIMILAR|NORMAL|VARIED|EXTREME',
                'valuePerUseMultiplier' => <float>, // REQUIRED
            ],
            // ...
        ],
        'expectedUsers' => <integer>,
        'measuredConversion' => [
            'payingUsers' => <integer>, // REQUIRED
            'users' => <integer>, // REQUIRED
        ],
    ],
    'planOptions' => [
        'annualPlanInclusion' => 'INCLUDE|EXCLUDE',
        'creditPackInclusion' => 'INCLUDE|EXCLUDE',
        'freeTierInclusion' => 'INCLUDE|EXCLUDE',
        'maxTierInclusion' => 'INCLUDE|EXCLUDE',
        'planPrices' => [
            [
                'actionName' => '<string>',
                'planCode' => '<string>', // REQUIRED
                'price' => [ // REQUIRED
                    'amount' => '<string>', // REQUIRED
                    'currencyCode' => '<string>', // REQUIRED
                ],
            ],
            // ...
        ],
        'pricingModelPreference' => 'FLAT|TIERED|PER_USE|PER_USE_SPLIT',
        'publishedPrice' => [
            'amount' => '<string>', // REQUIRED
            'currencyCode' => '<string>', // REQUIRED
        ],
    ],
    'segment' => 'CONSUMER|PROSUMER|ENTERPRISE', // REQUIRED
    'valueKind' => 'PRODUCTIVITY|EXPERIENTIAL',
    'valueShare' => <float>,
]);

Parameter Details

Members
actions
Required: Yes
Type: Array of BillableAction structures

The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (minutesSaved, moneySaved or valuePerUse, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see valueKind), the price is based on cost (and comparables, if opted in, or planOptions.publishedPrice) and the confidence is LOW. Give unitCost on every action or on none.

alternatives
Type: AlternativeInputs structure

What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (comparablesOptIn OPTED_OUT) and no outside options.

appName
Type: string

Display name of the app, used in the rendered text. Absent: your app.

appType
Required: Yes
Type: string

Kind of app. It sets the service's usage and value benchmarks for this kind of app.

context
Type: RequestContext structure

Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how summary and details label and word the inputs. Absent: the rendered text uses default labels.

costs
Type: CostInputs structure

Cost inputs beyond each action's unitCost: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: costs.source is inferred from actions[].unitCost, and the costs count as complete but unconfirmed (see costs.unknown).

features
Type: FeatureScores structure

How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in alternatives is scored by features, and used only then: sent when no comparable and no outside option is scored by features, it is rejected. A comparable with alternatives.comparablesOptIn OPTED_OUT is validated but not used, so features scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its quality.

hourlyRate
Type: double

What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has minutesSaved. There is no default. It is used only with actions[].minutesSaved: sent when no action has minutesSaved, or with valueKind EXPERIENTIAL, it is rejected.

market
Type: MarketInputs structure

Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see MarketInputs).

planOptions
Type: PlanOptions structure

The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (publishedPrice). Absent: each member's default (see PlanOptions); the service chooses the pricing model and plans.

segment
Required: Yes
Type: string

Who buys the app.

valueKind
Type: string

What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of actions[].minutesSaved, actions[].moneySaved, actions[].valuePerUse, hourlyRate and valueShare that is sent is rejected. With EXPERIENTIAL, no planOptions.publishedPrice and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its appType (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no planOptions.publishedPrice and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no unitCost, or costs.source NONE; confidence LOW).

valueShare
Type: double

The most a typical customer would pay for the app, as a share of the time value it saves them (minutesSaved / 60 times hourlyRate). Above 1 when the minutes understate the value. The value of one use of an action with minutesSaved is minutesSaved / 60 times hourlyRate times the share; the share does not apply to moneySaved or valuePerUse. When an action's value is above 0, each outside option's monthlyCost is also weighed at this share (see OutsideOption). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's minutesSaved, moneySaved or valuePerUse is above 0 and, besides, an action has minutesSaved (0 counts) or an outside option's monthlyCost is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with valueKind EXPERIENTIAL.

Result Syntax

[
    'alternatives' => [
        'comparablesDropped' => [
            [
                'name' => '<string>',
                'price' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'reason' => '<string>',
            ],
            // ...
        ],
        'comparablesUsed' => ['<string>', ...],
    ],
    'analysis' => [
        'frictionAlternative' => 'FLAT|TIERED|PER_USE|PER_USE_SPLIT',
        'modelComparison' => [
            [
                'margin' => <float>,
                'monthlyProfit' => '<string>',
                'monthlyRevenue' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'paidShare' => <float>,
                'pricingModel' => 'FLAT|TIERED|PER_USE|PER_USE_SPLIT',
            ],
            // ...
        ],
        'pricingModelCaveats' => ['<string>', ...],
    ],
    'basis' => '<string>',
    'confidence' => 'HIGH|MEDIUM|LOW',
    'confidenceReason' => '<string>',
    'costs' => [
        'breakEven' => [
            'expected' => [
                'costPerPayer' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'payers' => <float>,
            ],
            'high' => [
                'costPerPayer' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'payers' => <float>,
            ],
            'low' => [
                'costPerPayer' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'payers' => <float>,
            ],
        ],
        'coverPrices' => [
            [
                'margin' => <float>,
                'price' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
            ],
            // ...
        ],
        'coverStatus' => 'MODELED|COVERED|ARITHMETIC|NOT_CHECKED',
        'impliedMargin' => <float>,
        'status' => 'COMPLETE|INCOMPLETE|NOT_CHECKED',
    ],
    'creditPacks' => [
        [
            'actionName' => '<string>',
            'name' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'quantity' => <integer>,
        ],
        // ...
    ],
    'details' => '<string>',
    'planOptions' => [
        'evaluatedPlanPrices' => [
            [
                'creditPacks' => [
                    [
                        'actionName' => '<string>',
                        'name' => '<string>',
                        'price' => [
                            'amount' => '<string>',
                            'currencyCode' => '<string>',
                        ],
                        'quantity' => <integer>,
                    ],
                    // ...
                ],
                'monthlyProfit' => '<string>',
                'paidShare' => <float>,
                'planCode' => '<string>',
                'plans' => [
                    [
                        'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
                        'downgradePlanCodes' => ['<string>', ...],
                        'includedQuotas' => [
                            [
                                'actionName' => '<string>',
                                'includedQuantity' => <integer>,
                                'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                                'overagePrice' => [
                                    'amount' => '<string>',
                                    'currencyCode' => '<string>',
                                ],
                            ],
                            // ...
                        ],
                        'name' => '<string>',
                        'planCode' => '<string>',
                        'price' => [
                            'amount' => '<string>',
                            'currencyCode' => '<string>',
                        ],
                        'upgradePlanCodes' => ['<string>', ...],
                    ],
                    // ...
                ],
                'price' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'verdict' => 'HEALTHY|THIN_MARGIN|NOT_MONETIZABLE|COST_ONLY|COST_NOT_CHECKED',
            ],
            // ...
        ],
        'freeTier' => [
            'conversion' => <float>,
            'freeUsers' => <float>,
            'monthlyCost' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'status' => 'INCLUDED|TRIAL_SUGGESTED|NOT_INCLUDED',
            'statusSource' => 'REQUESTED|SEGMENT_DEFAULT',
            'trialDays' => <integer>,
        ],
        'maxTier' => [
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'status' => 'INCLUDED|INCLUDED_AS_REQUESTED|NOT_INCLUDED',
        ],
        'preferenceOutcome' => 'HONORED|NOT_HONORED|NOT_REQUESTED',
    ],
    'plans' => [
        [
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'downgradePlanCodes' => ['<string>', ...],
            'includedQuotas' => [
                [
                    'actionName' => '<string>',
                    'includedQuantity' => <integer>,
                    'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                    'overagePrice' => [
                        'amount' => '<string>',
                        'currencyCode' => '<string>',
                    ],
                ],
                // ...
            ],
            'name' => '<string>',
            'planCode' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'upgradePlanCodes' => ['<string>', ...],
        ],
        // ...
    ],
    'pricingModel' => 'FLAT|TIERED|PER_USE|PER_USE_SPLIT',
    'recommendationVersion' => '<string>',
    'recommendedPrice' => [
        'amount' => '<string>',
        'currencyCode' => '<string>',
    ],
    'recommendedPriceRange' => [
        'high' => [
            'amount' => '<string>',
            'currencyCode' => '<string>',
        ],
        'low' => [
            'amount' => '<string>',
            'currencyCode' => '<string>',
        ],
    ],
    'summary' => '<string>',
    'unitPrices' => [
        [
            'actionName' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
        ],
        // ...
    ],
    'verdict' => 'HEALTHY|THIN_MARGIN|NOT_MONETIZABLE|COST_ONLY|COST_NOT_CHECKED',
]

Result Details

Members
alternatives
Required: Yes
Type: AlternativesOutcome structure

Which comparable apps were used and which were not.

analysis
Required: Yes
Type: PricingAnalysis structure

How the recommendation compares with other pricing models.

basis
Required: Yes
Type: string

What the price is based on: modeled demand, or, without a value estimate, cost or comparables.

confidence
Required: Yes
Type: string

Confidence in the recommendation.

confidenceReason
Required: Yes
Type: string

Why the confidence is what it is.

costs
Required: Yes
Type: CostOutcome structure

How the recommended price relates to cost to serve.

creditPacks
Required: Yes
Type: Array of RecommendedCreditPack structures

One-time credit packs sold alongside the plans. Empty unless the request's planOptions.creditPackInclusion was INCLUDE.

details
Required: Yes
Type: string

The same text as summary with a Details section on how the recommendation was worked out, for a developer who asks for details. Some figures appear only in summary and details.

planOptions
Required: Yes
Type: PlanOptionsOutcome structure

What became of the request's planOptions: the pricing-model preference, the Free and Max plans and the evaluated plan prices.

plans
Required: Yes
Type: Array of RecommendedPlan structures

The recommended plans. To create them, map each actionName to the app's metric ID.

pricingModel
Required: Yes
Type: string

The recommended pricing model. Equals the request's planOptions.pricingModelPreference when planOptions.preferenceOutcome is HONORED.

recommendationVersion
Required: Yes
Type: string

Identifies the recommendation model and benchmark data behind this answer, for support. It changes when either changes.

recommendedPrice
Type: Price structure

Recommended monthly price of the main paid plan, for FLAT and TIERED. When an annual plan is recommended, it is in plans with billingCycle ANNUAL; this is still the monthly price.

recommendedPriceRange
Type: PriceRange structure

Prices whose modeled profit is within a few percent of the best, when the profit curve is flat near its top. recommendedPrice is the middle of this range.

summary
Required: Yes
Type: string

The recommendation as text for the developer: the price, the plans, the reasons and the assumptions behind them.

unitPrices
Type: Array of UnitPrice structures

Price per use of each action, for PER_USE and PER_USE_SPLIT.

verdict
Required: Yes
Type: string

Viability verdict.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ThrottlingException:

The request was denied due to request throttling.

GetSubscription

$result = $client->getSubscription([/* ... */]);
$promise = $client->getSubscriptionAsync([/* ... */]);

Returns a user's current subscription and any pending change.

Parameter Syntax

$result = $client->getSubscription([
    'appId' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

userId
Required: Yes
Type: string

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'currentPeriodEndsAt' => <DateTime>,
    'pendingChange' => [
        'effectiveAt' => <DateTime>,
        'planId' => '<string>',
        'planName' => '<string>',
    ],
    'subscription' => [
        'appId' => '<string>',
        'billingAnchorDate' => <DateTime>,
        'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
        'effectiveAt' => <DateTime>,
        'planId' => '<string>',
        'userId' => '<string>',
    ],
]

Result Details

Members
currentPeriodEndsAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the current billing period ends and the next begins. Pending changes take effect and usage quotas reset at this time. Null for one-time subscriptions.

pendingChange
Type: PendingChange structure

The scheduled change to the subscription, if one is pending; null otherwise.

subscription
Required: Yes
Type: Subscription structure

The user's current subscription.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

GetSubscriptionHistory

$result = $client->getSubscriptionHistory([/* ... */]);
$promise = $client->getSubscriptionHistoryAsync([/* ... */]);

Returns the historical subscription records for a user. We recommend using pagination to ensure that the operation returns quickly and successfully.

Parameter Syntax

$result = $client->getSubscriptionHistory([
    'appId' => '<string>', // REQUIRED
    'effectiveAfter' => <integer || string || DateTime>,
    'effectiveBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

effectiveAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Returns records whose effectiveDate is at or after this instant (inclusive).

effectiveBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Returns records whose effectiveDate is before this instant (exclusive).

maxResults
Type: int

The maximum number of items to return in a single page.

nextToken
Type: 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
Required: Yes
Type: string

Required. The environment: live or sandbox.

userId
Required: Yes
Type: string

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'items' => [
        [
            'appId' => '<string>',
            'billingAnchorDate' => <DateTime>,
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'effectiveAt' => <DateTime>,
            'planId' => '<string>',
            'userId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of Subscription structures

The page of historical subscription records for the user.

nextToken
Type: 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.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ThrottlingException:

The request was denied due to request throttling.

GetThirdPartyCost

$result = $client->getThirdPartyCost([/* ... */]);
$promise = $client->getThirdPartyCostAsync([/* ... */]);

Returns a single third-party cost by its identifier. An unknown cost identifier returns a ResourceNotFoundException.

Parameter Syntax

$result = $client->getThirdPartyCost([
    'appId' => '<string>', // REQUIRED
    'costId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

costId
Required: Yes
Type: string

The ID of the cost to return.

Result Syntax

[
    'item' => [
        'amount' => '<string>',
        'appId' => '<string>',
        'costId' => '<string>',
        'createdAt' => <DateTime>,
        'currency' => 'USD',
        'description' => '<string>',
        'effectiveFrom' => '<string>',
        'effectiveTo' => '<string>',
        'frequency' => 'MONTHLY',
        'label' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
item
Required: Yes
Type: ThirdPartyCostItem structure

The requested third-party cost.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

ListApps

$result = $client->listApps([/* ... */]);
$promise = $client->listAppsAsync([/* ... */]);

Returns the apps owned by the caller. We recommend using pagination to ensure that the operation returns quickly and successfully.

Parameter Syntax

$result = $client->listApps([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of items to return in a single page. Valid range: 1 to 100.

nextToken
Type: 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.

Result Syntax

[
    'apps' => [
        [
            'appId' => '<string>',
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'name' => '<string>',
            'status' => 'ACTIVE|DELETED',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
apps
Required: Yes
Type: Array of App structures

The page of apps owned by the caller's account.

nextToken
Type: 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.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ThrottlingException:

The request was denied due to request throttling.

ListMetrics

$result = $client->listMetrics([/* ... */]);
$promise = $client->listMetricsAsync([/* ... */]);

Returns the metrics for an app. Returns a paginated list; we recommend using pagination to ensure that the operation returns quickly and successfully.

Parameter Syntax

$result = $client->listMetrics([
    'appId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'stage' => 'DRAFT|PUBLISHED',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

maxResults
Type: int

The maximum number of items to return in a single page. Valid range is 1 to 100.

nextToken
Type: 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
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

stage
Type: string

The offering stage to list metrics from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox. A stage with nothing published lists as empty.

Result Syntax

[
    'metrics' => [
        [
            'appId' => '<string>',
            'arn' => '<string>',
            'definition' => [
                'filters' => [
                    [
                        'field' => '<string>',
                        'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN',
                        'values' => ['<string>', ...],
                    ],
                    // ...
                ],
                'function' => 'SUM|COUNT|MAX',
                'functionField' => '<string>',
                'groupBy' => ['<string>', ...],
                'period' => 'MONTHLY',
            ],
            'description' => '<string>',
            'eventType' => '<string>',
            'metricId' => '<string>',
            'name' => '<string>',
            'stage' => 'DRAFT|PUBLISHED',
            'unitName' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
metrics
Required: Yes
Type: Array of Metric structures

A list of metrics.

nextToken
Type: 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.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

ListOneTimePrices

$result = $client->listOneTimePrices([/* ... */]);
$promise = $client->listOneTimePricesAsync([/* ... */]);

Lists the one-time prices for an app. Returns a paginated list; use the nextToken value to retrieve additional pages.

Parameter Syntax

$result = $client->listOneTimePrices([
    'appId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'stage' => 'DRAFT|PUBLISHED',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app whose one-time prices are listed.

maxResults
Type: int

The maximum number of one-time prices to return in a single call. To retrieve the remaining results, make another call with the nextToken value that is returned in the response.

nextToken
Type: string

The pagination token that is returned by a previous call. Use it to retrieve the next page of results. Omit this parameter on the first call.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

stage
Type: string

The offering stage to list one-time prices from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.

Result Syntax

[
    'nextToken' => '<string>',
    'oneTimePrices' => [
        [
            'appId' => '<string>',
            'arn' => '<string>',
            'definition' => [
                'capacity' => <integer>,
                'metricId' => '<string>',
                'name' => '<string>',
                'price' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
            ],
            'oneTimePriceId' => '<string>',
            'stage' => 'DRAFT|PUBLISHED',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The pagination token to use in a subsequent call to retrieve the next page of results. This value is absent when there are no more results to return.

oneTimePrices
Required: Yes
Type: Array of OneTimePrice structures

The one-time prices for the app.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

ListPlans

$result = $client->listPlans([/* ... */]);
$promise = $client->listPlansAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listPlans([
    'appId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'stage' => 'DRAFT|PUBLISHED',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

maxResults
Type: int

The maximum number of items to return in a single page. Valid range is 1 to 100.

nextToken
Type: 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
Required: Yes
Type: string

Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

stage
Type: string

Which offering stage to list plans from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox. A stage with nothing published yet lists as empty.

Result Syntax

[
    'nextToken' => '<string>',
    'plans' => [
        [
            'appId' => '<string>',
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'definition' => [
                'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
                'description' => '<string>',
                'includedQuotas' => [
                    '<MetricId>' => [
                        'flat' => [
                            'includedQuantity' => <integer>,
                            'maxQuantity' => <integer>,
                            'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                            'overagePrice' => [
                                'amount' => '<string>',
                                'currencyCode' => '<string>',
                            ],
                            'tieredOverage' => [
                                'semantics' => 'GRADUATED|VOLUME',
                                'tiers' => [
                                    [
                                        'firstUnit' => <integer>,
                                        'lastUnit' => <integer>,
                                        'unitPrice' => [
                                            'amount' => '<string>',
                                            'currencyCode' => '<string>',
                                        ],
                                    ],
                                    // ...
                                ],
                            ],
                        ],
                        'tiered' => [
                            'includedQuantity' => <integer>,
                            'maxQuantity' => <integer>,
                            'tieredPrice' => [
                                'semantics' => 'GRADUATED|VOLUME',
                                'tiers' => [
                                    [
                                        'firstUnit' => <integer>,
                                        'lastUnit' => <integer>,
                                        'unitPrice' => [
                                            'amount' => '<string>',
                                            'currencyCode' => '<string>',
                                        ],
                                    ],
                                    // ...
                                ],
                            ],
                        ],
                    ],
                    // ...
                ],
                'name' => '<string>',
                'paymentFailurePolicy' => [
                    'downgradeToPlanId' => '<string>',
                    'retryAttempts' => <integer>,
                    'retryWindowDays' => <integer>,
                ],
                'subscriptionPrice' => [
                    'amount' => '<string>',
                    'currencyCode' => '<string>',
                ],
                'taxCode' => '<string>',
            ],
            'planId' => '<string>',
            'stage' => 'DRAFT|PUBLISHED',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: 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.

plans
Required: Yes
Type: Array of Plan structures

The page of plans for the app; each carries the stage it was read from.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

ListSubscriptions

$result = $client->listSubscriptions([/* ... */]);
$promise = $client->listSubscriptionsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listSubscriptions([
    'appId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

maxResults
Type: int

The maximum number of items to return in a single page.

nextToken
Type: 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
Required: Yes
Type: string

Required. The environment: live or sandbox.

Result Syntax

[
    'items' => [
        [
            'appId' => '<string>',
            'billingAnchorDate' => <DateTime>,
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'effectiveAt' => <DateTime>,
            'planId' => '<string>',
            'userId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of SubscriptionSummary structures

The page of subscription summaries for the app.

nextToken
Type: 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.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ThrottlingException:

The request was denied due to request throttling.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Lists the tags on an app, pricing plan, billing metric or one-time price.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

ARN of the app, pricing plan, billing metric or one-time price whose tags to list.

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The tags on the resource.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

ListThirdPartyCosts

$result = $client->listThirdPartyCosts([/* ... */]);
$promise = $client->listThirdPartyCostsAsync([/* ... */]);

Returns the third-party costs for an app. To calculate a total, sum the amount of the returned items; the costs are not prorated. Returns a paginated list; we recommend using pagination to ensure that the operation returns quickly and successfully.

Parameter Syntax

$result = $client->listThirdPartyCosts([
    'appId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

maxResults
Type: int

The maximum number of items to return in a single page. Valid range: 1-100.

nextToken
Type: 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.

Result Syntax

[
    'items' => [
        [
            'amount' => '<string>',
            'appId' => '<string>',
            'costId' => '<string>',
            'createdAt' => <DateTime>,
            'currency' => 'USD',
            'description' => '<string>',
            'effectiveFrom' => '<string>',
            'effectiveTo' => '<string>',
            'frequency' => 'MONTHLY',
            'label' => '<string>',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of ThirdPartyCostItem structures

The app's declared third-party costs.

nextToken
Type: string

The pagination token; absent when there are no more results.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

PublishDraft

$result = $client->publishDraft([/* ... */]);
$promise = $client->publishDraftAsync([/* ... */]);

Publishes the app's current draft configuration to live in a single atomic operation. The published configuration includes all plans, metrics, capabilities, usage packs, add-ons, and free trials. A draft with more plans than the Published plans per app quota allows is refused with ServiceQuotaExceededException.

Parameter Syntax

$result = $client->publishDraft([
    'appId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

Result Syntax

[
    'app' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'description' => '<string>',
        'name' => '<string>',
        'status' => 'ACTIVE|DELETED',
    ],
]

Result Details

Members
app
Required: Yes
Type: App structure

The app after publish. The published draft is now live.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

PutAwsServiceEvent

$result = $client->putAwsServiceEvent([/* ... */]);
$promise = $client->putAwsServiceEventAsync([/* ... */]);

Records an AWS service usage event for cost attribution. The event is accepted and processed asynchronously.

Parameter Syntax

$result = $client->putAwsServiceEvent([
    'appId' => '<string>', // REQUIRED
    'awsRegion' => '<string>',
    'clientToken' => '<string>',
    'operation' => '<string>', // REQUIRED
    'properties' => ['<string>', ...],
    'quantity' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'service' => '<string>', // REQUIRED
    'timestamp' => <integer || string || DateTime>, // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

awsRegion
Type: string

The AWS Region in which the event occurred.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

operation
Required: Yes
Type: string

The AWS operation (API action) that produced the usage event.

properties
Type: Associative array of custom strings keys (PropertyKey) to strings

The key/value properties carried on a usage event. Property values can be referenced by metric filters and grouping.

quantity
Type: string

A non-negative decimal quantity represented as a string (for example, "1500" or "12.5").

scope
Required: Yes
Type: string

The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app's isolated test environment.

service
Required: Yes
Type: string

The AWS service name that emitted the usage event.

timestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the event occurred, as an ISO-8601 date-time in UTC (for example, "2026-07-26T15:04:05Z").

userId
Required: Yes
Type: string

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'eventId' => '<string>',
    'status' => 'ACCEPTED',
]

Result Details

Members
eventId
Required: Yes
Type: string

The ID assigned to the recorded event.

status
Required: Yes
Type: string

The processing status of the accepted event.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

PutCustomCharges

$result = $client->putCustomCharges([/* ... */]);
$promise = $client->putCustomChargesAsync([/* ... */]);

Adds charges that you compute to the end user's next subscription invoice. The charges go to the billing period of the user's current subscription that contains the current time. You don't specify a period.

Each charge has a chargeId that you choose. If you submit a chargeId again in the same billing period, the existing charge is replaced instead of added again. A chargeId belongs to the first billing period that accepts it, so use a value that is unique for this user across all billing periods, such as a UUID or your own invoice line ID.

The request succeeds or fails as a whole: either every charge is accepted or none is. A successful response means that every charge was accepted.

If you submit a chargeId after its billing period has ended, the request fails with a ConflictException. The charge is already recorded. Don't submit it again under a new chargeId, because that bills it twice.

A billing period holds at most 100 chargeId values for each user. If a request would exceed 100, it fails with a ServiceQuotaExceededException. Submitting a chargeId that is already in the period doesn't count toward the limit.

Parameter Syntax

$result = $client->putCustomCharges([
    'appId' => '<string>', // REQUIRED
    'charges' => [ // REQUIRED
        [
            'amount' => '<string>', // REQUIRED
            'chargeId' => '<string>', // REQUIRED
            'currency' => '<string>', // REQUIRED
            'description' => '<string>', // REQUIRED
            'metricId' => '<string>',
            'taxCode' => '<string>',
        ],
        // ...
    ],
    'scope' => 'sandbox|live', // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

charges
Required: Yes
Type: Array of CustomCharge structures

The custom charges to add to this user's next invoice. Stored at the submitted grain; the service never splits a charge. Accepted all-or-nothing.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

userId
Required: Yes
Type: string

The end user these charges bill.

Result Syntax

[
    'billingPeriodEndAt' => <DateTime>,
    'billingPeriodStartAt' => <DateTime>,
]

Result Details

Members
billingPeriodEndAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End of the assigned billing period.

billingPeriodStartAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The billing period the service assigned these charges to, resolved from the user's current subscription. The caller supplies no window; this reports where the charges landed.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

PutEvent

$result = $client->putEvent([/* ... */]);
$promise = $client->putEventAsync([/* ... */]);

Records a usage event for a user of an app. Usage events are the raw input that metrics aggregate.

Parameter Syntax

$result = $client->putEvent([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'eventType' => '<string>', // REQUIRED
    'properties' => ['<string>', ...],
    'quantity' => '<string>', // REQUIRED
    'scope' => 'sandbox|live', // REQUIRED
    'timestamp' => <integer || string || DateTime>, // REQUIRED
    'userId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the event belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

eventType
Required: Yes
Type: string

The event type. Correlates with the event type of the metrics that aggregate it.

properties
Type: Associative array of custom strings keys (PropertyKey) to strings

The key/value properties carried on the event, usable in metric filters and grouping. When a metric sums or takes the max of a property, that property's value must be a plain non-negative decimal (up to 15 digits before the point and 6 after; no sign, exponent, spaces, or commas, for example "1200" or "12.5"), and events that break this are rejected.

quantity
Required: Yes
Type: string

The amount of usage the event represents, as a non-negative decimal string (for example, "1" or "12.5").

scope
Required: Yes
Type: string

The environment of the app that this operation applies to: the live app or the app's isolated sandbox test environment.

timestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the event occurred.

userId
Required: Yes
Type: string

The ID of the end user the event is attributed to. Do not include personally identifiable or otherwise sensitive data in this value.

Result Syntax

[
    'eventId' => '<string>',
    'status' => '<string>',
]

Result Details

Members
eventId
Required: Yes
Type: string

The server-assigned identifier for the recorded event.

status
Required: Yes
Type: string

The status of the recorded event.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

PutThirdPartyCost

$result = $client->putThirdPartyCost([/* ... */]);
$promise = $client->putThirdPartyCostAsync([/* ... */]);

Adds or updates a seller-declared third-party (non-AWS) monthly cost for an app. Omit the cost identifier to create a new cost, or supply an existing cost identifier to update it in place. The amount is a flat monthly value, and currency defaults to USD when omitted.

Parameter Syntax

$result = $client->putThirdPartyCost([
    'amount' => '<string>', // REQUIRED
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'costId' => '<string>',
    'currency' => 'USD',
    'description' => '<string>',
    'effectiveFrom' => '<string>',
    'effectiveTo' => '<string>',
    'frequency' => 'MONTHLY',
    'label' => '<string>', // REQUIRED
]);

Parameter Details

Members
amount
Required: Yes
Type: string

A flat monthly amount as a decimal string (for example, "12.50").

appId
Required: Yes
Type: string

The ID of the app the cost belongs to.

clientToken
Type: string

AWS App Monetization does not use this value for this operation. To retry without creating a duplicate cost, pass the costId returned by the first call.

costId
Type: string

The ID of the cost. Omit it to create a new cost, or supply an existing cost ID to update that cost in place.

currency
Type: string

The currency of the amount. Defaults to USD when omitted (USD is the only supported currency).

description
Type: string

A free-form description of the cost.

effectiveFrom
Type: string

First month (YYYY-MM) the cost applies in. Absent means the cost has no start month.

effectiveTo
Type: string

Last month (YYYY-MM) the cost applies in. Absent means the cost has no end month. When both are present, effectiveFrom must not be after effectiveTo.

frequency
Type: string

How often the cost recurs. MONTHLY is the only value today.

label
Required: Yes
Type: string

A human-readable label for the cost (for example, "Anthropic API").

Result Syntax

[
    'item' => [
        'amount' => '<string>',
        'appId' => '<string>',
        'costId' => '<string>',
        'createdAt' => <DateTime>,
        'currency' => 'USD',
        'description' => '<string>',
        'effectiveFrom' => '<string>',
        'effectiveTo' => '<string>',
        'frequency' => 'MONTHLY',
        'label' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
item
Required: Yes
Type: ThirdPartyCostItem structure

The third-party cost that was created or updated.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Adds or overwrites tags on an app, pricing plan, billing metric or one-time price.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

ARN of the app, pricing plan, billing metric or one-time price to tag.

tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add. A tag whose key already exists on the resource has its value overwritten.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes tags from an app, pricing plan, billing metric or one-time price.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

ARN of the app, pricing plan, billing metric or one-time price to remove tags from.

tagKeys
Required: Yes
Type: Array of strings

Keys of the tags to remove. A key that is not on the resource is ignored.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

UpdateApp

$result = $client->updateApp([/* ... */]);
$promise = $client->updateAppAsync([/* ... */]);

Updates an existing app. This operation is idempotent.

Parameter Syntax

$result = $client->updateApp([
    'appId' => '<string>', // REQUIRED
    'costTracking' => [
        'roleArn' => '<string>', // REQUIRED
    ],
    'description' => '<string>',
    'identifier' => '<string>',
    'name' => '<string>',
    'scope' => 'sandbox|live',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app to update. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.

costTracking
Type: CostTrackingConfiguration structure

Optional cost-tracking configuration: the IAM role AWS App Monetization uses to track this app's AWS costs. Passing a role also requires permission for iam:PassRole on it. You can send it with or without a new name or description.

description
Type: string

The new description. An empty string clears it; omitting the member keeps the current one.

identifier
Type: string

The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app's sandbox; if you also send scope, the two must name the same environment.

name
Type: string

A human-readable display name for the app.

scope
Type: string

The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.

Result Syntax

[
    'app' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'description' => '<string>',
        'name' => '<string>',
        'status' => 'ACTIVE|DELETED',
    ],
]

Result Details

Members
app
Required: Yes
Type: App structure

The updated app.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

UpdateAppPaymentRegistration

$result = $client->updateAppPaymentRegistration([/* ... */]);
$promise = $client->updateAppPaymentRegistrationAsync([/* ... */]);

Updates the payment and tax details on an app's payment registration.

Parameter Syntax

$result = $client->updateAppPaymentRegistration([
    'appId' => '<string>', // REQUIRED
    'developerAddress' => [
        'city' => '<string>', // REQUIRED
        'country' => '<string>', // REQUIRED
        'postalCode' => '<string>', // REQUIRED
        'state' => '<string>', // REQUIRED
        'street1' => '<string>', // REQUIRED
        'street2' => '<string>',
    ],
    'displayName' => '<string>',
    'email' => '<string>',
    'invoiceLogo' => <string || resource || Psr\Http\Message\StreamInterface>,
    'legalName' => '<string>',
    'paymentRegistrationId' => '<string>',
    'scope' => 'sandbox|live', // REQUIRED
    'supportEmail' => '<string>',
    'supportPhone' => '<string>',
    'taxRegistrationNumber' => '<string>',
    'taxRegistrations' => [
        [
            'collectionType' => '<string>', // REQUIRED
            'countryCode' => '<string>', // REQUIRED
            'locality' => '<string>',
            'registrationId' => '<string>',
            'registrationType' => 'SALES_USE|RETAIL_DELIVERY_FEE|VAT|VAT_OSS|VAT_IOSS|GST|FEDERAL_EIN|CPF|CNPJ|SST|TIN|NIP|NPWP|NCID',
            'state' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app whose payment registration is updated.

developerAddress
Type: DeveloperAddress structure

Your business address.

displayName
Type: string

Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.

email
Type: string

Your primary contact email for this registration, distinct from supportEmail (the address shown to customers).

invoiceLogo
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.

legalName
Type: string

Your registered legal name.

paymentRegistrationId
Type: string

Binds the app to this payment registration, owned by the caller, or rebinds it from another one. Cannot be combined with legal-detail or contact members. Naming the registration the app already holds succeeds without a write.

scope
Required: Yes
Type: string

Required. The environment: live or sandbox.

supportEmail
Type: string

Your support email address, displayed in the invoice footer.

supportPhone
Type: string

Customer-facing support phone number shown to buyers on invoices.

taxRegistrationNumber
Type: string

Your tax registration number (for example, VAT, GST, or EIN).

taxRegistrations
Type: Array of TaxRegistration structures

The jurisdictions where the seller is registered to collect tax.

Result Syntax

[
    'appPaymentRegistration' => [
        'additionalAppEligibility' => 'ELIGIBLE|ONBOARDING_INCOMPLETE|IDENTITY_PENDING|REGISTRATION_FAILED',
        'appId' => '<string>',
        'businessType' => 'INDIVIDUAL|REGISTERED_BUSINESS',
        'createdAt' => <DateTime>,
        'developerAddress' => [
            'city' => '<string>',
            'country' => '<string>',
            'postalCode' => '<string>',
            'state' => '<string>',
            'street1' => '<string>',
            'street2' => '<string>',
        ],
        'displayName' => '<string>',
        'email' => '<string>',
        'legalName' => '<string>',
        'paymentRegistrationId' => '<string>',
        'paymentRegistrationStatus' => 'ACTIVE|PENDING|FAILED',
        'status' => 'ACTIVE|PENDING|FAILED',
        'supportEmail' => '<string>',
        'supportPhone' => '<string>',
        'taxRegistrationNumber' => '<string>',
        'taxRegistrations' => [
            [
                'collectionType' => '<string>',
                'countryCode' => '<string>',
                'locality' => '<string>',
                'registrationId' => '<string>',
                'registrationType' => 'SALES_USE|RETAIL_DELIVERY_FEE|VAT|VAT_OSS|VAT_IOSS|GST|FEDERAL_EIN|CPF|CNPJ|SST|TIN|NIP|NPWP|NCID',
                'state' => '<string>',
            ],
            // ...
        ],
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
appPaymentRegistration
Required: Yes
Type: AppPaymentRegistration structure

The app's updated payment registration.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InternalServerException:

An unexpected error occurred while processing the request.

ResourceNotFoundException:

The referenced resource does not exist.

ThrottlingException:

The request was denied due to request throttling.

UpdateMetric

$result = $client->updateMetric([/* ... */]);
$promise = $client->updateMetricAsync([/* ... */]);

Updates an existing metric. Only a draft metric, one that has never been published, can be modified. After a metric is published, every field is frozen and any update is rejected with a ConflictException. To change a published metric, archive it and create a new metric.

Parameter Syntax

$result = $client->updateMetric([
    'appId' => '<string>', // REQUIRED
    'definition' => [
        'filters' => [ // REQUIRED
            [
                'field' => '<string>', // REQUIRED
                'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN', // REQUIRED
                'values' => ['<string>', ...], // REQUIRED
            ],
            // ...
        ],
        'function' => 'SUM|COUNT|MAX', // REQUIRED
        'functionField' => '<string>',
        'groupBy' => ['<string>', ...], // REQUIRED
        'period' => 'MONTHLY', // REQUIRED
    ],
    'description' => '<string>',
    'eventType' => '<string>',
    'metricId' => '<string>', // REQUIRED
    'name' => '<string>',
    'unitName' => '<string>',
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

definition
Type: MetricDefinition structure

The aggregation definition: filters, aggregation function, grouping, and period.

description
Type: string

A description of what the metric measures.

eventType
Type: string

The event type this metric aggregates.

metricId
Required: Yes
Type: string

The ID of the metric to update.

name
Type: string

A human-readable display name for the metric.

unitName
Type: string

The unit of measure for the metric (for example, "requests"), in lowercase snake_case.

Result Syntax

[
    'metric' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'filters' => [
                [
                    'field' => '<string>',
                    'operator' => 'EQUALS|NOT_EQUALS|IN|NOT_IN',
                    'values' => ['<string>', ...],
                ],
                // ...
            ],
            'function' => 'SUM|COUNT|MAX',
            'functionField' => '<string>',
            'groupBy' => ['<string>', ...],
            'period' => 'MONTHLY',
        ],
        'description' => '<string>',
        'eventType' => '<string>',
        'metricId' => '<string>',
        'name' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'unitName' => '<string>',
    ],
]

Result Details

Members
metric
Required: Yes
Type: Metric structure

The updated metric.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

UpdateOneTimePrice

$result = $client->updateOneTimePrice([/* ... */]);
$promise = $client->updateOneTimePriceAsync([/* ... */]);

Updates the definition of a one-time price. This operation is idempotent.

Parameter Syntax

$result = $client->updateOneTimePrice([
    'appId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'definition' => [ // REQUIRED
        'capacity' => <integer>, // REQUIRED
        'metricId' => '<string>', // REQUIRED
        'name' => '<string>', // REQUIRED
        'price' => [ // REQUIRED
            'amount' => '<string>', // REQUIRED
            'currencyCode' => '<string>', // REQUIRED
        ],
    ],
    'oneTimePriceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app the one-time price belongs to.

clientToken
Type: string

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

definition
Required: Yes
Type: OneTimePriceDefinition structure

The new definition to apply to the one-time price, including its display name, price, metric, and credited capacity.

oneTimePriceId
Required: Yes
Type: string

The ID of the one-time price to update.

Result Syntax

[
    'oneTimePrice' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'definition' => [
            'capacity' => <integer>,
            'metricId' => '<string>',
            'name' => '<string>',
            'price' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
        ],
        'oneTimePriceId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
    ],
]

Result Details

Members
oneTimePrice
Required: Yes
Type: OneTimePrice structure

The updated one-time price.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

IdempotencyConflictException:

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

UpdatePlan

$result = $client->updatePlan([/* ... */]);
$promise = $client->updatePlanAsync([/* ... */]);

Updates an existing plan. Only a draft plan, one that has never been published, can be modified. After a plan is published, all of its fields are frozen and any update is rejected with a ConflictException. To change the terms of a published plan, archive it and create a new plan.

Parameter Syntax

$result = $client->updatePlan([
    'appId' => '<string>', // REQUIRED
    'definition' => [ // REQUIRED
        'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME', // REQUIRED
        'description' => '<string>',
        'includedQuotas' => [
            '<MetricId>' => [
                'flat' => [
                    'includedQuantity' => <integer>, // REQUIRED
                    'maxQuantity' => <integer>,
                    'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                    'overagePrice' => [
                        'amount' => '<string>', // REQUIRED
                        'currencyCode' => '<string>', // REQUIRED
                    ],
                    'tieredOverage' => [
                        'semantics' => 'GRADUATED|VOLUME', // REQUIRED
                        'tiers' => [ // REQUIRED
                            [
                                'firstUnit' => <integer>, // REQUIRED
                                'lastUnit' => <integer>,
                                'unitPrice' => [ // REQUIRED
                                    'amount' => '<string>', // REQUIRED
                                    'currencyCode' => '<string>', // REQUIRED
                                ],
                            ],
                            // ...
                        ],
                    ],
                ],
                'tiered' => [
                    'includedQuantity' => <integer>, // REQUIRED
                    'maxQuantity' => <integer>,
                    'tieredPrice' => [ // REQUIRED
                        'semantics' => 'GRADUATED|VOLUME', // REQUIRED
                        'tiers' => [ // REQUIRED
                            [
                                'firstUnit' => <integer>, // REQUIRED
                                'lastUnit' => <integer>,
                                'unitPrice' => [ // REQUIRED
                                    'amount' => '<string>', // REQUIRED
                                    'currencyCode' => '<string>', // REQUIRED
                                ],
                            ],
                            // ...
                        ],
                    ],
                ],
            ],
            // ...
        ],
        'name' => '<string>', // REQUIRED
        'paymentFailurePolicy' => [
            'downgradeToPlanId' => '<string>',
            'retryAttempts' => <integer>,
            'retryWindowDays' => <integer>,
        ],
        'subscriptionPrice' => [ // REQUIRED
            'amount' => '<string>', // REQUIRED
            'currencyCode' => '<string>', // REQUIRED
        ],
        'taxCode' => '<string>',
    ],
    'planId' => '<string>', // REQUIRED
]);

Parameter Details

Members
appId
Required: Yes
Type: string

The ID of the app.

definition
Required: Yes
Type: PlanDefinition structure

The plan's updated pricing and packaging definition.

planId
Required: Yes
Type: string

The identifier of the plan. AWS App Monetization generates this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.

Result Syntax

[
    'plan' => [
        'appId' => '<string>',
        'arn' => '<string>',
        'createdAt' => <DateTime>,
        'definition' => [
            'billingCycle' => 'MONTHLY|ANNUAL|ONE_TIME',
            'description' => '<string>',
            'includedQuotas' => [
                '<MetricId>' => [
                    'flat' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'overagePolicy' => 'NO_OVERAGE_THROTTLE|APPLY_FIXED_OVERAGE|APPLY_TIERED_OVERAGE',
                        'overagePrice' => [
                            'amount' => '<string>',
                            'currencyCode' => '<string>',
                        ],
                        'tieredOverage' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                    'tiered' => [
                        'includedQuantity' => <integer>,
                        'maxQuantity' => <integer>,
                        'tieredPrice' => [
                            'semantics' => 'GRADUATED|VOLUME',
                            'tiers' => [
                                [
                                    'firstUnit' => <integer>,
                                    'lastUnit' => <integer>,
                                    'unitPrice' => [
                                        'amount' => '<string>',
                                        'currencyCode' => '<string>',
                                    ],
                                ],
                                // ...
                            ],
                        ],
                    ],
                ],
                // ...
            ],
            'name' => '<string>',
            'paymentFailurePolicy' => [
                'downgradeToPlanId' => '<string>',
                'retryAttempts' => <integer>,
                'retryWindowDays' => <integer>,
            ],
            'subscriptionPrice' => [
                'amount' => '<string>',
                'currencyCode' => '<string>',
            ],
            'taxCode' => '<string>',
        ],
        'planId' => '<string>',
        'stage' => 'DRAFT|PUBLISHED',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
plan
Required: Yes
Type: Plan structure

The updated plan.

Errors

AccessDeniedException:

The caller does not have sufficient permission to perform this action.

ValidationException:

The request failed input validation.

ConflictException:

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

InvalidConfigurationException:

The requested configuration is not valid.

InternalServerException:

An unexpected error occurred while processing the request.

ServiceQuotaExceededException:

The request would cause a service quota to be exceeded.

ResourceNotFoundException:

The referenced resource does not exist.

RevisionConflictException:

The request's revision does not match the resource's current revision. Retry with the current revision.

ThrottlingException:

The request was denied due to request throttling.

Shapes

AccessDeniedException

Description

The caller does not have sufficient permission to perform this action.

Members
message
Required: Yes
Type: string

Human-readable description of the access-denied condition.

AlternativeInputs

Description

What customers could use instead of the app. Comparables that agree, with costs.source LIVE or ACTUALS, are needed for HIGH confidence; MEDIUM needs none.

Members
comparables
Type: Array of Comparable structures

Comparable apps, each read from its public pricing page, used only when comparablesOptIn is OPTED_IN. Each usable one becomes an alternative customers weigh against the app. At most 5 are used, best quality first; the rest, and any that cannot be used, are returned in alternatives.comparablesDropped with the reason. With OPTED_OUT they are still validated, but not used and not listed there. Absent: no comparables.

comparablesOptIn
Type: string

The developer's explicit answer to whether comparable apps' public prices may be used. Required when comparables is sent. Absent otherwise: OPTED_OUT. Never inferred as OPTED_IN.

outsideOptions
Type: Array of OutsideOption structures

What customers do today without any product, such as doing the task by hand. Each one is an alternative customers weigh against the app, at its monthlyCost. These are not products, so they need no comparablesOptIn. Absent: none.

AlternativesOutcome

Description

Which comparable apps were used and which were not.

Members
comparablesDropped
Required: Yes
Type: Array of DroppedComparable structures

Comparable apps that were not used, with the reason.

comparablesUsed
Required: Yes
Type: Array of strings

Names of the comparable apps whose prices were used.

App

Description

A monetizable application. Apps are the top-level resource that own plans, metrics, subscriptions, and usage data.

Members
appId
Required: Yes
Type: string

The service-assigned identifier for the app.

arn
Type: string

The resource ARN of this app.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the app was created.

description
Type: string

A longer description of what the app does.

name
Required: Yes
Type: string

A human-readable display name for the app.

status
Required: Yes
Type: string

The lifecycle status of the app.

AppPaymentRegistration

Description

An app's seller payment and tax registration, including onboarding status and the seller's legal, tax, and contact details. The seller profile fields are personally identifiable information.

Members
additionalAppEligibility
Type: string

Whether a further app may bind to the app's payment registration, and if not, why. Present exactly when paymentRegistrationId is.

appId
Required: Yes
Type: string

The ID of the app this registration belongs to.

businessType
Type: string

Whether the seller registered as an individual or a registered business.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the payment registration was created.

developerAddress
Type: DeveloperAddress structure

The seller's postal address.

displayName
Type: string

Customer-facing name (doing-business-as) shown to buyers on invoices, read from the seller profile.

email
Type: string

The seller's primary contact email, read from the seller profile.

legalName
Type: string

The seller's registered legal name.

paymentRegistrationId
Type: string

The payment registration the app is bound to. Pass it to UpdateAppPaymentRegistration on another app to bind that app to the same registration. Absent if the app uses a payment registration created before registrations could be shared.

paymentRegistrationStatus
Type: string

The onboarding status of this app's payment registration. It has the same value as status. Present exactly when paymentRegistrationId is.

status
Required: Yes
Type: string

The onboarding status of the payment registration for this app (ACTIVE, PENDING, or FAILED).

supportEmail
Type: string

The seller's support email address, displayed in the invoice footer.

supportPhone
Type: string

Customer-facing support phone number, read from the seller profile.

taxRegistrationNumber
Type: string

The seller's tax registration number (for example, VAT, GST, or EIN).

taxRegistrations
Type: Array of TaxRegistration structures

The jurisdictions where the seller is registered to collect tax.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the payment registration was last updated.

AppQuota

Description

A flat metric grant on a plan: a free allowance plus an optional overage policy for usage beyond it. The flat arm of AppQuotaConfig.

Members
includedQuantity
Required: Yes
Type: long (int|float)

The free allowance included with the plan for this metric.

maxQuantity
Type: long (int|float)

Usage at which further entitlement checks for this metric are denied, in whole units per billing period, counting the included allowance. Must be at least includedQuantity (equal is a hard stop at the allowance) and is allowed only on a grant that charges past its allowance. Checked at entitlement time against usage already recorded; one allowed action's quantity is not clamped. Prepaid usage-pack units sit outside it. One cap per billing period. Absent means no cap.

overagePolicy
Type: string

How usage beyond the included allowance is handled.

overagePrice
Type: Price structure

The per-unit price charged for usage beyond the included allowance under a fixed overage policy.

tieredOverage
Type: TieredOverage structure

The tiered overage schedule applied to usage beyond the included allowance under a tiered overage policy.

AppQuotaConfig

Description

How one metric is priced on a plan: exactly one of a flat grant or a tiered-priced grant. Both arms carry the free allowance (includedQuantity) with the same meaning.

Members
flat
Type: AppQuota structure

A flat grant: free allowance plus an optional overage policy.

tiered
Type: AppTieredQuota structure

A tiered-priced grant: free allowance plus a tier-ladder price schedule.

AppTieredQuota

Description

A metric grant priced by a tiered schedule (the tiered arm of AppQuotaConfig). The free allowance (includedQuantity) is set separately from the price schedule and may be 0 (tier-priced from the first charged unit). Carries no overage members: a tiered grant is priced by its tiers, never by an overage policy. See TieredPrice.

Members
includedQuantity
Required: Yes
Type: long (int|float)

The free allowance included with the plan for this metric. May be 0, in which case the metric is tier-priced from the first charged unit.

maxQuantity
Type: long (int|float)

Usage at which further entitlement checks for this metric are denied, in whole units per billing period, counting the included allowance. Must be at least includedQuantity (equal is a hard stop at the allowance) and is allowed only on a grant that charges past its allowance. Checked at entitlement time against usage already recorded; one allowed action's quantity is not clamped. Prepaid usage-pack units sit outside it. One cap per billing period. Absent means no cap.

tieredPrice
Required: Yes
Type: TieredPrice structure

The tiered price schedule applied to charged usage for this metric.

BillableAction

Description

One billable action: something a user does that costs money to serve and can be charged for.

Members
minutesSaved
Type: double

Minutes one unit saves a customer compared with doing the task by hand. Sets the value of one use, together with hourlyRate (required with it): minutesSaved / 60 x hourlyRate x the value share that valueShare describes. Give at most one of minutesSaved, moneySaved and valuePerUse per action: a request that gives two on the same action is rejected. Rejected with valueKind EXPERIENTIAL, as are moneySaved and valuePerUse. Absent: this action's value, if any, is moneySaved or valuePerUse (see valuePerUse for no value).

moneySaved
Type: double

Money one use saves the buyer, in USD: what they would otherwise spend on it (a service, a contractor, compute or paid staff time). The server values one use at a share of it; the share is set server-side, not an input (valueShare does not apply). Give at most one of minutesSaved, moneySaved and valuePerUse per action: a request that gives two on the same action is rejected. Use valuePerUse when you have already worked out the dollar value of one use. Rejected with valueKind EXPERIENTIAL. Absent: this action's value, if any, is minutesSaved or valuePerUse (see valuePerUse for no value).

name
Type: string

Action name, used as the metric key in plans, unitPrices and creditPacks. Unique within the request. Required when there is more than one action. Absent with exactly one action: usage.

typicalMonthlyUsage
Required: Yes
Type: double

Typical number of units one user consumes per month.

unit
Type: string

Unit the action is counted in, for example lesson or report. Defaults to name.

unitCost
Type: double

Cost to serve one unit, in USD. Give it on every action or on none: required when another action has unitCost, and when costs.source is ACTUALS, LIVE or ESTIMATE. Absent on every action: cost to serve is not checked (costs.source NONE). When any action's unitCost is 0, costs.source is required.

valuePerUse
Type: double

Value of one unit to a typical customer, in USD: the final dollar value of one use (valueShare does not apply), for an action that saves no time or money but has a dollar value (for example a lead worth 2 USD). Give at most one of minutesSaved, moneySaved and valuePerUse per action: a request that gives two on the same action is rejected. One of them is required when another action has a value basis (0 is allowed). When no action has a value basis and there is no experiential estimate (see valueKind), the price is based on cost (and comparables, if opted in, or planOptions.publishedPrice) and the confidence is LOW. For an action whose value is the time it saves, give minutesSaved instead; say how the figures were worked out in context.valueBasis. Rejected with valueKind EXPERIENTIAL.

BreakEvenPoint

Description

Cost to serve one payer at one modeled scale.

Members
costPerPayer
Required: Yes
Type: Price structure

Monthly cost to serve one payer, including the payer's share of fixed cost and free users. Up to 4 decimal places.

payers
Required: Yes
Type: double

Modeled number of payers, as a whole number.

BreakEvenRange

Description

Cost to serve one payer at the expected number of payers, at one tenth and at ten times.

Members
expected
Required: Yes
Type: BreakEvenPoint structure

Cost to serve one payer at the expected number of payers.

high
Required: Yes
Type: BreakEvenPoint structure

Cost to serve one payer at ten times the expected number of payers.

low
Required: Yes
Type: BreakEvenPoint structure

Cost to serve one payer at one tenth the expected number of payers.

CheckoutDropOff

Description

Replacement checkout drop-off rates, by pricing model: the share of buyers who start a checkout but don't finish. Each member replaces the service's benchmark for that pricing model.

Members
flat
Type: double

Share of buyers who start a checkout for a flat plan but don't finish. In [0, 1); 1 is rejected. Absent: the service's benchmark for that pricing model.

freePlan
Type: double

Share of buyers who start signing up for a Free plan but don't finish. In [0, 1); 1 is rejected. Absent: the service's benchmark for that pricing model.

perUse
Type: double

Share of buyers who start a checkout for per-use pricing but don't finish. In [0, 1); 1 is rejected. Absent: the service's benchmark for that pricing model.

tiered
Type: double

Share of buyers who start a checkout for a tiered plan but don't finish. In [0, 1); 1 is rejected. Absent: the service's benchmark for that pricing model.

CheckoutItem

Description

A single line in a one-time purchase cart: the one-time price to buy and how many units.

Members
oneTimePriceId
Required: Yes
Type: string

The id of the one-time price to buy.

quantity
Type: int

The number of units of the one-time price to buy.

CheckoutOutcome

Description

The outcome of a subscription checkout. Exactly one member is set.

Members
paymentNotRequired
Type: SubscriptionChange structure

The plan change needs no payment: a scheduled downgrade (effectiveAt is the next period boundary) or a change applied immediately or a no-op (effectiveAt is now).

paymentRequired
Type: CheckoutRedirect structure

The money must be collected (an upgrade with an amount due now, or a paid target that needs a card captured). Redirect the buyer to checkoutUrl.

planSelectionRequired
Type: PlanSelectionRedirect structure

The buyer must select a plan on the hosted pricing page at pricingUrl before checkout can proceed, because no planId was supplied.

CheckoutRedirect

Description

A hosted checkout the buyer must complete to pay for a plan.

Members
checkoutUrl
Required: Yes
Type: string

An absolute HTTP or HTTPS URL the buyer's browser is redirected to in order to complete payment.

expiresAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the checkout session expires.

Comparable

Description

A comparable app, read from its public pricing page. Give quality or features: one of them is required.

Members
cap
Type: double

Monthly usage cap of the free tier, for FREE_CAPPED and FREEMIUM. A free tier without a cap is not used.

features
Type: Associative array of custom strings keys (FeatureName) to doubles

Its scores on the characteristics in features, instead of quality. Required when quality is absent.

includedUnits
Type: double

For PAID_SUB: units of this app's billable action the plan includes per month. With overageRate, a customer pays the plan price plus overage at their own usage; without it, the plan stops at this allowance. Absent: the plan price covers any usage.

mechanism
Required: Yes
Type: string

How the comparable charges.

name
Type: string

Short name of the comparable app. Absent: the host of url, lowercased, without a leading www.; when two comparables get the same name, the later ones get (2), (3).

overageRate
Type: double

For PAID_SUB with includedUnits: price per unit past the allowance, in USD. Absent: the plan stops at includedUnits (no overage).

price
Required: Yes
Type: Price structure

Its price: per month for PAID_SUB, per use for PER_REQUEST, 0 for FREE_CAPPED and FREEMIUM, the one-time price for ONE_TIME. USD only: another currencyCode is rejected.

quality
Type: double

How good it is compared with this app, where this app is 1.

url
Required: Yes
Type: string

The public pricing page the price was read from.

ConflictException

Description

The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.

Members
message
Required: Yes
Type: string

Human-readable description of the conflict.

resourceId
Type: string

Identifier of the resource in a conflicting state.

resourceType
Type: string

Type of the resource in a conflicting state.

CostCover

Description

The price that covers cost to serve at one margin.

Members
margin
Required: Yes
Type: double

The target margin this price covers.

price
Required: Yes
Type: Price structure

Up to 4 decimal places.

CostGroup

Description

A cost total for a single value of the groupBy dimension.

Members
cost
Required: Yes
Type: string

The cost attributed to this group.

key
Required: Yes
Type: string

The value of the groupBy dimension for this row.

CostInputs

Description

Cost inputs beyond each action's unitCost. Couplings outside this group: margins sets the lowest credit-pack and overage price per unit; fixedMonthlyCost with market.expectedUsers sets the fixed cost per payer; HIGH confidence needs source LIVE or ACTUALS plus comparables in alternatives that agree.

Members
fixedMonthlyCost
Type: double

Fixed monthly cost to run the app in USD, including non-AWS fixed costs. Defaults to 0. It raises break-even (fixed cost per payer, with market.expectedUsers), so it can change the verdict and the price.

margins
Type: Array of doubles

Margins the developer named, each in [0, 1). costs.coverPrices in the response shows the price that covers cost to serve at each margin above 0. The lowest margin also sets the lowest overage and credit-pack price per unit; order does not matter. With no value basis and no experiential estimate (see valueKind) the price is cost to serve at the lowest margin; omitted means a default margin of 0, labelled as a default, which prices at cost, the same as [0]. Omitted, or only 0: costs.coverPrices in the response is empty.

source
Type: string

Where the cost figures came from. Required when any actions[].unitCost is 0. Absent: NONE when no action has unitCost, ESTIMATE when every action has it. ACTUALS, LIVE and ESTIMATE need unitCost on every action.

unknown
Type: Array of strings

Costs the developer knows exist but could not price, for example email provider. Omitted: the costs count as complete but unconfirmed, and the rendered text asks the developer to add any that are missing. Empty ([]): the developer confirmed there are no other costs. One or more items: the costs are incomplete, so costs.status in the response is INCOMPLETE and the confidence is LOW, and the rendered text names each item. With source NONE the items are only shown.

CostOutcome

Description

How the recommended price relates to cost to serve.

Members
breakEven
Type: BreakEvenRange structure

Cost to serve one payer at the expected number of payers, at one tenth and at ten times.

coverPrices
Required: Yes
Type: Array of CostCover structures

The price that covers cost to serve at each margin above 0 in the request's costs.margins. Reference only.

coverStatus
Required: Yes
Type: string

Whether the recommended price covers cost to serve as modeled, was raised to cover it, or could not cover it at any price.

impliedMargin
Type: double

Share of revenue left after cost to serve at the recommended price and expected scale, to 2 decimal places.

status
Required: Yes
Type: string

Whether the costs behind verdict and costs.breakEven are complete.

CostTrackingConfiguration

Description

Cost-tracking configuration sent on CreateApp or UpdateApp.

Members
roleArn
Required: Yes
Type: string

The ARN of an IAM role that AWS App Monetization assumes in your account to create and manage the AWS Data Exports export for this app. The role must be in your account and partition, and its name (after any path) must start with AppMonetizationCostTracking. You need iam:PassRole on it. Its trust policy must allow appmonetization.amazonaws.com to assume it, with conditions that pin aws:SourceAccount to your account ID and aws:SourceArn to your account's apps (arn:aws:appmonetization:::apps/*). The setup runs in the background after the call returns, and cost data starts arriving within 24-48 hours. Calling UpdateApp with a role again re-runs the setup. A CreateApp retry with the same clientToken must carry the same role: a different role, or a role added or dropped, fails with IdempotencyConflictException.

CustomCharge

Description

One developer-computed charge.

Members
amount
Required: Yes
Type: string

The charge, as a decimal string in major currency units (for example, "12.50").

chargeId
Required: Yes
Type: string

Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).

currency
Required: Yes
Type: string

The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.

description
Required: Yes
Type: string

Human-readable description, surfaced on the invoice line.

metricId
Type: string

Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).

taxCode
Type: string

Optional product tax code; defaults to the service default when omitted.

CustomerType

Description

One type of customer. Usage and value per use are relative to an ordinary user of the app, and independent of each other: a heavy user can be worth less per use.

Members
featureWeights
Type: Associative array of custom strings keys (FeatureName) to doubles

How much each characteristic in features matters to this type, when it differs from the shared features.weights. Absent: features.weights (equal weights when that is absent too). Used only when a comparable or an outside option in alternatives is scored by features; sent otherwise, it is rejected.

name
Required: Yes
Type: string

Short name of the customer type, for example solo devs.

share
Required: Yes
Type: double

Share of users of this type. Shares are relative: they are scaled to sum to 100.

usageMultiplier
Required: Yes
Type: double

Uses per month as a multiple of each action's typicalMonthlyUsage (2 = twice as many).

usageSpread
Type: string

How similar customers of this type are in how much they use the app. Absent: the segment's default.

valuePerUseMultiplier
Required: Yes
Type: double

Value of one use as a multiple of an ordinary user's (0.5 = half, 2 = twice).

DeveloperAddress

Description

A seller's postal address. All street, city, state, and postal fields are personally identifiable.

Members
city
Required: Yes
Type: string

The city of the street address.

country
Required: Yes
Type: string

The ISO 3166-1 alpha-2 country code.

postalCode
Required: Yes
Type: string

The postal or ZIP code.

state
Required: Yes
Type: string

The state or province.

street1
Required: Yes
Type: string

The first line of the street address.

street2
Type: string

The second line of the street address.

DroppedComparable

Description

A comparable app that was not used.

Members
name
Required: Yes
Type: string

Name of the comparable app.

price
Required: Yes
Type: Price structure

The comparable app's price.

reason
Required: Yes
Type: string

Why the comparable app was not used.

EntitlementMetricStatus

Description

The quota status of a single metric for the period.

Members
includedQuantity
Required: Yes
Type: long (int|float)

The quantity included for the period, prorated after a mid-period plan change. Only metrics with a limit are listed.

metricId
Required: Yes
Type: string

The ID of the metric.

remainingQuantity
Required: Yes
Type: long (int|float)

max(0, includedQuantity - usedQuantity).

usedQuantity
Required: Yes
Type: long (int|float)

The quantity of the metric already used in the current period.

EntitlementReason

Description

The reason behind an entitlement decision.

Members
category
Required: Yes
Type: string

The category of the reason for the decision.

code
Required: Yes
Type: string

The specific reason code for the decision.

EvaluatedPlanPrice

Description

Modeled monthly outcome of one price in the request's planOptions.planPrices.

Members
creditPacks
Type: Array of RecommendedCreditPack structures

The credit packs at this price, in the same form as the response's creditPacks. At the recommended price, equal to creditPacks.

monthlyProfit
Required: Yes
Type: string

Modeled monthly profit at this price, which can be negative.

paidShare
Required: Yes
Type: double

Modeled share of potential customers who pay, to 2 decimal places.

planCode
Required: Yes
Type: string

The plan code this price was evaluated for.

plans
Type: Array of RecommendedPlan structures

The recommended plans rebuilt at this price by the same rules, in the same form as the response's plans: a pro price sets Pro's overage rates and the annual plan, and a pay_as_you_go rate sets that action's rate. At the recommended price, equal to plans.

price
Required: Yes
Type: Price structure

The price evaluated: for pay_as_you_go with an actionName in the request, that action's rate.

verdict
Required: Yes
Type: string

Viability verdict at this price.

FeatureScores

Description

This app's scores on the characteristics customers decide on, and the weight of each.

Members
appScores
Required: Yes
Type: Associative array of custom strings keys (FeatureName) to doubles

This app's score on each characteristic, from 0 to 1 against the best in class.

weights
Type: Associative array of custom strings keys (FeatureName) to doubles

How much each characteristic matters, shared by every customer type that has no featureWeights of its own; they also rank the comparables when more than 5 are usable. Weights are relative. Absent: equal weights.

FreeTierOutcome

Description

The Free plan's modeled outcome. Absent when plans has no Free plan and no free trial is suggested, for example when the request's planOptions.freeTierInclusion is EXCLUDE, or is absent for ENTERPRISE with no planOptions.pricingModelPreference, or absent with a pricingModelPreference other than TIERED. One case is NOT_INCLUDED instead of absent: a per-use model the service chose, with no pricingModelPreference, for a segment whose default considers a Free plan (statusSource SEGMENT_DEFAULT). planOptions.freeTierInclusion INCLUDE never gives a per-use model: with no preference it limits the choice to TIERED, and with a PER_USE or PER_USE_SPLIT preference it is rejected.

Members
conversion
Type: double

Modeled share of free users who convert to the paid plan. Not returned.

freeUsers
Type: double

Modeled number of free users, as a whole number. INCLUDED, or NOT_INCLUDED with what a Free plan would cost.

monthlyCost
Type: Price structure

Monthly cost of serving the free users: for INCLUDED, the Free plan's cost; for TRIAL_SUGGESTED and NOT_INCLUDED, what a Free plan at the default quota would cost. Up to 4 decimal places.

status
Required: Yes
Type: string

Whether a Free plan is included, or what is suggested instead.

statusSource
Type: string

Whether status follows the request's planOptions.freeTierInclusion or the segment's default.

trialDays
Type: int

Length of the suggested free trial. TRIAL_SUGGESTED only.

IdempotencyConflictException

Description

The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.

Members
message
Required: Yes
Type: string

Human-readable description of the token conflict. Names clientToken as the field at fault.

InternalServerException

Description

An unexpected error occurred while processing the request.

Members
message
Required: Yes
Type: string

Human-readable description of the server error.

retryAfterSeconds
Type: int

Advice to clients on when the call can be safely retried.

InvalidConfigurationException

Description

The requested configuration is not valid.

Members
message
Required: Yes
Type: string

Human-readable description of the invalid configuration.

MarketInputs

Description

Who the customers are, how many there are, how many pay today and how many drop out at checkout. Coupling outside this group: expectedUsers with costs.fixedMonthlyCost sets the fixed cost per payer. measuredConversion is used only without a value estimate, and checkoutDropOff only with one (see each member).

Members
checkoutDropOff
Type: CheckoutDropOff structure

The developer's own checkout drop-off rates, one per pricing model, in place of the service's benchmarks. A member that is absent keeps its benchmark; {} keeps all four. Used only with a value estimate; without one the price does not depend on them. Absent: every benchmark.

customerTypes
Type: Array of CustomerType structures

The types of customer who use the app, from one to three, each with its share of users and how its usage and value per use differ from an ordinary user. Absent: one ordinary type.

expectedUsers
Type: long (int|float)

Market size: the number of potential customers, meaning people who have the problem the app solves and would consider paying for a tool to solve it. Paying users are this number times the modeled paying share. Do not count installs, sign-ups or people who would only try the app. It changes paying users, cost to serve and the verdict, and the price only when fixed cost per paying user decides it. Defaults to the service's pre-launch benchmark.

measuredConversion
Type: MeasuredConversion structure

For a deployed app: how many of its users pay today. It takes effect when at least 30 users pay; with fewer, it is ignored with no error and the segment's benchmark conversion is used. payingUsers must not exceed users. Used only without a value estimate (no action has minutesSaved, moneySaved or valuePerUse, and there is no experiential estimate, see valueKind): then paying users are the market size (expectedUsers, or its benchmark) times payingUsers / users instead of times the segment's benchmark conversion, which sets the fixed and Free-plan cost per paying user behind the cost-based price, the Free plan's quota (or a trial instead), and the what-if results in planOptions.evaluatedPlanPrices. With a value estimate the modeled demand sets the paying share, and the measured conversion is shown in the rendered text but not used. Absent: the segment's benchmark conversion.

MaxTierOutcome

Description

The Max plan's modeled outcome. Absent when the request's planOptions.maxTierInclusion was EXCLUDE, when segment is ENTERPRISE and planOptions.maxTierInclusion is not INCLUDE, when there is no value estimate (no action has a value basis and there is no experiential estimate, see valueKind; the price is then cost-based), and when pricingModel is PER_USE or PER_USE_SPLIT. planOptions.maxTierInclusion INCLUDE with a PER_USE or PER_USE_SPLIT planOptions.pricingModelPreference is rejected; with no preference, a per-use model the service chooses has no Max plan and this is absent.

Members
price
Type: Price structure

The Max plan's price.

status
Required: Yes
Type: string

Whether a Max plan is included, and why.

MeasuredConversion

Description

For a deployed app: how many of its users pay today.

Members
payingUsers
Required: Yes
Type: long (int|float)

Users who pay. At most users.

users
Required: Yes
Type: long (int|float)

Users of the app.

Metric

Description

A usage metric definition for an app. Metrics aggregate raw usage events (by event type) into a metered quantity used for quota enforcement and usage-based billing.

Members
appId
Required: Yes
Type: string

The ID of the app the metric belongs to.

arn
Type: string

The Amazon Resource Name (ARN) of the metric. Output only.

definition
Required: Yes
Type: MetricDefinition structure

The aggregation definition: filters, aggregation function, grouping, and period.

description
Required: Yes
Type: string

A description of what the metric measures.

eventType
Required: Yes
Type: string

The event type this metric aggregates.

metricId
Required: Yes
Type: string

The ID of the metric. We assign this value when you create the metric; it is unique within the app. Treat it as opaque.

name
Required: Yes
Type: string

A human-readable display name for the metric.

stage
Type: string

The offering stage this metric was read from: DRAFT or PUBLISHED. Present on metric reads; absent on write responses.

unitName
Required: Yes
Type: string

The unit of measure for the metric.

MetricDefinition

Description

The definition of how raw events are aggregated into a metric: which events to include (filters), how to combine them (function and functionField), how to group them, and over what period.

Members
filters
Required: Yes
Type: Array of MetricFilter structures

The predicates selecting which events contribute to the metric. Combined with logical AND.

function
Required: Yes
Type: string

The aggregation function applied to matching events (SUM, COUNT, or MAX).

functionField
Type: string

The event property key the aggregation function operates on. Required for SUM and MAX; ignored for COUNT.

groupBy
Required: Yes
Type: Array of strings

The event fields to group aggregated results by.

period
Required: Yes
Type: string

The reset or rollup period for the aggregation.

MetricFilter

Description

A single predicate that selects which events contribute to a metric.

Members
field
Required: Yes
Type: string

The event property key the filter is evaluated against.

operator
Required: Yes
Type: string

The comparison operator (EQUALS, NOT_EQUALS, IN, or NOT_IN).

values
Required: Yes
Type: Array of strings

The values the field is compared against.

MetricUsage

Description

A single metric's raw usage over the window.

Members
metricId
Required: Yes
Type: string

The metric this usage is for.

quantity
Required: Yes
Type: string

The metric's usage over the window, as a plain decimal string (for example, "1500" or "12.5"). For a SUM or COUNT metric this is the total; for a MAX metric it is the largest value recorded. Within a fixed window the value can only grow, as late-arriving events are counted.

ModelComparison

Description

Modeled monthly outcome of one pricing model.

Members
margin
Type: double

Profit as a share of revenue, to 2 decimal places. Absent when revenue is zero.

monthlyProfit
Required: Yes
Type: string

Modeled monthly profit, which can be negative.

monthlyRevenue
Required: Yes
Type: Price structure

Modeled monthly revenue.

paidShare
Required: Yes
Type: double

Modeled share of potential customers who pay, to 2 decimal places.

pricingModel
Required: Yes
Type: string

The pricing model. With a value estimate a per-use model is listed as PER_USE, also when pricingModel is PER_USE_SPLIT; without one the only row is pricingModel.

OneTimePrice

Description

A one-time price for an app: a usage pack a buyer can purchase once to credit a metric.

Members
appId
Required: Yes
Type: string

The ID of the app the one-time price belongs to.

arn
Type: string

The Amazon Resource Name (ARN) of the one-time price.

definition
Required: Yes
Type: OneTimePriceDefinition structure

The definition of the one-time price, including its display name, price, metric, and credited capacity.

oneTimePriceId
Required: Yes
Type: string

The service-assigned ID of the one-time price.

stage
Type: string

The offering stage the one-time price was read from.

OneTimePriceDefinition

Description

The definition of a one-time price, including its display name, price, and the metric capacity each purchase credits.

Members
capacity
Required: Yes
Type: long (int|float)

The units of metricId one purchase credits.

metricId
Required: Yes
Type: string

The metric one purchase credits.

name
Required: Yes
Type: string

A human-readable display name for the one-time price.

price
Required: Yes
Type: Price structure

The amount and currency charged for one purchase of the one-time price.

OutsideOption

Description

Something customers do today without any product, such as doing the task by hand. Give quality or features: one of them is required.

Members
features
Type: Associative array of custom strings keys (FeatureName) to doubles

Its scores on the characteristics in features, instead of quality.

monthlyCost
Required: Yes
Type: double

What it costs a typical customer per month, in USD, for example the hours they spend on it times what an hour of their time is worth. Give the full cost: when an action's value is above 0, it is weighed at the value share (see valueShare), the same as the hours it stands for.

name
Required: Yes
Type: string

Short name, for example write it by hand.

quality
Type: double

How good it is compared with this app, where this app is 1.

PaymentFailurePolicy

Description

How a plan reacts to a failed recurring payment. Each member falls back to the service-wide default when absent.

Members
downgradeToPlanId
Type: string

Plan to move the subscriber to once the attempts are exhausted.

retryAttempts
Type: int

The total number of payment attempts for a failed recurring payment, including the first attempt, before the failure is final. For example, 3 means the first attempt and up to 2 retries.

retryWindowDays
Type: int

The number of days over which to retry a failed recurring payment.

PendingChange

Description

A scheduled change that has not taken effect yet.

Members
effectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the pending change takes effect, at the end of the current billing period.

planId
Type: string

The plan the subscription moves to. Absent for a cancellation.

planName
Type: string

Display name of planId's plan, when known.

Plan

Description

A pricing plan for an app. Users subscribe to published plans; a plan bundles a subscription price and billing cycle with included usage quotas.

Members
appId
Required: Yes
Type: string

The ID of the app the plan belongs to.

arn
Type: string

The Amazon Resource Name (ARN) of the plan.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the plan was created.

definition
Required: Yes
Type: PlanDefinition structure

The plan's pricing and packaging definition.

planId
Required: Yes
Type: string

The identifier of the plan. AWS App Monetization generates this value when the plan is created. It is unique within the app and is never reused. Treat it as opaque.

stage
Type: string

The offering stage the plan was read from.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the plan was last updated.

PlanDefinition

Description

What a plan sells: its price, billing cycle and included usage. A plan has no spend limit: overage past the included usage is billed without a cap.

Members
billingCycle
Required: Yes
Type: string

How often the plan bills.

description
Type: string

A human-readable description of the plan.

includedQuotas
Type: Associative array of custom strings keys (MetricId) to AppQuotaConfig structures

The usage quotas included with the plan, keyed by metric ID. Each entry prices one metric with either a flat grant or a tiered-priced grant.

name
Required: Yes
Type: string

A human-readable display name for the plan.

paymentFailurePolicy
Type: PaymentFailurePolicy structure

How the plan handles a failed recurring payment.

subscriptionPrice
Required: Yes
Type: Price structure

The recurring subscription price charged each billing cycle.

taxCode
Type: string

The product tax code for the plan's price. See ProductTaxCode.

PlanOptions

Description

The pricing model and optional plans to consider, prices to evaluate, and the developer's own price. The response's planOptions.freeTier and planOptions.maxTier report the outcome of the inclusion members. A per-use price has no Free, Max or Annual plan, so freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE together with a pricingModelPreference of PER_USE or PER_USE_SPLIT is rejected. A Free plan makes a flat price tiered, so freeTierInclusion INCLUDE with FLAT is rejected too: TIERED with freeTierInclusion INCLUDE asks for a Free plan.

Members
annualPlanInclusion
Type: string

Whether to add an annual plan (Annual). Absent: it is added when a subscription (FLAT or TIERED) is recommended, without changing the pricing model, unless every action is used less than once a month on average (typicalMonthlyUsage below 1). INCLUDE adds it at any usage and, when the request sends no pricingModelPreference, also limits the choice to subscriptions; INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected. EXCLUDE leaves it out.

creditPackInclusion
Type: string

Whether to add one-time credit packs alongside the plans, the response's creditPacks. Absent: EXCLUDE. INCLUDE is allowed with every pricing model, per-use included.

freeTierInclusion
Type: string

Whether to include a Free plan. Absent: the segment's default, which considers a Free plan for CONSUMER and PROSUMER and not for ENTERPRISE; with a pricingModelPreference, a Free plan is considered only for TIERED. INCLUDE with no pricingModelPreference limits the choice to TIERED; INCLUDE with a PER_USE, PER_USE_SPLIT or FLAT preference is rejected. The response's planOptions.freeTier gives the outcome.

maxTierInclusion
Type: string

Whether to include a Max plan for heavy users. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when this is INCLUDE. Only with a value estimate: when no action has a value basis (minutesSaved, moneySaved or valuePerUse) and there is no experiential estimate (see valueKind), the price is cost-based and this is ignored, with no error: the response has no Max plan and no planOptions.maxTier outcome. A Max plan goes with a TIERED or FLAT model, never PER_USE or PER_USE_SPLIT: INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected, and a per-use model the service chooses has no Max plan. Absent, for CONSUMER and PROSUMER: a TIERED recommendation includes it unless it would clearly lower the modeled profit or almost no paying customer would move up to it; a FLAT one includes it only when it improves the recommendation. Absent, for ENTERPRISE: no Max plan. A TIERED Max is unlimited (includedQuantity 1,000,000,000 with NO_OVERAGE_THROTTLE) unless its buyers' usage would cost too much of the Max price; then it has an allowance and overage. A FLAT Max always has an allowance.

planPrices
Type: Array of PlanPrice structures

Prices to evaluate instead of the recommended ones, one per plan. Each is evaluated against the same modeled demand and returned in planOptions.evaluatedPlanPrices, with the recommended plans and credit packs rebuilt at that price; the recommendation itself does not change. A pro price is evaluated with the Max plan as recommended; when that Max would sit too close to the pro price, Max is re-priced or left out, as the recommendation does when it moves Pro, and the rendered text says which. A max price in the same request does not change this, so a pro item is the same as for that pro price alone. A max price must be above Pro's price, and is evaluated with this request's pro price if it has one. Absent: none, and planOptions.evaluatedPlanPrices is empty.

pricingModelPreference
Type: string

Pricing model to use instead of letting the service choose. planOptions.preferenceOutcome in the response says whether it was used. Absent: the service chooses (preferenceOutcome NOT_REQUESTED). PER_USE_SPLIT needs two or more actions. PER_USE or PER_USE_SPLIT with freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE is rejected, and so is FLAT with freeTierInclusion INCLUDE.

publishedPrice
Type: PublishedPrice structure

Your current or intended monthly price, in USD (another currencyCode is rejected). Shown for comparison, except when no action has a value basis and no comparables are used: then it is the recommended price, raised to cost to serve at the lowest margin in costs.margins (0, which is cost, when margins are omitted) when it is below that. Absent: no price is shown for comparison, and the price comes from the value estimate, comparables or cost.

PlanOptionsOutcome

Description

What became of the request's planOptions.

Members
evaluatedPlanPrices
Required: Yes
Type: Array of EvaluatedPlanPrice structures

Modeled outcome of each price in the request's planOptions.planPrices.

freeTier
Type: FreeTierOutcome structure

The Free plan's modeled outcome, or the free trial suggested instead of it.

maxTier
Type: MaxTierOutcome structure

The Max plan's modeled outcome. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when the request's planOptions.maxTierInclusion is INCLUDE.

preferenceOutcome
Required: Yes
Type: string

Whether the request's planOptions.pricingModelPreference was used.

PlanPrice

Description

A price to evaluate for one recommended plan, or for one action's rate on the pay-as-you-go plan.

Members
actionName
Type: string

With pay_as_you_go only: the action this rate is for, one of actions[].name; the other actions keep their recommended rates. Absent on pay_as_you_go: one rate for every charged action, accepted only when pricingModel is PER_USE.

planCode
Required: Yes
Type: string

Plan code as returned in plans, for example pro. Each plan code appears once.

price
Required: Yes
Type: Price structure

Price per billing cycle, or per use for pay_as_you_go (at least 0.01). A whole number of cents. USD only: another currencyCode is rejected.

PlanSelectionRedirect

Description

A redirect to the hosted pricing page for the buyer to select a plan.

Members
expiresAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the single-use link in pricingUrl expires, 10 minutes after it was created.

pricingUrl
Required: Yes
Type: string

A hosted pricing page URL that carries a session token or a single-use link in its fragment. The link works once, until expiresAt or the end of the session if sooner.

sessionToken
Type: string

The checkout session token carried in the fragment of pricingUrl. Absent when pricingUrl carries a single-use link instead.

Price

Description

A monetary amount in a single currency.

Members
amount
Required: Yes
Type: string

An arbitrary-precision decimal represented as a string (for example, "9.99").

currencyCode
Required: Yes
Type: string

The ISO 4217 currency code (three uppercase letters, for example, "USD").

PriceRange

Description

Lowest and highest price in a range.

Members
high
Required: Yes
Type: Price structure

The highest price in the range.

low
Required: Yes
Type: Price structure

The lowest price in the range.

PricingAnalysis

Description

How the recommendation compares with other pricing models.

Members
frictionAlternative
Type: string

The pricing model the comparison would pick if every pricing model lost the same share of buyers at checkout. Present when pricingModelCaveats has CHECKOUT_DROP_OFF.

modelComparison
Required: Yes
Type: Array of ModelComparison structures

Modeled outcome of each pricing model compared, under the same modeled demand.

pricingModelCaveats
Required: Yes
Type: Array of strings

Caveats on the comparison of pricing models by modeled profit. Empty when none applies or none was checked (see PricingModelCaveat).

PublishedPrice

Description

The developer's current or intended monthly price.

Members
amount
Required: Yes
Type: string

The price amount.

currencyCode
Required: Yes
Type: string

The currency of the price. USD only: another currencyCode is rejected.

RecommendedCreditPack

Description

A one-time pack of units of one action.

Members
actionName
Required: Yes
Type: string

An action's key within the recommendation, used in plans, unitPrices and creditPacks: a name in the request's actions. The developer maps it to the app's metric.

name
Required: Yes
Type: string

Pack name shown to buyers.

price
Required: Yes
Type: Price structure

The pack price.

quantity
Required: Yes
Type: long (int|float)

Units in the pack.

RecommendedPlan

Description

One recommended plan.

Members
billingCycle
Required: Yes
Type: string

How often the plan bills, as in CreatePlan's definition.billingCycle.

downgradePlanCodes
Required: Yes
Type: Array of strings

Plan codes a subscriber can downgrade to, cheapest first.

includedQuotas
Required: Yes
Type: Array of RecommendedQuota structures

Units included per action, with what happens past them.

name
Required: Yes
Type: string

Plan name shown to buyers, for example Pro or Annual.

planCode
Required: Yes
Type: string

This plan's key within the recommendation, for example pro. The request's planOptions.planPrices, and this plan's upgradePlanCodes and downgradePlanCodes, refer to plans by it. It is not a PlanId: CreatePlan assigns the PlanId when the plan is created.

price
Required: Yes
Type: Price structure

Subscription price per billing cycle.

upgradePlanCodes
Required: Yes
Type: Array of strings

Plan codes a subscriber can upgrade to, cheapest first.

RecommendedQuota

Description

Included units of one action in a plan.

Members
actionName
Required: Yes
Type: string

An action's key within the recommendation, used in plans, unitPrices and creditPacks: a name in the request's actions. The developer maps it to the app's metric.

includedQuantity
Required: Yes
Type: long (int|float)

The number of units included.

overagePolicy
Required: Yes
Type: string

What happens to usage past the included units.

overagePrice
Type: Price structure

Price per unit past the included quantity. With APPLY_FIXED_OVERAGE only. Overage is not capped.

RequestContext

Description

Where the inputs came from, and notes on them. None of these members changes a price, plan, verdict or confidence label; they only label and word the inputs in summary and details.

Members
customerTypeDescriptions
Type: Associative array of custom strings keys (CustomerTypeName) to strings

One line on who each customer type is, by market.customerTypes name. Absent for a type: only its name is shown.

expectedUsersBasis
Type: string

Where market.expectedUsers came from. Absent: the rendered text labels it a rough guess from the app's category.

nonAwsCostsNote
Type: string

The developer's note on non-AWS costs. Absent: the rendered text says none were found (and names any costs.unknown items).

usageSources
Type: Associative array of custom strings keys (BillableActionName) to strings

Whether each action's typicalMonthlyUsage is an estimate or was measured on a deployed app (the last 30 days' average per active user), by action name. Absent for an action: ESTIMATE.

valueBasis
Type: string

How the value figures (minutesSaved, moneySaved or valuePerUse, and valueShare) were worked out, for example "drafting a reply by hand takes about 10 minutes". Shown on the Value row of summary, and with the value inputs in details. Absent: not shown.

ResourceNotFoundException

Description

The referenced resource does not exist.

Members
message
Required: Yes
Type: string

Human-readable description of the missing resource.

resourceId
Type: string

Identifier of the resource that was not found.

resourceType
Type: string

Type of the resource that was not found (for example, "App" or "Plan").

RevenueGroup

Description

A revenue breakdown for a single value of the groupBy dimension.

Members
key
Required: Yes
Type: string

The value of the groupBy dimension for this row.

subscriptionRevenue
Required: Yes
Type: string

The subscription revenue for this group.

totalRevenue
Required: Yes
Type: string

The total revenue for this group.

usageRevenue
Required: Yes
Type: string

The usage-based revenue for this group.

users
Type: int

The number of users attributed to this group.

RevisionConflictException

Description

The request's revision does not match the resource's current revision. Retry with the current revision.

Members
currentRevision
Required: Yes
Type: int

Current revision, so the client can retry without a separate read.

message
Required: Yes
Type: string

Human-readable description of the revision conflict.

ServiceQuotaExceededException

Description

The request would cause a service quota to be exceeded.

Members
message
Required: Yes
Type: string

Human-readable description of the exceeded quota.

quotaCode
Type: string

Service Quotas identifier for the exceeded quota.

resourceId
Type: string

Identifier of the resource affected.

resourceType
Type: string

Type of the resource affected.

serviceCode
Type: string

Service Quotas identifier for the originating service.

ServiceUnavailableException

Description

The service is temporarily unavailable. Retry the request after the time in retryAfterSeconds.

Members
message
Required: Yes
Type: string

Human-readable description of the service-unavailable condition.

retryAfterSeconds
Type: int

Advice to clients on when the call can be safely retried.

Subscription

Description

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

Members
appId
Required: Yes
Type: string

The ID of the app that the subscription belongs to.

billingAnchorDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

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.

billingCycle
Type: string

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

effectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the subscription took effect.

planId
Type: string

The ID of the plan that the user is subscribed to.

userId
Required: Yes
Type: string

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

SubscriptionChange

Description

A no-payment plan change and when it takes effect.

Members
effectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The instant the change takes effect: a future period boundary for a scheduled downgrade, or now for a change applied immediately or a no-op.

SubscriptionGroup

Description

A subscriber count for a single value of the groupBy dimension.

Members
count
Required: Yes
Type: int

The number of subscribers in this group.

key
Required: Yes
Type: string

The value of the groupBy dimension for this row.

SubscriptionSummary

Description

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.

Members
appId
Required: Yes
Type: string

The ID of the app that the subscription belongs to.

billingAnchorDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

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
Type: string

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

effectiveAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the subscription took effect.

planId
Type: 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.

userId
Required: Yes
Type: string

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

TaxRegistration

Description

A jurisdiction where the seller is registered to collect tax.

Members
collectionType
Required: Yes
Type: string

The country-specific collection type (for example, "state_sales_tax", "standard", or "simplified").

countryCode
Required: Yes
Type: string

The ISO 3166-1 alpha-2 country code.

locality
Type: string

Jurisdiction below the state, as a code rather than a name: a FIPS code in the US, an IBGE code in Brazil. Requires state. Optional.

registrationId
Type: string

The tax ID issued for this registration (permit number or tax registration number). Optional.

registrationType
Type: string

Which tax this registration is for, or which entity identifier it carries (for example SALES_USE for a US state, VAT or GST elsewhere, FEDERAL_EIN for a US employer identification number). Optional.

state
Type: string

The state or province code (for example, "NY" or "CA"). Required for US and CA.

ThirdPartyCostItem

Description

A seller-declared, non-AWS recurring cost for an app. A flat monthly charge that stands until the developer updates or removes it (no proration, no usage scaling).

Members
amount
Required: Yes
Type: string

The flat monthly amount as a decimal string (for example, "12.50").

appId
Required: Yes
Type: string

The ID of the app the cost belongs to.

costId
Required: Yes
Type: string

The ID of the cost.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the cost was created.

currency
Required: Yes
Type: string

The currency of the amount. USD is the only supported currency.

description
Type: string

A free-form description of the cost.

effectiveFrom
Type: string

First month (YYYY-MM) the cost applies in. Absent means the cost has no start month.

effectiveTo
Type: string

Last month (YYYY-MM) the cost applies in. Absent means the cost has no end month.

frequency
Required: Yes
Type: string

How often the cost recurs. MONTHLY is the only value today.

label
Required: Yes
Type: string

A human-readable label for the cost (for example, "Anthropic API").

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the cost was last updated.

ThrottlingException

Description

The request was denied due to request throttling.

Members
message
Required: Yes
Type: string

Human-readable description of the throttling condition.

quotaCode
Type: string

Service Quotas identifier for the throttled quota.

retryAfterSeconds
Type: int

Advice to clients on when the call can be safely retried.

serviceCode
Type: string

Service Quotas identifier for the originating service.

TierBand

Description

One band of a tiered price or overage schedule: a unit range and the per-unit price that applies within it.

Members
firstUnit
Required: Yes
Type: long (int|float)

The first unit covered by this band.

lastUnit
Type: long (int|float)

The last unit covered by this band. Absent on the final, unbounded band.

unitPrice
Required: Yes
Type: Price structure

The per-unit price charged within this band.

TieredOverage

Description

A tiered overage schedule: how usage beyond a plan's included allowance is priced across bands.

Members
semantics
Required: Yes
Type: string

Whether the bands price graduated (each band's units at its own rate, summed) or volume (all charged units at the rate of the band reached).

tiers
Required: Yes
Type: Array of TierBand structures

The ordered price bands, from lowest units to highest.

TieredPrice

Description

A tiered price schedule, selected by the tiered arm of AppQuotaConfig. Bands count charged units past the free allowance, as TieredOverage bands do. Unlike TieredOverage, which is an overage policy on a flat grant, this is the metric's price model, and its free allowance (includedQuantity) is set separately and may be 0 (tier-priced from the first unit). GRADUATED prices the units within each band at that band's rate and sums; VOLUME prices every charged unit at the rate of the highest band reached.

Members
semantics
Required: Yes
Type: string

Whether the bands price graduated (each band's units at its own rate, summed) or volume (all charged units at the rate of the band reached).

tiers
Required: Yes
Type: Array of TierBand structures

The ordered price bands, from lowest units to highest. Uses the same TierBand shape (firstUnit/lastUnit/unitPrice) as tiered overage bands.

UnitPrice

Description

Price per use of one action.

Members
actionName
Required: Yes
Type: string

An action's key within the recommendation, used in plans, unitPrices and creditPacks: a name in the request's actions. The developer maps it to the app's metric.

price
Required: Yes
Type: Price structure

The price per use.

UsageGroup

Description

A usage total for a single value of the groupBy dimension.

Members
key
Required: Yes
Type: string

The value of the groupBy dimension for this row.

metricName
Type: string

The name of the metric, when the summary is grouped by metric.

usage
Required: Yes
Type: long (int|float)

The number of usage events in this group.

ValidationException

Description

The request failed input validation.

Members
fieldList
Type: Array of ValidationExceptionField structures

The specific input fields that failed validation, when applicable.

message
Required: Yes
Type: string

Human-readable description of what failed validation.

reason
Type: string

Machine-readable reason the request failed validation, so callers act without parsing the message.

ValidationExceptionField

Description

An input field that failed validation, with the reason it failed.

Members
message
Required: Yes
Type: string

A human-readable description of why the field failed validation.

name
Required: Yes
Type: string

The name of the input field that failed validation.