info:
  title: Developer API
  version: 2.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
openapi: 3.0.3
tags:
  - name: Product
    description: Operations about products.
paths:
  /projects/{project_id}/products/{product_id}:
    get:
      summary: Get a product
      operationId: get-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read
      x-expandable-fields:
        - app: project_configuration:apps:read
        - indicative_price: project_configuration:products:read
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `app` (requires `project_configuration:apps:read` permission), `indicative_price` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - app
                - indicative_price
              example: app
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read</code>. This endpoint belongs
        to the <strong>Project Configuration</strong> domain, which has a
        default rate limit of <strong>60 requests per minute</strong>.
    post:
      summary: Update a product
      operationId: update-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-expandable-fields:
        - app: project_configuration:apps:read
        - indicative_price: project_configuration:products:read
      x-release-status: public
      description: >-
        Update a product in the project's catalog.

        Changing the `type` only affects how RevenueCat treats the product, it
        does not update the store.

        Make sure the new type matches how the product is configured in the
        store, otherwise RevenueCat will handle purchases in a way the store
        does not expect.
         This endpoint requires the following permission(s): <code>project_configuration:products:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `app` (requires `project_configuration:apps:read` permission), `indicative_price` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - app
                - indicative_price
              example: app
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  description: The display name of the product
                  type: string
                  maxLength: 1500
                type:
                  description: >-
                    The product type. Supported for App Store products
                    (`subscription`, `consumable`, `non_consumable` or
                    `non_renewing_subscription`) and for one-time Play Store
                    products (`consumable` or `non_consumable`). For App Store
                    products, and when changing a Play Store product to
                    consumable, type cannot be changed once the product has
                    production transactions; create a new product with the type
                    you need instead. Play Store consumable to non-consumable is
                    allowed even with production transactions.
                  $ref: '#/components/schemas/ProductType'
              additionalProperties: false
      responses:
        '200':
          description: Success. The product was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
    delete:
      summary: Delete a product
      operationId: delete-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
  /projects/{project_id}/products/{product_id}/actions/archive:
    post:
      summary: Archive a product
      operationId: archive-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      description: |-
        Archives a product (makes it inactive).
         This endpoint requires the following permission(s): <code>project_configuration:products:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
      responses:
        '200':
          description: Success. The product was archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
  /projects/{project_id}/products/{product_id}/actions/unarchive:
    post:
      summary: Unarchive a product
      operationId: unarchive-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      description: |-
        Unarchives a product (makes it active).
         This endpoint requires the following permission(s): <code>project_configuration:products:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
      responses:
        '200':
          description: Success. The product was unarchived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
  /projects/{project_id}/products/{product_id}/create_in_store:
    post:
      summary: Push a product to the store
      description: >-
        Push a product to the App Store. 


        **For subscription products**: You must provide store information
        including duration and subscription group details.


        **For in-app purchase products** (consumable, non-consumable,
        non-renewing subscription): No request body is required.
         This endpoint requires the following permission(s): <code>project_configuration:products:read_write</code>. This endpoint belongs to the <strong>Project Configuration</strong> domain, which has a default rate limit of <strong>60 requests per minute</strong>.
      operationId: create-product-in-store
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: product_id
          description: ID of the product
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: prod1a2b3c4d5
      requestBody:
        required: false
        description: >
          Store-specific information. Only required for subscription products.

          For in-app purchase products, send an empty body or omit the request
          body entirely.
        content:
          application/json:
            schema:
              type: object
              properties:
                store_information:
                  description: >-
                    Store-specific information for creating the product in the
                    store
                  oneOf:
                    - $ref: >-
                        #/components/schemas/CreateAppStoreConnectSubscriptionInput
                    - $ref: >-
                        #/components/schemas/CreateAppStoreConnectInAppPurchaseInput
              additionalProperties: false
            examples:
              App Store Subscription:
                summary: Creating a subscription product
                value:
                  store_information:
                    duration: ONE_MONTH
                    subscription_group_name: Premium Subscriptions
                    subscription_group_id: sub_group_123
              App Store In-App Purchase:
                summary: Creating an in-app purchase product (no body needed)
                value: {}
      responses:
        '201':
          description: Success. The product was pushed to the store
          content:
            application/json:
              schema:
                type: object
                required:
                  - created_product
                properties:
                  created_product:
                    $ref: '#/components/schemas/StoreProduct'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
  /projects/{project_id}/products:
    get:
      summary: Get a list of products
      operationId: list-products
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read
      x-expandable-fields:
        - items.app: project_configuration:apps:read
        - items.indicative_price: project_configuration:products:read
      x-release-status: public
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: app_id
          in: query
          schema:
            type: string
            example: app1a2b3c4
          description: >-
            This is an optional query parameter to get a list of products of a
            given entitlement associated with a particular app
        - name: starting_after
          in: query
          required: false
          description: >-
            Pagination cursor. Pass the id of the last item from the previous
            page to fetch the next page; omit for the first page.
          schema:
            type: string
            example: ent12354
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of items to return per page. Values below 1 or above
            100 are clamped to that range rather than rejected.
          schema:
            type: integer
            example: 10
            default: 20
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.app` (requires `project_configuration:apps:read` permission), `items.indicative_price` (requires `project_configuration:products:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.app
                - items.indicative_price
              example: items.app
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProducts'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
      description: >-
        This endpoint requires the following permission(s):
        <code>project_configuration:products:read</code>. This endpoint belongs
        to the <strong>Project Configuration</strong> domain, which has a
        default rate limit of <strong>60 requests per minute</strong>.
    post:
      summary: Create a product
      operationId: create-product
      x-revenuecat-rate-limiting-domain: project_configuration
      x-scopes:
        - project_configuration:products:read_write
      x-release-status: public
      description: >-
        Create a product in the project's catalog.

        <div class="theme-admonition theme-admonition-info alert
        alert--warning">
          <div class="heading">Warning</div>
          <div>This endpoint does not allow to create Web Billing products.</div>
        </div>

        This endpoint requires the following permission(s):
        <code>project_configuration:products:read_write</code>. This endpoint
        belongs to the <strong>Project Configuration</strong> domain, which has
        a default rate limit of <strong>60 requests per minute</strong>.
      tags:
        - Product
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - store_identifier
                - app_id
                - type
              properties:
                store_identifier:
                  description: >
                    The store identifier of the product.

                    - For Apple App Store products this is the product ID of the
                    subscription or in-app product.

                    - For Google's Play Store, it should follow the format
                    'productId:basePlanId' for subscription products and SKU for
                    one-time purchase products.

                    - For Stripe, the product identifier that always starts with
                    "prod_". RevenueCat selects the active, supported default
                    price when available, or the only active, supported price
                    otherwise. If no price can be selected, the product is
                    created without a web price. For projects that model Stripe
                    products per price, the `store_identifier` in the response
                    is the Stripe price ID when a price is selected.

                    - For Amazon, if it's a subscription, the term SKU of the
                    subscription. If it's a one-time purchase, the SKU of the
                    product.

                    - For Roku, this is the product identifier of the
                    subscription or one-time purchase product.
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: com.revenuecat.magicweather.monthly
                price_identifier:
                  description: >-
                    The Stripe price identifier to import. When provided, the
                    price must exist, belong to the Stripe product, and be
                    active and supported. Only supported for Stripe products.
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 200
                  example: price_1MoBy5LkdIwHu7ixZhnattbh
                app_id:
                  description: The ID of the app
                  type: string
                  minLength: 1
                  maxLength: 255
                  example: app1a2b3c4
                type:
                  description: The product type
                  nullable: false
                  $ref: '#/components/schemas/ProductType'
                display_name:
                  description: The display name of the product
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Premium Monthly 2023
                subscription:
                  nullable: true
                  description: >-
                    Subscription parameters. Only supported for test store
                    products.
                  $ref: '#/components/schemas/ProductSubscriptionInput'
                title:
                  description: >-
                    The user-facing title of the product. This field is required
                    for Test Store products.
                  nullable: true
                  type: string
                  minLength: 1
                  maxLength: 1500
                  example: Premium Monthly 2023
              additionalProperties: false
            examples:
              App Store:
                value:
                  store_identifier: com.revenuecat.magicweather.monthly9.99
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store Billing Client 4:
                value:
                  store_identifier: com.revenuecat.magicweather.monthly
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Stripe:
                value:
                  store_identifier: prod_LryUFGrmehs0tk
                  price_identifier: price_1MoBy5LkdIwHu7ixZhnattbh
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Amazon:
                value:
                  store_identifier: com.mysubscription.weekly
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store Subscription Billing Client 5:
                value:
                  store_identifier: mySubscription:basePlanId
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly 2023
              Play Store One-time Billing Client 5:
                value:
                  store_identifier: myProductSku
                  app_id: app1a2b3c4
                  type: one_time
                  display_name: Premium Lifetime 2023
              Test Store:
                value:
                  store_identifier: monthly_premium
                  app_id: app1a2b3c4
                  type: subscription
                  display_name: Premium Monthly
                  subscription:
                    duration: P1M
      responses:
        '201':
          description: Success. The product was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          headers:
            RevenueCat-Rate-Limit-Current-Usage:
              $ref: '#/components/headers/RateLimitCurrentUsage'
            RevenueCat-Rate-Limit-Current-Limit:
              $ref: '#/components/headers/RateLimitCurrentLimit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Product:
      type: object
      required:
        - id
        - store_identifier
        - type
        - state
        - created_at
        - app_id
        - object
        - display_name
      properties:
        state:
          description: Whether the product is active or inactive (archived).
          nullable: false
          type: string
          enum:
            - active
            - inactive
          example: active
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - product
          type: string
        id:
          description: The id of the product
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: prod1a2b3c4d5e
        store_identifier:
          description: The store product identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: rc_1w_199
        type:
          description: The product type
          nullable: false
          $ref: '#/components/schemas/ProductType'
        subscription:
          description: The subscription product object
          nullable: true
          $ref: '#/components/schemas/SubscriptionProduct'
        one_time:
          description: The one time product object
          nullable: true
          $ref: '#/components/schemas/OneTimeProduct'
        created_at:
          description: The date when the product was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        app_id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        app:
          description: The app associated with the product
          nullable: true
          $ref: '#/components/schemas/App'
        indicative_price:
          description: >-
            The product's indicative price in the default currency/country (USD
            / US). Null if no price is available. Only present when expanded.
          nullable: true
          $ref: '#/components/schemas/IndicativePrice'
        display_name:
          description: The display name of the product
          nullable: true
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium Monthly 2023
      additionalProperties: false
    ProductType:
      type: string
      nullable: false
      enum:
        - subscription
        - one_time
        - consumable
        - non_consumable
        - non_renewing_subscription
    DeletedObject:
      type: object
      required:
        - object
        - id
        - deleted_at
      properties:
        object:
          description: The type of the deleted object
          enum:
            - app
            - chart_annotation
            - customer
            - discount
            - entitlement
            - experiment
            - offering
            - package
            - paywall
            - product
            - virtual_currency
            - webhook_integration
          type: string
        id:
          description: The ID of the deleted object
          nullable: false
          type: string
        deleted_at:
          nullable: false
          type: integer
          format: int64
          description: The date when the object was deleted in ms since epoch
          example: 1658399423658
      additionalProperties: false
    CreateAppStoreConnectSubscriptionInput:
      type: object
      required:
        - duration
        - subscription_group_name
      properties:
        duration:
          type: string
          enum:
            - ONE_WEEK
            - ONE_MONTH
            - TWO_MONTHS
            - THREE_MONTHS
            - SIX_MONTHS
            - ONE_YEAR
          description: The subscription duration period
        subscription_group_name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the subscription group
        subscription_group_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          description: The ID of the subscription group (optional)
      additionalProperties: false
    CreateAppStoreConnectInAppPurchaseInput:
      type: object
      properties: {}
      additionalProperties: false
      description: In-app purchase products do not require any additional information
    StoreProduct:
      type: object
      required:
        - id
        - product_identifier
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - store_product
          type: string
        id:
          description: >-
            The unique identifier of the product in the store (e.g., App Store
            Connect product ID)
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: 1234567890
        name:
          description: The name of the store product
          nullable: true
          type: string
          minLength: 1
          maxLength: 255
          example: Premium Monthly Subscription
        product_identifier:
          description: The product identifier used in the store
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: com.example.premium_monthly
      additionalProperties: false
    ListProducts:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: ProductList
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value. Always has the value `list`.
          enum:
            - list
          type: string
        items:
          description: Details about each object.
          items:
            $ref: '#/components/schemas/Product'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's products. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/products?starting_after=prodab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/products
      additionalProperties: false
    ProductSubscriptionInput:
      type: object
      description: >-
        Subscription parameters for product creation. Only supported for
        simulated store products.
      nullable: true
      required:
        - duration
      properties:
        duration:
          $ref: '#/components/schemas/Duration'
          description: >-
            The duration of the subscription. Only supported for test store
            products.
      additionalProperties: false
    SubscriptionProduct:
      type: object
      required:
        - duration
        - grace_period_duration
        - trial_duration
      nullable: true
      properties:
        duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription in ISO-8601 standard
          example: P1M
        grace_period_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's grace period in ISO-8601 standard
          example: P3D
        trial_duration:
          type: string
          pattern: >-
            ^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
          nullable: true
          description: The duration of the subscription's trial period in ISO-8601 standard
          example: P1W
      additionalProperties: true
    OneTimeProduct:
      type: object
      required:
        - is_consumable
      nullable: true
      properties:
        is_consumable:
          type: boolean
          nullable: true
          description: Indicates whether the product is consumable or not.
          example: true
      additionalProperties: true
    App:
      oneOf:
        - $ref: '#/components/schemas/AmazonApp'
        - $ref: '#/components/schemas/AppStoreApp'
        - $ref: '#/components/schemas/MacAppStoreApp'
        - $ref: '#/components/schemas/PlayStoreApp'
        - $ref: '#/components/schemas/StripeApp'
        - $ref: '#/components/schemas/RCBillingApp'
        - $ref: '#/components/schemas/RokuApp'
        - $ref: '#/components/schemas/PaddleApp'
        - $ref: '#/components/schemas/TestStoreApp'
      discriminator:
        propertyName: type
        mapping:
          amazon: '#/components/schemas/AmazonApp'
          app_store: '#/components/schemas/AppStoreApp'
          mac_app_store: '#/components/schemas/MacAppStoreApp'
          play_store: '#/components/schemas/PlayStoreApp'
          stripe: '#/components/schemas/StripeApp'
          rc_billing: '#/components/schemas/RCBillingApp'
          roku: '#/components/schemas/RokuApp'
          paddle: '#/components/schemas/PaddleApp'
          test_store: '#/components/schemas/TestStoreApp'
    IndicativePrice:
      type: object
      nullable: true
      description: >-
        An indicative price for a product, in the default currency/country (USD
        / US). Uses the same price source as the get-offering-prices endpoint.
      required:
        - object
        - currency
        - country
        - amount_micros
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          type: string
          enum:
            - indicative_price
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        amount_micros:
          $ref: '#/components/schemas/AmountMicros'
      additionalProperties: false
    Error:
      type: object
      required:
        - type
        - message
        - retryable
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - error
          type: string
          example: error
        type:
          description: The error type
          type: string
          nullable: false
          enum:
            - parameter_error
            - resource_already_exists
            - resource_missing
            - idempotency_error
            - rate_limit_error
            - authentication_error
            - authorization_error
            - store_error
            - server_error
            - resource_locked_error
            - unprocessable_entity_error
            - invalid_request
            - entity_references_archived_entities
          example: parameter_error
        param:
          description: >-
            If the error is parameter-specific, the parameter related to the
            error
          type: string
          nullable: true
          example: customer_id
        doc_url:
          description: A URL to more information about the error reported
          type: string
          nullable: false
          example: https://errors.rev.cat/parameter-error
        message:
          type: string
          description: A message describing the reason of the error
          nullable: false
          example: id shouldn't be longer than 1,500 characters
        retryable:
          description: Indicates if the error is retryable or not
          type: boolean
          nullable: false
          example: false
        backoff_ms:
          description: >-
            The ms the client should wait before retrying the request. Only
            present for retryable errors.
          type: integer
          nullable: true
          example: null
        referenced_object_ids:
          description: >-
            The IDs of related objects relevant to the error, such as the
            archived entities that need to be made active before the operation
            can succeed.
          type: array
          items:
            type: string
          example:
            - prodabcd1234
            - prodwxyz5678
      additionalProperties: false
    Duration:
      type: string
      description: >-
        The duration of the product subscription. This field is only supported
        for the test store and it is ignored for other stores.
      nullable: false
      example: P1W
      enum:
        - P1W
        - P1M
        - P2M
        - P3M
        - P6M
        - P1Y
    AmazonApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - amazon
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - amazon
          example: amazon
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        amazon:
          description: Amazon type details
          type: object
          required:
            - package_name
          nullable: false
          additionalProperties: true
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
      additionalProperties: true
    AppStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - app_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - app_store
          example: app_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        app_store:
          description: App Store type details
          type: object
          required:
            - bundle_id
            - app_store_connect_api_key_configured
            - subscription_key_configured
          nullable: false
          additionalProperties: true
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            app_store_connect_api_key_configured:
              description: Whether App Store Connect API key credentials are configured.
              type: boolean
              nullable: false
              example: true
            subscription_key_configured:
              description: >-
                Whether In-App Purchase subscription key credentials are
                configured.
              type: boolean
              nullable: false
              example: true
            app_store_connect_vendor_number:
              description: >-
                Your vendor number from App Store Connect, or null when not
                configured.
              type: string
              nullable: true
              minLength: 1
              maxLength: 20
              example: '81234567'
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    MacAppStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - mac_app_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - mac_app_store
          example: mac_app_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        mac_app_store:
          description: Legacy Mac App Store type details
          type: object
          required:
            - bundle_id
          nullable: false
          additionalProperties: true
          properties:
            bundle_id:
              description: The bundle ID of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    PlayStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - play_store
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - play_store
          example: play_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        play_store:
          description: Play Store type details
          type: object
          required:
            - package_name
          nullable: false
          additionalProperties: true
          properties:
            package_name:
              description: The package name of the app
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            custom_url_scheme:
              description: >-
                The custom URL scheme for the app, derived from the app's public
                ID.
              type: string
              nullable: false
              example: rc-1a2b3c4
      additionalProperties: true
    StripeApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - stripe
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - stripe
          example: stripe
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        stripe:
          description: Stripe type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
      additionalProperties: true
    RCBillingApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - rc_billing
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - rc_billing
          example: rc_billing
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        rc_billing:
          description: Revenue Cat Billing Store type details
          type: object
          required:
            - seller_company_name
            - default_currency
          nullable: false
          additionalProperties: true
          properties:
            stripe_account_id:
              description: Stripe account connected to your RevenueCat account.
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
            seller_company_name:
              description: >-
                The company name. This field is deprecated. Please, use
                `app_name` instead.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
              deprecated: true
            app_name:
              description: Shown in checkout, emails, and receipts sent to customers.
              type: string
              nullable: false
              minLength: 1
              maxLength: 256
            seller_company_support_email:
              description: >-
                The company support email. This field is deprecated. Please, use
                `support_email` instead.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
              deprecated: true
            support_email:
              description: >-
                Used as the `reply to` address in all emails sent to customers,
                to allow them to receive support.
              type: string
              nullable: true
              minLength: 1
              maxLength: 320
            default_currency:
              description: The default currency to be used for the app.
              $ref: '#/components/schemas/RCBillingCurrency'
      additionalProperties: true
    RokuApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - roku
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - roku
          example: roku
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        roku:
          description: Roku Channel Store type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            roku_channel_id:
              description: Channel ID provided on the Roku Channel page.
              type: string
              nullable: true
              minLength: 6
              maxLength: 6
            roku_channel_name:
              description: Channel name that is displayed on the Roku Channel page.
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
      additionalProperties: true
    PaddleApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
        - paddle
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - paddle
          example: paddle
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
        paddle:
          description: Paddle Billing type details
          type: object
          nullable: false
          additionalProperties: true
          properties:
            paddle_is_sandbox:
              description: Whether the app is tied to the sandbox environment.
              nullable: false
              type: boolean
              example: true
            paddle_api_key:
              description: Paddle Server-side API key provided on the Paddle dashboard.
              type: string
              nullable: true
              minLength: 50
              maxLength: 70
      additionalProperties: true
    TestStoreApp:
      type: object
      required:
        - object
        - id
        - name
        - type
        - created_at
        - project_id
        - custom_url_scheme
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - app
          type: string
        id:
          description: The id of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: app1a2b3c4
        name:
          description: The name of the app
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
        created_at:
          description: The date when the app was created in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        type:
          description: The platform of the app
          nullable: false
          type: string
          enum:
            - test_store
          example: test_store
        project_id:
          description: The id of the project
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: proj1a2b3c4
        custom_url_scheme:
          description: The custom URL scheme for the app, derived from the app's public ID.
          type: string
          nullable: false
          example: rc-1a2b3c4
      additionalProperties: true
    Currency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTC
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWL
    Country:
      type: string
      nullable: true
      example: US
      description: The country that the object is associated with, in ISO alpha 2 code
      enum:
        - null
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CD
        - CG
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - CI
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - MK
        - RO
        - RU
        - RW
        - RE
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
    AmountMicros:
      description: The price in micros. For example, USD 1 would be represented as 1000000
      nullable: false
      type: integer
      example: For 99.99, the value should be 99990000
    RCBillingCurrency:
      type: string
      description: ISO 4217 currency code
      nullable: false
      example: USD
      enum:
        - USD
        - EUR
        - JPY
        - GBP
        - AUD
        - CAD
        - BRL
        - KRW
        - CNY
        - MXN
        - SEK
        - PLN
        - MYR
        - PHP
        - CHF
        - SAR
        - TWD
        - NOK
        - DKK
        - THB
        - NZD
        - SGD
        - HKD
        - CZK
        - AED
        - CLP
        - COP
        - CRC
        - GEL
        - HUF
        - IDR
        - ILS
        - IQD
        - JOD
        - KES
        - KZT
        - MAD
        - PEN
        - QAR
        - RON
        - RSD
        - TZS
        - VND
        - ZAR
        - TRY
        - UAH
  headers:
    RateLimitCurrentUsage:
      required: true
      description: >-
        The current number of requests used for the current limit (including the
        current request).
      schema:
        type: integer
      example: 25
    RateLimitCurrentLimit:
      required: true
      description: The rate limit for this endpoint, expressed in requests per minute.
      schema:
        type: integer
      example: 30
    RateLimitRetryAfter:
      required: true
      description: >-
        The number of seconds to wait before retrying a rate limited
        request.Only present when a request is rate limited.
      schema:
        type: integer
      example: 10
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - parameter_error
                      - invalid_request
          examples:
            parameter_error:
              value:
                object: error
                type: parameter_error
                param: customer_id
                message: id is too long
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Content-Type not application/json
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authentication_error
            example:
              object: error
              type: authentication_error
              message: Invalid API key
              retryable: false
              doc_url: https://errors.rev.cat/authentication-error
    Forbidden:
      description: Access denied
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - authorization_error
            example:
              object: error
              type: authorization_error
              message: You're not authorized to access this resource
              retryable: false
              doc_url: https://errors.rev.cat/authorization-error
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_missing
            example:
              object: error
              type: resource_missing
              message: Resource not found
              retryable: false
              doc_url: https://errors.rev.cat/resource-missing
    Locked:
      description: Locked
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_locked_error
            example:
              object: error
              type: resource_locked_error
              message: The resource is currently being modified by a concurrent request
              retryable: true
              doc_url: https://errors.rev.cat/resource-locked-error
              backoff_ms: 1000
    RateLimited:
      description: >-
        The request could not be completed because the rate limiting domain for
        this endpoint is currently at its limit for this project.
      headers:
        RevenueCat-Rate-Limit-Current-Usage:
          $ref: '#/components/headers/RateLimitCurrentUsage'
        RevenueCat-Rate-Limit-Current-Limit:
          $ref: '#/components/headers/RateLimitCurrentLimit'
        Retry-After:
          $ref: '#/components/headers/RateLimitRetryAfter'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - rate_limit_error
            example:
              object: error
              type: rate_limit_error
              message: Rate limit exceeded
              retryable: true
              doc_url: https://errors.rev.cat/rate-limit-error
              backoff_ms: 1000
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - server_error
            example:
              object: error
              type: server_error
              message: There was an internal server error
              retryable: true
              doc_url: https://errors.rev.cat/server-error
              backoff_ms: 1000
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - resource_already_exists
                      - idempotency_error
                      - invalid_request
          examples:
            resource_already_exists:
              value:
                object: error
                type: resource_already_exists
                message: Name is already taken
                retryable: false
                doc_url: https://errors.rev.cat/resource-already-exists
            idempotency_error:
              value:
                object: error
                type: idempotency_error
                message: Idempotency key already used for a different request
                retryable: false
                doc_url: https://errors.rev.cat/idempotency-error
            invalid_request:
              value:
                object: error
                type: invalid_request
                message: Request conflicts with the current resource state
                retryable: false
                doc_url: https://errors.rev.cat/invalid-request
    UnprocessableEntity:
      description: Unprocessable entity
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - unprocessable_entity_error
                      - parameter_error
                      - store_error
                      - entity_references_archived_entities
          examples:
            unprocessable_entity:
              value:
                object: error
                type: unprocessable_entity_error
                message: Cannot delete a product that has purchases
                retryable: false
                doc_url: https://errors.rev.cat/unprocessable-entity-error
            parameter_error:
              value:
                object: error
                type: parameter_error
                message: Date must in the future
                retryable: false
                doc_url: https://errors.rev.cat/parameter-error
            store_error:
              value:
                object: error
                type: store_error
                message: There was a problem on the App Store
                retryable: true
                doc_url: https://errors.rev.cat/store-error
                backoff_ms: 1000
            entity_references_archived_entities:
              value:
                object: error
                type: entity_references_archived_entities
                message: >-
                  This offering references inactive products. You will need to
                  make the products active first before making the offering
                  active.
                retryable: false
                doc_url: https://errors.rev.cat/entity-references-archived-entities
                referenced_object_ids:
                  - prodabcd1234
                  - prodwxyz5678
  securitySchemes:
    BearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers -- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http
