> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create contract

> Creates a contract for a customer together with all of its (custom) subscriptions in a single atomic operation. Every new subscription is created inside one transaction — any validation or creation failure rolls the whole contract back. Each subscription entry is either a new subscription to create or a reference to an existing custom subscription. Returns the created contract.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/stigg/openapi.documented.yml post /api/v1/contracts
openapi: 3.0.0
info:
  title: Stigg API
  description: Stigg API documentation
  version: 7.129.2
  contact: {}
servers:
  - url: https://api.stigg.io
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Operations related to customers
  - name: Subscriptions
    description: Operations related to subscriptions
  - name: Coupons
    description: Operations related to coupons
  - name: Bulk Import
    description: Operations related to import of customers and subscriptions
  - name: Usage
    description: Operations related to usage & metering
  - name: Promotional Entitlements
    description: Operations related to promotional entitlements
  - name: Products
    description: Operations related to products
  - name: Features
    description: Operations related to features
  - name: Addons
    description: Operations related to addons
  - name: Plans
    description: Operations related to plans
  - name: Credit grants
    description: Operations related to credit grants
  - name: Credit ledger
    description: Operations related to credit ledger
  - name: Custom currencies
    description: Operations related to custom currencies
paths:
  /api/v1/contracts:
    post:
      tags:
        - Contracts
      summary: Create contract
      description: >-
        Creates a contract for a customer together with all of its (custom)
        subscriptions in a single atomic operation. Every new subscription is
        created inside one transaction — any validation or creation failure
        rolls the whole contract back. Each subscription entry is either a new
        subscription to create or a reference to an existing custom
        subscription. Returns the created contract.
      operationId: ContractController_createContract
      parameters:
        - name: X-ACCOUNT-ID
          in: header
          description: >-
            Account ID — optional when authenticating with a user JWT (Bearer
            token); falls back to the user's first membership. Ignored for
            API-key auth.
          required: false
          schema:
            type: string
        - name: X-ENVIRONMENT-ID
          in: header
          description: >-
            Environment ID — required when authenticating with a user JWT
            (Bearer token) on environment-scoped endpoints. Ignored for API-key
            auth (env is intrinsic to the key).
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractRequestDto'
      responses:
        '201':
          description: >-
            The created contract, including the custom subscriptions attached to
            it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponseDto'
              examples:
                default:
                  value:
                    data:
                      contractId: contract-acme-2026
                      billingId: ct_1a2b3c4d
                      id: 3452155b-deca-4d7f-91e5-82d486dc8bb0
                      refId: contract-acme-2026
                      poNumber: PO-4821
                      externalId: contract-acme-2026
                      customerExternalId: customer-acme
                      name: PO-4821
                      state: ACTIVE
                      activationStartDate: '2026-01-01T00:00:00.000Z'
                      activationEndDate: '2026-12-31T00:00:00.000Z'
                      createdAt: '2025-12-15T09:30:00.000Z'
                      nextInvoice:
                        amount:
                          amount: 4900
                          currency: usd
                        dueDate: '2026-08-01T00:00:00.000Z'
                        periodStart: '2026-07-01T00:00:00.000Z'
                        periodEnd: '2026-08-01T00:00:00.000Z'
                      latestInvoice:
                        billingId: inv_abc123
                        status: OPEN
                        createdAt: '2026-07-01T00:00:00.000Z'
                        total: 4900
                        amountDue: 4900
                        currency: usd
                        pdfUrl: null
                        requiresAction: false
                        billingReason: null
                      subscriptions:
                        - subscriptionId: subscription-acme-platform
                          planDisplayName: Enterprise Platform
                          productDisplayName: Revvenu
        '400':
          description: bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadInputErrorResponseDto'
        '401':
          description: User is not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponseDto'
        '403':
          description: User is not allowed to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponseDto'
        '409':
          description: Contract conflict error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictErrorResponseDto'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponseDto'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Stigg from '@stigg/typescript';

            const client = new Stigg({
              apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
            });

            const contract = await client.v1.contracts.create({
              customerId: 'customerId',
              subscriptions: [{}],
            });

            console.log(contract.data);
        - lang: Python
          source: |-
            import os
            from stigg import Stigg

            client = Stigg(
                api_key=os.environ.get("STIGG_API_KEY"),  # This is the default and can be omitted
            )
            contract = client.v1.contracts.create(
                customer_id="customerId",
                subscriptions=[{}],
            )
            print(contract.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stiggio/stigg-go\"\n\t\"github.com/stiggio/stigg-go/option\"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontract, err := client.V1.Contracts.New(context.TODO(), stigg.V1ContractNewParams{\n\t\tCustomerID:    \"customerId\",\n\t\tSubscriptions: []stigg.V1ContractNewParamsSubscription{{}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", contract.Data)\n}\n"
        - lang: Java
          source: |-
            package io.stigg.example;

            import io.stigg.client.StiggClient;
            import io.stigg.client.okhttp.StiggOkHttpClient;
            import io.stigg.models.v1.contracts.ContractCreateParams;
            import io.stigg.models.v1.contracts.ContractCreateResponse;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    StiggClient client = StiggOkHttpClient.fromEnv();

                    ContractCreateParams params = ContractCreateParams.builder()
                        .customerId("customerId")
                        .addSubscription(ContractCreateParams.Subscription.builder().build())
                        .build();
                    ContractCreateResponse contract = client.v1().contracts().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "stigg"


            stigg = Stigg::Client.new(api_key: "My API Key")


            contract = stigg.v1.contracts.create(customer_id: "customerId",
            subscriptions: [{}])


            puts(contract)
        - lang: C#
          source: |-
            using System;
            using System.Collections.Generic;
            using Stigg.Client;
            using Contracts = Stigg.Client.Models.V1.Contracts;

            StiggClient client = new();

            Contracts::ContractCreateParams parameters = new()
            {
                CustomerID = "customerId",
                Subscriptions =
                [
                    new()
                    {
                        ExistingSubscriptionID = "existingSubscriptionId",
                        NewSubscription = new()
                        {
                            CustomerID = "customerId",
                            PlanID = "planId",
                            ID = "id",
                            Addons =
                            [
                                new()
                                {
                                    ID = "id",
                                    Quantity = 0,
                                },
                            ],
                            AppliedCoupon = new()
                            {
                                BillingCouponID = "billingCouponId",
                                Configuration = new()
                                {
                                    StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
                                },
                                CouponID = "couponId",
                                Discount = new()
                                {
                                    AmountsOff =
                                    [
                                        new()
                                        {
                                            Amount = 0,
                                            Currency = Contracts::Currency.Usd,
                                        },
                                    ],
                                    Description = "description",
                                    DurationInMonths = 1,
                                    Name = "name",
                                    PercentOff = 1,
                                },
                                PromotionCode = "promotionCode",
                            },
                            AwaitPaymentConfirmation = true,
                            BillingCountryCode = "billingCountryCode",
                            BillingCycleAnchor = Contracts::BillingCycleAnchor.Unchanged,
                            BillingID = "billingId",
                            BillingInformation = new()
                            {
                                BillingAddress = new()
                                {
                                    City = "city",
                                    Country = "country",
                                    Line1 = "line1",
                                    Line2 = "line2",
                                    PostalCode = "postalCode",
                                    State = "state",
                                },
                                ChargeOnBehalfOfAccount = "chargeOnBehalfOfAccount",
                                IntegrationID = "integrationId",
                                InvoiceDaysUntilDue = 0,
                                IsBackdated = true,
                                IsInvoicePaid = true,
                                Metadata = new Dictionary<string, string>()
                                {
                                    { "foo", "string" }
                                },
                                ProrationBehavior = Contracts::ProrationBehavior.InvoiceImmediately,
                                TaxIds =
                                [
                                    new()
                                    {
                                        Type = "type",
                                        Value = "value",
                                    },
                                ],
                                TaxPercentage = 0,
                                TaxRateIds =
                                [
                                    "string"
                                ],
                            },
                            BillingPeriod = Contracts::BillingPeriod.Monthly,
                            Budget = new()
                            {
                                HasSoftLimit = true,
                                Limit = 0,
                            },
                            CancellationDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
                            Charges =
                            [
                                new()
                                {
                                    ID = "id",
                                    Quantity = 0,
                                    Type = Contracts::Type.Feature,
                                },
                            ],
                            CheckoutOptions = new()
                            {
                                CancelUrl = "https://example.com",
                                SuccessUrl = "https://example.com",
                                AllowPromoCodes = true,
                                AllowTaxIDCollection = true,
                                CollectBillingAddress = true,
                                CollectPhoneNumber = true,
                                ReferenceID = "referenceId",
                            },
                            Entitlements =
                            [
                                new Contracts::Feature()
                                {
                                    ID = "id",
                                    HasSoftLimit = true,
                                    HasUnlimitedUsage = true,
                                    MonthlyResetPeriodConfiguration = new(
                                        Contracts::AccordingTo.SubscriptionStart
                                    ),
                                    ResetPeriod = Contracts::ResetPeriod.Year,
                                    UsageLimit = 0,
                                    WeeklyResetPeriodConfiguration = new(
                                        Contracts::WeeklyResetPeriodConfigurationAccordingTo.SubscriptionStart
                                    ),
                                    YearlyResetPeriodConfiguration = new(
                                        Contracts::YearlyResetPeriodConfigurationAccordingTo.SubscriptionStart
                                    ),
                                },
                            ],
                            Metadata = new Dictionary<string, string>()
                            {
                                { "foo", "string" }
                            },
                            MinimumSpend = new()
                            {
                                Amount = 0,
                                Currency = Contracts::MinimumSpendCurrency.Usd,
                            },
                            PayingCustomerID = "payingCustomerId",
                            PaymentCollectionMethod = Contracts::PaymentCollectionMethod.Charge,
                            PriceOverrides =
                            [
                                new()
                                {
                                    AddonID = "addonId",
                                    Amount = 0,
                                    BaseCharge = true,
                                    BillingCountryCode = "billingCountryCode",
                                    BlockSize = 0,
                                    CreditGrantCadence = Contracts::CreditGrantCadence.BeginningOfBillingPeriod,
                                    CreditRate = new()
                                    {
                                        Amount = 1,
                                        CurrencyID = "currencyId",
                                        CostFormula = "costFormula",
                                    },
                                    Currency = Contracts::PriceOverrideCurrency.Usd,
                                    FeatureID = "featureId",
                                    Tiers =
                                    [
                                        new()
                                        {
                                            FlatPrice = new()
                                            {
                                                Amount = 0,
                                                Currency = Contracts::FlatPriceCurrency.Usd,
                                            },
                                            UnitPrice = new()
                                            {
                                                Amount = 0,
                                                Currency = Contracts::UnitPriceCurrency.Usd,
                                            },
                                            UpTo = 0,
                                        },
                                    ],
                                },
                            ],
                            ResourceID = "resourceId",
                            SalesforceID = "salesforceId",
                            ScheduleStrategy = Contracts::ScheduleStrategy.EndOfBillingPeriod,
                            StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
                            TrialOverrideConfiguration = new()
                            {
                                IsTrial = true,
                                TrialEndBehavior = Contracts::TrialEndBehavior.ConvertToPaid,
                                TrialEndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
                            },
                            UnitQuantity = 0,
                        },
                    },
                ],
            };

            var contract = await client.V1.Contracts.Create(parameters);

            Console.WriteLine(contract);
        - lang: CLI
          source: |-
            stigg v1:contracts create \
              --api-key 'My API Key' \
              --customer-id customerId \
              --subscription '{}'
