info:
  title: Developer API
  version: 2.0.0
security:
  - BearerAuth: []
servers:
  - url: https://api.revenuecat.com/v2
openapi: 3.0.3
tags:
  - name: Purchase
    description: Operations about purchases.
paths:
  /projects/{project_id}/purchases/{purchase_id}:
    get:
      summary: Get a purchase
      operationId: get-purchase
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-expandable-fields:
        - redemption: customer_information:purchases:read
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `redemption` (requires `customer_information:purchases:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - redemption
              example: redemption
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Purchase'
          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>customer_information:purchases:read</code>. This endpoint belongs
        to the <strong>Customer Information</strong> domain, which has a default
        rate limit of <strong>480 requests per minute</strong>.
  /projects/{project_id}/purchases/{purchase_id}/entitlements:
    get:
      summary: Get a list of entitlements associated with a purchase
      operationId: list-purchase-entitlements
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
        - 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
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitlements'
          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: |-
        Lists all Entitlements granted by a Purchase.
         This endpoint requires the following permission(s): <code>customer_information:purchases:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.
  /projects/{project_id}/purchases/{purchase_id}/actions/refund:
    post:
      summary: Refund a Web Billing purchase
      operationId: refund-purchase
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read_write
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: purchase_id
          description: ID of the purchase
          required: true
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 255
            example: purc1a2b3c4d5e
      responses:
        '200':
          description: Success. The purchase has been successfully refunded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Purchase'
          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: >-
        Refund a Web Billing purchase and revoke access to associated granted
        entitlements.
         This endpoint requires the following permission(s): <code>customer_information:purchases:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.
  /projects/{project_id}/purchases:
    get:
      summary: Search one-time purchases by store purchase identifier
      operationId: search-purchases
      x-revenuecat-rate-limiting-domain: customer_information
      x-scopes:
        - customer_information:purchases:read
      x-expandable-fields:
        - items.redemption: customer_information:purchases:read
      x-release-status: public
      tags:
        - Purchase
      parameters:
        - name: project_id
          description: ID of the project
          required: true
          in: path
          schema:
            type: string
            maxLength: 255
            example: proj1ab2c3d4
        - name: store_purchase_identifier
          description: Store ID associated with the one-time purchase.
          required: true
          in: query
          schema:
            type: string
            nullable: false
            minLength: 1
            maxLength: 255
          examples:
            amazon:
              value: 9aJscueFTxLPZXXo-AlBTkI0OnFXR2qiH14C1aqWnOT=:3:11
              summary: 'Amazon Appstore '
            app_store:
              value: '100001234567890'
              summary: Apple App Store
            paddle:
              value: txn_01jss4bz50g1z5yw121npeb3ag
              summary: Paddle
            play_store:
              value: GPA.1234-5678-9012-34567
              summary: Google Play Store
            rc_billing:
              value: txRcb553a54d4738816a63f1a05cfcb1723e3
              summary: RevenueCat Web Billing
            roku:
              value: 4ab8df12-3003-11f0-9646-8ac68bcdcaed
              summary: Roku
            stripe:
              value: si_Rww1psqupbKxmt
              summary: Stripe
        - name: expand
          in: query
          description: |-
            Specifies which fields in the response should be expanded.
             Accepted values are: `items.redemption` (requires `customer_information:purchases:read` permission).
          required: false
          schema:
            type: array
            items:
              maxLength: 5000
              minLength: 1
              type: string
              enum:
                - items.redemption
              example: items.redemption
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPurchases'
          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: >-
        Search for a one-time purchases by any of its associated
        `store_purchase_identifier` values.


        For example, this may include the `transactionId` of any transaction in
        an Apple App Store purchase, or any order ID from a Google Play Store
        purchase.
         This endpoint requires the following permission(s): <code>customer_information:purchases:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.
components:
  schemas:
    Purchase:
      type: object
      required:
        - id
        - customer_id
        - original_customer_id
        - product_id
        - purchased_at
        - revenue_in_usd
        - quantity
        - status
        - presented_offering_id
        - entitlements
        - environment
        - store
        - store_purchase_identifier
        - ownership
        - object
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          enum:
            - purchase
          type: string
        id:
          description: The id of the purchase
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: purch1a2b3c4d5e
        customer_id:
          description: The id of the customer
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        original_customer_id:
          description: The ID of the original customer
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: 19b8de26-77c1-49f1-aa18-019a391603e2
        product_id:
          description: The ID of the product that was purchased
          nullable: false
          minLength: 1
          maxLength: 255
          type: string
          example: prod1a2b3c4d5e
        purchased_at:
          description: The date when the purchase was made in ms since epoch
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
        revenue_in_usd:
          description: The revenue generated by the purchase in USD
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/MonetaryAmount'
        quantity:
          description: The quantity of the product purchased in one transaction
          type: integer
          example: 1
        status:
          description: The status of a purchase
          nullable: false
          type: string
          enum:
            - owned
            - refunded
          example: owned
        presented_offering_id:
          description: The ID of the offering the customer saw when they did the purchase
          nullable: true
          type: string
          minLength: 1
          maxLength: 200
          example: ofrnge1a2b3c4d5
        entitlements:
          required:
            - items
            - next_page
            - object
            - url
          title: EntitlementList
          type: object
          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/Entitlement'
              type: array
            next_page:
              description: >-
                URL to access the next page of the customer's entitlements. If
                not present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements
        environment:
          $ref: '#/components/schemas/Environment'
        store:
          description: Store the purchase belongs to
          nullable: false
          type: string
          enum:
            - amazon
            - app_store
            - mac_app_store
            - play_store
            - promotional
            - stripe
            - rc_billing
            - external
            - roku
            - paddle
            - paypal
            - galaxy
            - test_store
          example: amazon
        store_purchase_identifier:
          description: The store purchase identifier
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: 12345678
        ownership:
          description: Ownership of the purchase
          nullable: false
          oneOf:
            - $ref: '#/components/schemas/Ownership'
        country:
          description: Billing country in ISO alpha 2 code
          nullable: true
          $ref: '#/components/schemas/Country'
        redemption:
          description: >-
            Information about the most recent successful redemption of the
            purchase's redemption link. Only applicable to Web Billing
            web-to-web purchases; null if the purchase has never been
            successfully redeemed (or has no redemption link, e.g. purchases
            from other stores). Only present when expanded.
          nullable: true
          $ref: '#/components/schemas/Redemption'
      additionalProperties: false
    ListEntitlements:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: EntitlementList
      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/Entitlement'
          type: array
        next_page:
          description: >-
            URL to access the next page of the project's entitlements. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: /v2/projects/proj1ab2c3d4/entitlements?starting_after=entlab21dac
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: /v2/projects/proj1ab2c3d4/entitlements
      additionalProperties: false
    ListPurchases:
      type: object
      required:
        - items
        - next_page
        - object
        - url
      title: PurchaseList
      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/Purchase'
          type: array
        next_page:
          description: >-
            URL to access the next page of the customer's purchases. If not
            present / null, there is no next page
          type: string
          nullable: true
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases?starting_after=purc1a2b3c4d5e
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          type: string
          example: >-
            /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases
      additionalProperties: false
    MonetaryAmount:
      type: object
      required:
        - currency
        - gross
        - tax
        - proceeds
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        gross:
          description: Total revenue generated (excluding taxes and commission)
          nullable: false
          type: number
          example: 9.99
        commission:
          description: >-
            Store commission or payment processor fees deducted from gross
            revenue (if any)
          nullable: false
          type: number
          example: 2.99
        tax:
          description: Estimated taxes deducted from gross revenue
          nullable: false
          type: number
          example: 0.75
        proceeds:
          description: Net revenue after store commission / fees and taxes
          nullable: false
          type: number
          example: 6.25
      additionalProperties: true
    Entitlement:
      type: object
      required:
        - project_id
        - id
        - lookup_key
        - display_name
        - state
        - created_at
        - object
      properties:
        state:
          description: Whether the entitlement 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.
          enum:
            - entitlement
          type: string
        project_id:
          nullable: false
          description: ID of the project to which the entitlement belongs
          minLength: 1
          maxLength: 20
          type: string
          example: proj1ab2c3d4
        id:
          description: The id of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 255
          example: entla1b2c3d4e5
        lookup_key:
          description: A custom identifier of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 200
          example: premium
        display_name:
          description: The display name of the entitlement
          nullable: false
          type: string
          minLength: 1
          maxLength: 1500
          example: Premium
        created_at:
          nullable: false
          type: integer
          format: int64
          description: The date when the entitlement was created in ms since epoch
          example: 1658399423658
        products:
          description: List of products attached to the entitlement
          nullable: true
          required:
            - items
            - next_page
            - object
            - url
          title: ProductsList
          type: object
          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 Entitlement's products. If
                not present / null, there is no next page
              type: string
              nullable: true
              example: >-
                /v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac
            url:
              description: The URL where this list can be accessed.
              maxLength: 5000
              type: string
              example: /v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products
      additionalProperties: false
    Environment:
      type: string
      description: The store environment
      example: production
      nullable: false
      enum:
        - production
        - sandbox
    Ownership:
      type: string
      example: purchased
      enum:
        - purchased
        - family_shared
    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
    Redemption:
      type: object
      nullable: true
      description: >-
        Information about the most recent successful redemption of the
        purchase's redemption link. Only applicable to Web Billing web-to-web
        purchases; null if the purchase has never been successfully redeemed (or
        has no redemption link, e.g. purchases from other stores).
      required:
        - object
        - redeemed_at
      properties:
        object:
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          type: string
          enum:
            - redemption
        redeemed_at:
          description: >-
            The date of the most recent successful redemption of the purchase's
            redemption link in ms since epoch.
          nullable: false
          type: integer
          format: int64
          example: 1658399423658
      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
    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
    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
    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
    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
    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
