

# Setting up AWS App Monetization

Before you bill customers, you set up your app and integrate your application with AWS App Monetization. This chapter describes the prerequisites, how to integrate your application, and how to use Sandbox to validate your setup.

**Topics**
+ [Prerequisites](#setting-up-prerequisites)
+ [Integrating your application](#setting-up-connect)
+ [Sandbox (test mode)](#setting-up-test-mode)

## Prerequisites
<a name="setting-up-prerequisites"></a>

Before you begin, make sure that you have the following:
+ An AWS account. If you do not have one, you can create an account at [https://aws.amazon.com/](https://aws.amazon.com/).
+ An application that you build or run on AWS, with access to its source code.
+ Permissions to use AWS App Monetization. For more information, see [Identity-based policy examples for AWS App Monetization](security_iam_id-based-policy-examples.md).
+ If you use the AWS App Monetization skill, a coding agent with the skill installed through the AWS Agent Toolkit or AWS Startup Advisor.

## Integrating your application
<a name="setting-up-connect"></a>

Your application integrates with AWS App Monetization in the following ways:
+ Metering hooks report usage. For more information, see [Adding metering hooks](metering-usage.md#metering-hooks).
+ Entitlement checks confirm what a customer can access. For more information, see [Quota enforcement](metering-usage.md#entitlements).
+ Links open the hosted pricing and checkout pages and the buyer portal for a customer. For more information, see [Hosted pricing and checkout pages](checkout-billing.md#billing-hosted-pages) and [Subscriptions and the buyer portal](checkout-billing.md#billing-subscriptions-portal).

The AWS App Monetization skill adds this integration code to your application for you. The skill is available through the AWS Agent Toolkit and AWS Startup Advisor.

You can also integrate directly through the REST API or the AWS SDKs.

For the guided setup flow, see [Getting started with AWS App Monetization](getting-started.md).

## Sandbox (test mode)
<a name="setting-up-test-mode"></a>

Sandbox is an isolated test environment that runs your app's draft configuration. You validate pricing, metering, and checkout in Sandbox without processing real payments. You use Sandbox to confirm that your setup works end to end before you publish.

In Sandbox, you can do the following:
+ Create plans and simulate customer subscriptions.
+ Generate usage and confirm that metering and quota enforcement behave as expected.
+ Complete checkout with a Stripe test card, such as `4242 4242 4242 4242` with any future expiration date and any CVC, and review the resulting invoices. For other test cards, see [Testing](https://docs.stripe.com/testing) on the Stripe website.

**Note**  
In Sandbox, infrastructure costs are real AWS spend, not test figures.

Sandbox remains available as a permanent environment after you go live, so you can test changes before you publish them to live customers. For more information about publishing, see [Set up and publish your app](getting-started.md#getting-started-flow).