components:
  schemas:
    CreateContractRequestDto:
      type: object
      properties:
        customerId:
          type: string
          maxLength: 255
          minLength: 1
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
          description: The customer ref ID the contract belongs to
        name:
          type: string
          maxLength: 255
          description: Optional contract name
          nullable: true
        poNumber:
          type: string
          maxLength: 255
          description: Optional purchase-order number
          nullable: true
        activationStartDate:
          description: Optional contract activation start date
          type: string
          format: date-time
        activationEndDate:
          description: Optional contract activation end date
          type: string
          format: date-time
        setupBilling:
          default: true
          type: boolean
          description: >-
            Whether to set up billing for the contract by creating a billing
            contract in the connected billing provider. When false, the contract
            only provisions access (grants entitlements) and no billing contract
            is created. Defaults to true.
        subscriptions:
          type: array
          items:
            type: object
            properties:
              newSubscription:
                type: object
                properties:
                  id:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                    description: Unique identifier for the subscription
                  customerId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
                    description: Customer ID to provision the subscription for
                  planId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                    description: Plan ID to provision
                  payingCustomerId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
                    description: Optional paying customer ID for split billing scenarios
                    nullable: true
                  resourceId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                    description: Optional resource ID for multi-instance subscriptions
                    nullable: true
                  billingPeriod:
                    type: string
                    enum:
                      - MONTHLY
                      - ANNUALLY
                    description: Billing period (MONTHLY or ANNUALLY)
                  addons:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          maxLength: 255
                          minLength: 1
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                          description: Addon ID
                        quantity:
                          type: integer
                          minimum: 0
                          description: Number of addon instances
                      required:
                        - id
                        - quantity
                      title: SubscriptionAddon
                      description: Addon configuration
                  charges:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - FEATURE
                            - CREDIT
                          description: Charge type
                        id:
                          type: string
                          maxLength: 255
                          description: Charge ID
                        quantity:
                          type: number
                          minimum: 0
                          description: Charge quantity. Minimum is 0 (zero is allowed).
                      required:
                        - type
                        - id
                        - quantity
                      additionalProperties: false
                      title: SubscriptionCharge
                      description: >-
                        A charge selection for a subscription (references a
                        catalog charge with a quantity).
                  startDate:
                    type: string
                    format: date-time
                    description: Subscription start date
                  cancellationDate:
                    type: string
                    format: date-time
                    description: Subscription cancellation date
                  billingInformation:
                    type: object
                    properties:
                      taxRateIds:
                        type: array
                        items:
                          type: string
                          maxLength: 255
                          description: Tax rate identifiers to apply
                        description: Tax rate identifiers to apply
                      taxPercentage:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Tax percentage (0-100)
                      billingAddress:
                        type: object
                        properties:
                          city:
                            type: string
                          country:
                            type: string
                          line1:
                            type: string
                          line2:
                            type: string
                          postalCode:
                            type: string
                          state:
                            type: string
                        description: Billing address for the subscription
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                        description: Additional metadata for the subscription
                      chargeOnBehalfOfAccount:
                        type: string
                        maxLength: 255
                        description: Stripe Connect account to charge on behalf of
                        nullable: true
                      isBackdated:
                        default: false
                        type: boolean
                        description: Whether the subscription is backdated
                      isInvoicePaid:
                        default: false
                        type: boolean
                        description: Whether the invoice is marked as paid
                      invoiceDaysUntilDue:
                        type: number
                        description: Number of days until invoice is due
                      integrationId:
                        type: string
                        maxLength: 255
                        description: Billing integration identifier
                        nullable: true
                      prorationBehavior:
                        type: string
                        enum:
                          - INVOICE_IMMEDIATELY
                          - CREATE_PRORATIONS
                          - NONE
                        description: How to handle proration for billing changes
                      taxIds:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              maxLength: 255
                              description: >-
                                The type of tax exemption identifier, such as
                                VAT.
                            value:
                              type: string
                              maxLength: 255
                              description: The actual tax identifier value
                          required:
                            - type
                            - value
                          additionalProperties: false
                          title: TaxExemptInput
                          description: >-
                            Tax identifier with type and value for customer tax
                            exemptions.
                        description: Customer tax identification numbers
                    additionalProperties: false
                  billingId:
                    type: string
                    maxLength: 255
                    description: External billing system identifier
                    nullable: true
                  billingCountryCode:
                    type: string
                    maxLength: 255
                    description: The ISO 3166-1 alpha-2 country code for billing
                    nullable: true
                  entitlements:
                    type: array
                    items:
                      discriminator:
                        propertyName: type
                      oneOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - FEATURE
                              description: SubscriptionFeatureEntitlementRequest
                            id:
                              type: string
                              maxLength: 255
                              minLength: 1
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                              description: The feature ID to attach the entitlement to
                            usageLimit:
                              type: integer
                              minimum: 0
                              description: Maximum allowed usage for the feature
                            hasUnlimitedUsage:
                              type: boolean
                              description: Whether usage is unlimited
                            hasSoftLimit:
                              type: boolean
                              description: Whether the usage limit is a soft limit
                            resetPeriod:
                              type: string
                              enum:
                                - YEAR
                                - MONTH
                                - WEEK
                                - DAY
                                - HOUR
                              description: Period at which usage resets
                            yearlyResetPeriodConfiguration:
                              type: object
                              properties:
                                accordingTo:
                                  type: string
                                  enum:
                                    - SubscriptionStart
                                  description: Reset anchor (SubscriptionStart)
                              required:
                                - accordingTo
                              title: YearlyResetPeriodConfig
                              description: Configuration for yearly reset period
                              nullable: true
                            monthlyResetPeriodConfiguration:
                              type: object
                              properties:
                                accordingTo:
                                  type: string
                                  enum:
                                    - SubscriptionStart
                                    - StartOfTheMonth
                                  description: >-
                                    Reset anchor (SubscriptionStart or
                                    StartOfTheMonth)
                              required:
                                - accordingTo
                              title: MonthlyResetPeriodConfig
                              description: Configuration for monthly reset period
                              nullable: true
                            weeklyResetPeriodConfiguration:
                              type: object
                              properties:
                                accordingTo:
                                  type: string
                                  enum:
                                    - SubscriptionStart
                                    - EverySunday
                                    - EveryMonday
                                    - EveryTuesday
                                    - EveryWednesday
                                    - EveryThursday
                                    - EveryFriday
                                    - EverySaturday
                                  description: >-
                                    Reset anchor (SubscriptionStart or specific
                                    day)
                              required:
                                - accordingTo
                              title: WeeklyResetPeriodConfig
                              description: Configuration for weekly reset period
                              nullable: true
                          required:
                            - type
                            - id
                          title: SubscriptionFeatureEntitlementRequest
                          description: Feature entitlement configuration for a subscription
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - CREDIT
                              description: SubscriptionCreditEntitlementRequest
                            id:
                              type: string
                              maxLength: 255
                              minLength: 1
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                              description: >-
                                The custom currency ID for the credit
                                entitlement
                            amount:
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                              description: Credit grant amount
                            cadence:
                              type: string
                              enum:
                                - MONTH
                                - YEAR
                              description: Credit grant cadence (MONTH or YEAR)
                          required:
                            - type
                            - id
                            - amount
                            - cadence
                          title: SubscriptionCreditEntitlementRequest
                          description: Credit entitlement configuration for a subscription
                  trialOverrideConfiguration:
                    type: object
                    properties:
                      isTrial:
                        type: boolean
                        description: >-
                          Whether the subscription should start with a trial
                          period
                      trialEndBehavior:
                        type: string
                        enum:
                          - CONVERT_TO_PAID
                          - CANCEL_SUBSCRIPTION
                        description: >-
                          Behavior when trial ends: CONVERT_TO_PAID or
                          CANCEL_SUBSCRIPTION
                      trialEndDate:
                        type: string
                        format: date-time
                        description: Custom trial end date
                    required:
                      - isTrial
                    description: Trial period override settings
                  scheduleStrategy:
                    type: string
                    enum:
                      - END_OF_BILLING_PERIOD
                      - END_OF_BILLING_MONTH
                      - IMMEDIATE
                    description: Strategy for scheduling subscription changes
                  checkoutOptions:
                    type: object
                    properties:
                      successUrl:
                        type: string
                        maxLength: 255
                        format: uri
                        description: URL to redirect to after successful checkout
                      cancelUrl:
                        type: string
                        maxLength: 255
                        format: uri
                        description: URL to redirect to if checkout is canceled
                      allowPromoCodes:
                        default: false
                        type: boolean
                        description: Allow promotional codes during checkout
                      allowTaxIdCollection:
                        default: false
                        type: boolean
                        description: Allow tax ID collection during checkout
                      collectBillingAddress:
                        default: false
                        type: boolean
                        description: Collect billing address during checkout
                      referenceId:
                        type: string
                        maxLength: 255
                        description: Optional reference ID for the checkout session
                        nullable: true
                      collectPhoneNumber:
                        default: false
                        type: boolean
                        description: Collect phone number during checkout
                    required:
                      - successUrl
                      - cancelUrl
                    description: Checkout page configuration for payment collection
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                    description: Additional metadata for the subscription
                  salesforceId:
                    type: string
                    maxLength: 255
                    description: Salesforce ID
                    nullable: true
                  budget:
                    type: object
                    properties:
                      limit:
                        type: number
                        description: Maximum spending limit
                      hasSoftLimit:
                        type: boolean
                        description: Whether the budget is a soft limit
                    required:
                      - limit
                      - hasSoftLimit
                    additionalProperties: false
                    nullable: true
                  minimumSpend:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: The price amount
                      currency:
                        description: The price currency
                        type: string
                        enum:
                          - usd
                          - aed
                          - all
                          - amd
                          - ang
                          - aud
                          - awg
                          - azn
                          - bam
                          - bbd
                          - bdt
                          - bgn
                          - bif
                          - bmd
                          - bnd
                          - bsd
                          - bwp
                          - byn
                          - bzd
                          - brl
                          - cad
                          - cdf
                          - chf
                          - cny
                          - czk
                          - dkk
                          - dop
                          - dzd
                          - egp
                          - etb
                          - eur
                          - fjd
                          - gbp
                          - gel
                          - gip
                          - gmd
                          - gyd
                          - hkd
                          - hrk
                          - htg
                          - idr
                          - ils
                          - inr
                          - isk
                          - jmd
                          - jpy
                          - kes
                          - kgs
                          - khr
                          - kmf
                          - krw
                          - kyd
                          - kzt
                          - lbp
                          - lkr
                          - lrd
                          - lsl
                          - mad
                          - mdl
                          - mga
                          - mkd
                          - mmk
                          - mnt
                          - mop
                          - mro
                          - mvr
                          - mwk
                          - mxn
                          - myr
                          - mzn
                          - nad
                          - ngn
                          - nok
                          - npr
                          - nzd
                          - pgk
                          - php
                          - pkr
                          - pln
                          - qar
                          - ron
                          - rsd
                          - rub
                          - rwf
                          - sar
                          - sbd
                          - scr
                          - sek
                          - sgd
                          - sle
                          - sll
                          - sos
                          - szl
                          - thb
                          - tjs
                          - top
                          - try
                          - ttd
                          - tzs
                          - uah
                          - uzs
                          - vnd
                          - vuv
                          - wst
                          - xaf
                          - xcd
                          - yer
                          - zar
                          - zmw
                          - clp
                          - djf
                          - gnf
                          - ugx
                          - pyg
                          - xof
                          - xpf
                        title: Currency
                    description: Minimum spend amount
                    nullable: true
                  priceOverrides:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                          description: The price amount
                        currency:
                          description: The price currency
                          type: string
                          enum:
                            - usd
                            - aed
                            - all
                            - amd
                            - ang
                            - aud
                            - awg
                            - azn
                            - bam
                            - bbd
                            - bdt
                            - bgn
                            - bif
                            - bmd
                            - bnd
                            - bsd
                            - bwp
                            - byn
                            - bzd
                            - brl
                            - cad
                            - cdf
                            - chf
                            - cny
                            - czk
                            - dkk
                            - dop
                            - dzd
                            - egp
                            - etb
                            - eur
                            - fjd
                            - gbp
                            - gel
                            - gip
                            - gmd
                            - gyd
                            - hkd
                            - hrk
                            - htg
                            - idr
                            - ils
                            - inr
                            - isk
                            - jmd
                            - jpy
                            - kes
                            - kgs
                            - khr
                            - kmf
                            - krw
                            - kyd
                            - kzt
                            - lbp
                            - lkr
                            - lrd
                            - lsl
                            - mad
                            - mdl
                            - mga
                            - mkd
                            - mmk
                            - mnt
                            - mop
                            - mro
                            - mvr
                            - mwk
                            - mxn
                            - myr
                            - mzn
                            - nad
                            - ngn
                            - nok
                            - npr
                            - nzd
                            - pgk
                            - php
                            - pkr
                            - pln
                            - qar
                            - ron
                            - rsd
                            - rub
                            - rwf
                            - sar
                            - sbd
                            - scr
                            - sek
                            - sgd
                            - sle
                            - sll
                            - sos
                            - szl
                            - thb
                            - tjs
                            - top
                            - try
                            - ttd
                            - tzs
                            - uah
                            - uzs
                            - vnd
                            - vuv
                            - wst
                            - xaf
                            - xcd
                            - yer
                            - zar
                            - zmw
                            - clp
                            - djf
                            - gnf
                            - ugx
                            - pyg
                            - xof
                            - xpf
                          title: Currency
                        featureId:
                          type: string
                          maxLength: 255
                          minLength: 1
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                          description: Feature identifier for the price override
                          nullable: true
                        addonId:
                          type: string
                          maxLength: 255
                          minLength: 1
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                          description: Addon identifier for the price override
                          nullable: true
                        baseCharge:
                          type: boolean
                          description: Whether this is a base charge override
                        billingCountryCode:
                          type: string
                          maxLength: 255
                          description: The billing country code of the price
                        blockSize:
                          type: number
                          description: Block size for pricing
                        tiers:
                          type: array
                          items:
                            type: object
                            properties:
                              upTo:
                                type: number
                                description: The up to quantity of the price tier
                              unitPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: ISO 4217 currency code
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                  - currency
                                title: Money
                                description: The unit price of the price tier
                              flatPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: ISO 4217 currency code
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                  - currency
                                title: Money
                                description: The flat fee price of the price tier
                            additionalProperties: false
                          description: Pricing tiers configuration
                        creditRate:
                          type: object
                          properties:
                            amount:
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                              description: The credit rate amount
                            currencyId:
                              type: string
                              maxLength: 255
                              minLength: 1
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                              description: The custom currency refId for the credit rate
                            costFormula:
                              type: string
                              maxLength: 255
                              description: >-
                                A custom formula for calculating cost based on
                                single event dimensions
                              nullable: true
                          required:
                            - amount
                            - currencyId
                          additionalProperties: false
                        creditGrantCadence:
                          type: string
                          enum:
                            - BEGINNING_OF_BILLING_PERIOD
                            - MONTHLY
                  paymentCollectionMethod:
                    default: CHARGE
                    type: string
                    enum:
                      - CHARGE
                      - INVOICE
                      - NONE
                    description: How payments should be collected for this subscription
                  appliedCoupon:
                    type: object
                    properties:
                      couponId:
                        type: string
                        maxLength: 255
                        minLength: 1
                        pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                        description: Stigg coupon ID
                      billingCouponId:
                        type: string
                        maxLength: 255
                        description: Billing provider coupon ID
                      promotionCode:
                        type: string
                        maxLength: 255
                        description: Promotion code to apply
                      discount:
                        type: object
                        properties:
                          name:
                            type: string
                            maxLength: 255
                            description: Discount name
                          description:
                            type: string
                            maxLength: 255
                            description: Ad-hoc discount
                          durationInMonths:
                            type: number
                            minimum: 1
                            description: Duration in months
                          percentOff:
                            type: number
                            minimum: 1
                            maximum: 100
                            description: Percentage discount
                          amountsOff:
                            type: array
                            items:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: The price amount
                                currency:
                                  description: ISO 4217 currency code
                                  type: string
                                  enum:
                                    - usd
                                    - aed
                                    - all
                                    - amd
                                    - ang
                                    - aud
                                    - awg
                                    - azn
                                    - bam
                                    - bbd
                                    - bdt
                                    - bgn
                                    - bif
                                    - bmd
                                    - bnd
                                    - bsd
                                    - bwp
                                    - byn
                                    - bzd
                                    - brl
                                    - cad
                                    - cdf
                                    - chf
                                    - cny
                                    - czk
                                    - dkk
                                    - dop
                                    - dzd
                                    - egp
                                    - etb
                                    - eur
                                    - fjd
                                    - gbp
                                    - gel
                                    - gip
                                    - gmd
                                    - gyd
                                    - hkd
                                    - hrk
                                    - htg
                                    - idr
                                    - ils
                                    - inr
                                    - isk
                                    - jmd
                                    - jpy
                                    - kes
                                    - kgs
                                    - khr
                                    - kmf
                                    - krw
                                    - kyd
                                    - kzt
                                    - lbp
                                    - lkr
                                    - lrd
                                    - lsl
                                    - mad
                                    - mdl
                                    - mga
                                    - mkd
                                    - mmk
                                    - mnt
                                    - mop
                                    - mro
                                    - mvr
                                    - mwk
                                    - mxn
                                    - myr
                                    - mzn
                                    - nad
                                    - ngn
                                    - nok
                                    - npr
                                    - nzd
                                    - pgk
                                    - php
                                    - pkr
                                    - pln
                                    - qar
                                    - ron
                                    - rsd
                                    - rub
                                    - rwf
                                    - sar
                                    - sbd
                                    - scr
                                    - sek
                                    - sgd
                                    - sle
                                    - sll
                                    - sos
                                    - szl
                                    - thb
                                    - tjs
                                    - top
                                    - try
                                    - ttd
                                    - tzs
                                    - uah
                                    - uzs
                                    - vnd
                                    - vuv
                                    - wst
                                    - xaf
                                    - xcd
                                    - yer
                                    - zar
                                    - zmw
                                    - clp
                                    - djf
                                    - gnf
                                    - ugx
                                    - pyg
                                    - xof
                                    - xpf
                                  title: Currency
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            nullable: true
                            description: Fixed amounts off by currency
                        additionalProperties: false
                        title: SubscriptionCouponDiscount
                        description: Ad-hoc discount configuration
                      configuration:
                        type: object
                        properties:
                          startDate:
                            type: string
                            format: date-time
                            description: Coupon start date
                        additionalProperties: false
                        description: Coupon timing configuration
                    additionalProperties: false
                    title: SubscriptionCoupon
                    description: Coupon configuration
                  awaitPaymentConfirmation:
                    default: true
                    type: boolean
                    description: >-
                      Whether to wait for payment confirmation before returning
                      the subscription
                  unitQuantity:
                    type: integer
                    minimum: 0
                    description: >-
                      Unit quantity for per-unit pricing. Minimum is 0 (zero is
                      allowed).
                  billingCycleAnchor:
                    type: string
                    enum:
                      - UNCHANGED
                      - NOW
                    description: Billing cycle anchor behavior for the subscription
                required:
                  - customerId
                  - planId
                additionalProperties: false
                title: ProvisionSubscriptionRequest
                description: >-
                  A new subscription to create, using the same body the
                  provision-subscription endpoint accepts
              existingSubscriptionId:
                type: string
                maxLength: 255
                minLength: 1
                pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                description: >-
                  The subscription ref ID of an already-created custom
                  subscription to link
            additionalProperties: false
            title: ContractSubscriptionEntry
            description: >-
              A single subscription on a contract: exactly one of
              newSubscription or existingSubscriptionId must be set.
          minItems: 1
          description: >-
            The subscriptions to attach to the contract (must be non-empty).
            Each entry is either a new subscription to create or a reference to
            an existing custom subscription.
      required:
        - customerId
        - subscriptions
      additionalProperties: false
      title: CreateContractRequest
      description: Input for creating a contract and its subscriptions atomically.
    ContractResponseDto:
      type: object
      properties:
        data:
          type: object
          properties:
            contractId:
              type: string
              maxLength: 255
              description: >-
                The Stigg contract ref ID (the key used to fetch/update/delete
                this contract)
            billingId:
              type: string
              maxLength: 255
              description: >-
                The billing provider (Received) contract ID; null until the
                contract has synced to the billing provider
              nullable: true
            id:
              type: string
              maxLength: 255
              description: >-
                The persisted Stigg contract id (matches a subscription’s
                contractId; present for Stigg-managed contracts)
              nullable: true
            refId:
              type: string
              maxLength: 255
              description: >-
                The Stigg contract ref ID (present for Stigg-managed contracts;
                the key used to update/delete)
              nullable: true
            poNumber:
              type: string
              maxLength: 255
              description: Purchase-order number, when set on the contract
              nullable: true
            externalId:
              type: string
              maxLength: 255
              description: The external identifier of the contract
            customerExternalId:
              type: string
              maxLength: 255
              description: The external identifier of the customer the contract belongs to
              nullable: true
            name:
              type: string
              maxLength: 255
              description: >-
                The contract name (the purchase-order number when set, otherwise
                the contract/customer name)
              nullable: true
            state:
              type: string
              enum:
                - DRAFT
                - ACTIVE
                - CANCELED
                - END_BILLING
              description: The current state of the contract
            activationStartDate:
              type: string
              format: date-time
              description: The date the contract becomes active
              nullable: true
            activationEndDate:
              type: string
              format: date-time
              description: The date the contract activation ends
              nullable: true
            createdAt:
              type: string
              format: date-time
              description: The date the contract was created
              nullable: true
            nextInvoice:
              type: object
              properties:
                amount:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: The price amount
                    currency:
                      description: ISO 4217 currency code
                      type: string
                      enum:
                        - usd
                        - aed
                        - all
                        - amd
                        - ang
                        - aud
                        - awg
                        - azn
                        - bam
                        - bbd
                        - bdt
                        - bgn
                        - bif
                        - bmd
                        - bnd
                        - bsd
                        - bwp
                        - byn
                        - bzd
                        - brl
                        - cad
                        - cdf
                        - chf
                        - cny
                        - czk
                        - dkk
                        - dop
                        - dzd
                        - egp
                        - etb
                        - eur
                        - fjd
                        - gbp
                        - gel
                        - gip
                        - gmd
                        - gyd
                        - hkd
                        - hrk
                        - htg
                        - idr
                        - ils
                        - inr
                        - isk
                        - jmd
                        - jpy
                        - kes
                        - kgs
                        - khr
                        - kmf
                        - krw
                        - kyd
                        - kzt
                        - lbp
                        - lkr
                        - lrd
                        - lsl
                        - mad
                        - mdl
                        - mga
                        - mkd
                        - mmk
                        - mnt
                        - mop
                        - mro
                        - mvr
                        - mwk
                        - mxn
                        - myr
                        - mzn
                        - nad
                        - ngn
                        - nok
                        - npr
                        - nzd
                        - pgk
                        - php
                        - pkr
                        - pln
                        - qar
                        - ron
                        - rsd
                        - rub
                        - rwf
                        - sar
                        - sbd
                        - scr
                        - sek
                        - sgd
                        - sle
                        - sll
                        - sos
                        - szl
                        - thb
                        - tjs
                        - top
                        - try
                        - ttd
                        - tzs
                        - uah
                        - uzs
                        - vnd
                        - vuv
                        - wst
                        - xaf
                        - xcd
                        - yer
                        - zar
                        - zmw
                        - clp
                        - djf
                        - gnf
                        - ugx
                        - pyg
                        - xof
                        - xpf
                      title: Currency
                  required:
                    - amount
                    - currency
                  description: The total amount of the upcoming invoice
                dueDate:
                  type: string
                  format: date-time
                  description: The date the upcoming invoice is due
                  nullable: true
                periodStart:
                  type: string
                  format: date-time
                  description: The start of the billing period the upcoming invoice covers
                  nullable: true
                periodEnd:
                  type: string
                  format: date-time
                  description: The end of the billing period the upcoming invoice covers
                  nullable: true
              required:
                - amount
                - dueDate
                - periodStart
                - periodEnd
              title: ContractNextInvoice
              description: >-
                A preview of the contract's upcoming invoice, or null when none
                is available
              nullable: true
            latestInvoice:
              type: object
              properties:
                billingId:
                  type: string
                  maxLength: 255
                  description: Invoice billing ID
                status:
                  type: string
                  enum:
                    - OPEN
                    - CANCELED
                    - PAID
                  description: Invoice status
                createdAt:
                  type: string
                  format: date-time
                  description: Invoice creation date
                total:
                  type: number
                  description: Total amount
                  nullable: true
                amountDue:
                  type: number
                  description: Amount due
                  nullable: true
                currency:
                  type: string
                  maxLength: 255
                  description: Invoice currency
                  nullable: true
                pdfUrl:
                  type: string
                  maxLength: 255
                  description: Invoice PDF URL
                  nullable: true
                requiresAction:
                  type: boolean
                  description: Whether payment requires action
                billingReason:
                  type: string
                  enum:
                    - BILLING_CYCLE
                    - SUBSCRIPTION_CREATION
                    - SUBSCRIPTION_UPDATE
                    - MANUAL
                    - MINIMUM_INVOICE_AMOUNT_EXCEEDED
                    - OTHER
                  nullable: true
                  description: Billing reason
              required:
                - billingId
                - status
                - createdAt
                - requiresAction
              title: LatestInvoice
              description: >-
                The most recent non-draft invoice for this contract (open, paid,
                or canceled), or null when none exists
              nullable: true
            subscriptions:
              type: array
              items:
                type: object
                properties:
                  subscriptionId:
                    type: string
                    maxLength: 255
                    description: >-
                      The subscription ref ID (use it to deep-link to the
                      subscription)
                  planDisplayName:
                    type: string
                    maxLength: 255
                    description: Display name of the subscription plan
                    nullable: true
                  productDisplayName:
                    type: string
                    maxLength: 255
                    description: >-
                      Display name of the product the subscription plan belongs
                      to
                    nullable: true
                required:
                  - subscriptionId
                  - planDisplayName
                  - productDisplayName
                title: ContractSubscriptionRef
                description: A custom subscription attached to a contract.
              description: >-
                The custom subscriptions attached to this contract (empty when
                none)
          required:
            - contractId
            - billingId
            - id
            - refId
            - poNumber
            - externalId
            - customerExternalId
            - name
            - state
            - activationStartDate
            - activationEndDate
            - createdAt
            - nextInvoice
            - latestInvoice
            - subscriptions
          title: Contract
          description: A billing contract as reported by the connected billing provider.
      required:
        - data
      title: Response
      description: Response object
    BadInputErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - BadUserInput
            - DuplicateIntegrationNotAllowed
            - EntityIsArchivedError
            - IntegrityViolation
            - FreePlanCantHaveCompatiblePackageGroupError
            - SubscriptionMustHaveSinglePlanError
            - AddonIsCompatibleWithPlan
            - AddonIsCompatibleWithGroup
            - DuplicateAddonProvisionedError
            - ScheduledMigrationAlreadyExistsError
            - SubscriptionAlreadyOnLatestPlan
            - EntityIdDifferentFromRefIdError
            - UnsupportedFeatureType
            - UnsupportedVendorIdentifier
            - UnsupportedSubscriptionScheduleType
            - InvalidEntitlementResetPeriod
            - IncompatibleSubscriptionAddon
            - UnPublishedPackage
            - MeteringNotAvailableForFeatureType
            - AuthCustomerMismatch
            - AuthCustomerReadonly
            - FetchAllCountriesPricesNotAllowed
            - MemberInvitationError
            - PlansCircularDependencyError
            - NoFeatureEntitlementInSubscription
            - CheckoutIsNotSupported
            - UnsupportedParameter
            - PricingModelNotSupportedByBillingIntegration
            - BillingIntegrationMissing
            - BillingIntegrationAlreadyExistsError
            - InvalidMemberDelete
            - PackageAlreadyPublished
            - DraftPlanCantBeArchived
            - DraftAddonCantBeArchived
            - PlanWithChildCantBeDeleted
            - PlanCannotBePublishWhenBasePlanIsDraft
            - PlanCannotBePublishWhenCompatibleAddonIsDraft
            - PlanIsUsedAsDefaultStartPlan
            - PlanIsUsedAsDowngradePlan
            - InvalidAddressError
            - InvalidQuantity
            - BillingPeriodMissingError
            - DowngradeBillingPeriodNotSupportedError
            - CustomerAlreadyUsesCouponError
            - CustomerAlreadyHaveCustomerCoupon
            - SubscriptionAlreadyCanceledOrExpired
            - TrialMustBeCancelledImmediately
            - SubscriptionDoesNotHaveBillingPeriod
            - InvalidCancellationDate
            - FailedToImportCustomer
            - FailedToImportSubscriptions
            - PackagePricingTypeNotSet
            - InvalidSubscriptionStatus
            - InvalidArgumentError
            - EditAllowedOnDraftPackageOnlyError
            - ResyncAlreadyInProgress
            - ArchivedCouponCantBeApplied
            - ImportAlreadyInProgress
            - AddonHasToHavePriceError
            - SelectedBillingModelDoesntMatchImportedItemError
            - CannotArchiveProductError
            - CannotUnarchiveProductError
            - CannotDeleteCustomerError
            - CannotRemovePaymentMethodFromCustomerError
            - CannotDeleteFeatureError
            - CannotArchiveFeatureError
            - InvalidUpdatePriceUnitAmountError
            - ExperimentAlreadyRunning
            - ExperimentStatusError
            - OperationNotAllowedDuringInProgressExperiment
            - EntitlementsMustBelongToSamePackage
            - CanNotUpdateEntitlementsFeatureGroup
            - MeterMustBeAssociatedToMeteredFeature
            - CannotEditPackageInNonDraftMode
            - CannotAddOverrideEntitlementToPlan
            - MissingEntityIdError
            - NoProductsAvailable
            - PromotionCodeNotForCustomer
            - PromotionCodeNotActive
            - PromotionCodeMaxRedemptionsReached
            - PromotionCodeMinimumAmountNotReached
            - PromotionCodeCustomerNotFirstPurchase
            - AddonWithDraftCannotBeDeletedError
            - CannotReportUsageForEntitlementWithMeterError
            - RecalculateEntitlementsError
            - ImportSubscriptionsBulkError
            - InvalidMetadataError
            - CannotUpsertToPackageThatHasDraft
            - IntegrationValidationError
            - AwsMarketplaceIntegrationValidationError
            - AwsMarketplaceIntegrationError
            - DataExportIntegrationError
            - HubspotIntegrationError
            - DuplicateProductValidationError
            - AmountTooLarge
            - CustomerHasNoEmailAddress
            - MergeEnvironmentValidationError
            - EntitlementLimitExceededError
            - EntitlementUsageOutOfRangeError
            - UsageMeasurementDiffOutOfRangeError
            - AddonQuantityExceedsLimitError
            - AddonDependencyMissingError
            - PackageGroupMinItemsError
            - CannotUpdateUnitTransformationError
            - SingleSubscriptionCantBeAutoCancellationTargetError
            - MultiSubscriptionCantBeAutoCancellationSourceError
            - ChangingPayingCustomerIsNotSupportedError
            - RequiredSsoAuthenticationError
            - InvalidDoggoSignatureError
            - InvalidReceivedSignatureError
            - CannotDeleteDefaultIntegration
            - CannotChangeBillingIntegration
            - FailedToResolveBillingIntegration
            - WorkflowTriggerNotFound
            - DeprecatedEstimateSubscriptionError
            - FeatureConfigurationExceededLimitError
            - FeatureNotBelongToFeatureGroupError
            - FeatureGroupMissingFeaturesError
            - VersionExceedsMaxValueError
            - CannotUpdateExpireAtForExpiredCreditGrantError
            - ExpireAtMustBeLaterThanEffectiveAtError
            - OfferAlreadyExists
            - DraftAlreadyExists
            - CreditGrantAlreadyVoided
            - CreditGrantCannotBeVoided
            - InvalidTaxId
            - ObjectAlreadyBeingUsedByAnotherRequestError
            - TooManySubscriptionsPerCustomer
            - TooManyCustomCurrencies
            - StripeError
            - SchedulingAtEndOfBillingPeriod
            - ApiKeyExpired
            - ApiKeyHasExpiry
            - OveragePriceNotSupportedOnAddon
            - OveragePriceRequiresUsageLimit
            - InvalidCreditOverageBillingModel
            - CreditOveragePriceCurrencyNotFound
            - InvoicePreviewNotAvailableForDraftContract
          nullable: true
      required:
        - message
        - code
    UnauthenticatedErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - Unauthenticated
          nullable: true
      required:
        - message
        - code
    ForbiddenErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - IdentityForbidden
            - AccessDeniedError
            - NoFeatureEntitlementError
            - GovernanceNotEnabled
          nullable: true
      required:
        - message
        - code
    ConflictErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - DuplicatedEntityNotAllowed
            - EntitlementBelongsToFeatureGroupError
          nullable: true
      required:
        - message
        - code
    TooManyRequestsErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - RateLimitExceeded
          nullable: true
      required:
        - message
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Server API Key

````