---
title: "Register an AWS Marketplace agreement"
method: POST
path: "/marketplace/agreements"
tags: ["Marketplace"]
---

# Register an AWS Marketplace agreement

`POST /marketplace/agreements`

Registers an AWS Marketplace buyer agreement against an existing Flexprice subscription, upserting plan/subscription/customer integration mappings in one call.

## Request body

- RegisterMarketplaceAgreementRequest
  - `aws` AWSMarketplaceAgreement
    - `concurrent_agreements` boolean — if true, ProductCode is omitted when reporting
    - `customer_aws_account_id` string, required — -> BatchMeterUsage's CustomerAWSAccountId
    - `dimension` string, required — -> BatchMeterUsage's Dimension (always "usage_fee" in the cents model)
    - `license_arn` string, required — -> BatchMeterUsage's LicenseArn; identifies the buyer's agreement
    - `product_code` string, required — -> BatchMeterUsage's ProductCode (omitted when ConcurrentAgreements)
  - `azure` AzureMarketplaceAgreement
    - `beneficiary_account_id` string, required — writes the customer mapping; not read in the report payload
    - `dimension` string, required — -> usageEvent's dimension (always "usage_fee" in the cents model)
    - `plan_id` string, required — -> usageEvent's planId; Azure's plan id, distinct from the request's top-level PlanID
    - `resource_id` string, required — -> usageEvent's resourceId; the Azure SaaS subscription id
  - `customer_id` string, required
  - `gcp` GCPMarketplaceAgreement
    - `account_id` string, required — writes the customer mapping; not read in the report payload
    - `metric_name` string, required — -> services.report's metricName (always "{service_name}/usage_fee")
    - `service_name` string, required — -> services.report URL's service_name; identifies the product
    - `usage_reporting_id` string, required — -> services.report's consumerId; identifies the buyer
  - `plan_id` string, required
  - `provider` 'flexprice' | 'stripe' | 's3' | 'hubspot' | 'razorpay' | 'chargebee' | 'quickbooks' | 'zoho_books' | 'nomod' | 'moyasar' | 'paddle' | 'whop' | 'tabs' | 'aws_marketplace' | 'gcp_marketplace' | 'azure_marketplace', required
  - `subscription_id` string, required

## Response `201`

Created

- RegisterMarketplaceAgreementResponse
  - `customer_mapping_id` string
  - `plan_mapping_id` string
  - `status` string
  - `subscription_mapping_id` string

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/f0601ed97bd3/schema)
