Skip to content

Amazon Web Services Marketplace is introducing Concurrent Agreements, enabling buyers to make multiple purchases per Amazon Web Services account

Description

Amazon Web Services Marketplace is introducing Concurrent Agreements, enabling buyers to make multiple purchases per Amazon Web Services account. Starting June 1, 2026, new SaaS products must use CustomerAWSAccountId (instead of CustomerIdentifier), LicenseArn (instead of ProductCode) to support this feature. batch_meter_usage does not support CustomerIdentifier for new integrations. Existing integrations continue to work. Review the new integration for Concurrent Agreements here. For additional implementation details, see BatchMeterUsage code example with LicenseArn in the Amazon Web Services Marketplace Seller Guide.

To post metering records for customers, SaaS applications call batch_meter_usage, which is used for metering SaaS flexible consumption pricing (FCP). Identical requests are idempotent and can be retried with the same records or a subset of records. Each batch_meter_usage request is for only one product. If you want to meter usage for multiple products, you must make multiple batch_meter_usage calls.

Usage records should be submitted in quick succession following a recorded event. Usage records aren't accepted 24 hours or more after an event. At the end of each billing cycle, a 6-hour grace period applies. We accept usage records for the previous billing month until 06:00 UTC on the first day of the next month. For example, you must submit March usage records before 06:00 UTC on April 1. On April 1 at 05:00 UTC, you can still submit records for March 31 (within the 6-hour grace period). After 06:00 UTC on April 1, March records are rejected regardless of the normal 24-hour submission window. After this grace period, we return a TimestampOutOfBoundsException error.

batch_meter_usage can process up to 25 UsageRecords at a time, and each request must be less than 1 MB in size. Optionally, you can have multiple usage allocations for usage data that's split into buckets according to predefined tags.

batch_meter_usage returns a list of UsageRecordResult objects, which have each UsageRecord. It also returns a list of UnprocessedRecords, which indicate errors on the service side that should be retried.

For Amazon Web Services Regions that support batch_meter_usage, see BatchMeterUsage Region support.

For an example of batch_meter_usage, see BatchMeterUsage code example in the Amazon Web Services Marketplace Seller Guide.

Usage

marketplacemetering_batch_meter_usage(UsageRecords, ProductCode)

Arguments

  • UsageRecords

    [required] The set of UsageRecords to submit. batch_meter_usage accepts up to 25 UsageRecords at a time.

  • ProductCode

    Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code should be the same as the one used during the publishing of a new product.

    ProductCode is required only for legacy integrations that use CustomerIdentifier. For new integrations using LicenseArn (Concurrent Agreements), do NOT include ProductCode at the request level. The LicenseArn in each UsageRecord identifies both the product and the specific agreement.

    Sending metering records with both ProductCode and LicenseArn for the same customer within the same hour will result in duplicate billing. If you are migrating from product-based metering to license-based metering, stop sending ProductCode before you start sending LicenseArn.

Value

A list with the following syntax:

list(
  Results = list(
    list(
      UsageRecord = list(
        Timestamp = as.POSIXct(
          "2015-01-01"
        ),
        CustomerIdentifier = "string",
        Dimension = "string",
        Quantity = 123,
        UsageAllocations = list(
          list(
            AllocatedUsageQuantity = 123,
            Tags = list(
              list(
                Key = "string",
                Value = "string"
              )
            )
          )
        ),
        CustomerAWSAccountId = "string",
        LicenseArn = "string"
      ),
      MeteringRecordId = "string",
      Status = "Success"|"CustomerNotSubscribed"|"DuplicateRecord"
    )
  ),
  UnprocessedRecords = list(
    list(
      Timestamp = as.POSIXct(
        "2015-01-01"
      ),
      CustomerIdentifier = "string",
      Dimension = "string",
      Quantity = 123,
      UsageAllocations = list(
        list(
          AllocatedUsageQuantity = 123,
          Tags = list(
            list(
              Key = "string",
              Value = "string"
            )
          )
        )
      ),
      CustomerAWSAccountId = "string",
      LicenseArn = "string"
    )
  )
)

Request syntax

svc$batch_meter_usage(
  UsageRecords = list(
    list(
      Timestamp = as.POSIXct(
        "2015-01-01"
      ),
      CustomerIdentifier = "string",
      Dimension = "string",
      Quantity = 123,
      UsageAllocations = list(
        list(
          AllocatedUsageQuantity = 123,
          Tags = list(
            list(
              Key = "string",
              Value = "string"
            )
          )
        )
      ),
      CustomerAWSAccountId = "string",
      LicenseArn = "string"
    )
  ),
  ProductCode = "string"
)