API Intergration

Now you can start to integrate your SaaS application with AWS Marketplace API. Here is an overview of the requirement to your SaaS application for API integration.

1. Validate New Customers

After a customer subscribing to your product, they will be redirected to the fulfillment URL. The redirect is a POST request & includes a temporary token. Your application needs to:

  • Exchange the token for a customerID by calling ResolveCustomer in the AWS Marketplace Metering Service.
  • After obtaining a customerID, persist it in your application for future calls.

2. Onboard New Customers

After successfully verifying a customer, onboard them to your application. For example, having them fill out a form to create a new user account, or providing them information for access to the application.

3. Sending Metering Records

You use the BatchMeterUsage in the AWS Marketplace Metering Service to deliver metering records to AWS on behalf of your customers. We recommend using CloudTrail to monitor activity to ensure that billing information is being sent to AWS Marketplace. Keep in mind when sending metering records:

  • Marketplace de-duplicates metering requests on the hour.
  • Records sent every hour are cumulative.
  • Best practice is to send records every hour, even if quantity is 0.

4. Monitor for Changes

Set up an SQS queue and subscribe to your product’s SNS topic. This topic provides notifications about changes to your customer’s subscription. This enables you to know when to provide and revoke access for specific customers. Possible scenarios include: unsubscribes, successful subscription and failed subscription.

5. Verify Successful Subscription

After receiving a subscribe-success notification, the customer account is ready for metering. Records that you send before this notification aren’t metered. Additionally, we recommend waiting for this message before launching resources on behalf of a customer.


The integration process depends on the pricing model you selected. This process is only appropriate for SaaS subscription products. For the other pricing model, you could watch the video below for more information.