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

# End a trial now

> End the trial of a trialing subscription now and charge the full price of the first period on the saved payment method. On success the subscription is active, its first paid period starts now, and the next renewal is one billing period from now; `subscription.active` and `subscription.paid` are sent as for a trial that ends on its date. A paid trial fee is not credited. If the payment is declined or needs the customer to authenticate, nothing changes and the trial ends on its date as before. Only Yuno subscriptions can end a trial early, not within the last hour of the trial.



## OpenAPI

````yaml post /v1/subscriptions/{id}/end-trial
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/subscriptions/{id}/end-trial:
    post:
      tags:
        - Subscriptions
      summary: End a trial now
      description: >-
        End the trial of a trialing subscription now and charge the full price
        of the first period on the saved payment method. On success the
        subscription is active, its first paid period starts now, and the next
        renewal is one billing period from now; `subscription.active` and
        `subscription.paid` are sent as for a trial that ends on its date. A
        paid trial fee is not credited. If the payment is declined or needs the
        customer to authenticate, nothing changes and the trial ends on its date
        as before. Only Yuno subscriptions can end a trial early, not within the
        last hour of the trial.
      operationId: endSubscriptionTrial
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier of the subscription
          schema:
            type: string
      requestBody:
        required: false
        description: How the first period is paid; may be omitted
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndTrialSubscriptionRequestEntity'
      responses:
        '200':
          description: >-
            The trial ended: the first period was charged and the subscription
            is active
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionEntity'
        '202':
          description: >-
            The payment was sent but its outcome is not known yet. The
            subscription is still trialing; retrieve it later to see the
            outcome.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '402':
          description: >-
            `trial_end_payment_declined` (with `details.decline_code`): the
            payment was declined. `trial_end_requires_authentication`: the
            payment needs the customer to authenticate. The trial is unchanged
            in both cases.
        '403':
          description: >-
            `trial_early_end_disabled`: ending a trial early through the API is
            not enabled for this store.
        '404':
          description: Not Found - Resource does not exist
        '409':
          description: >-
            `subscription_not_trialing`, `trial_end_in_progress` (another
            request is ending it), `trial_ending_soon` (the trial ends within
            the hour and converts on its own), or `trial_type_not_supported`.
        '422':
          description: >-
            `no_stored_payment_method`: there is no saved payment method to
            charge. `provider_not_supported`: the subscription is not billed by
            a provider that supports this.
      security:
        - ApiKey: []
components:
  schemas:
    EndTrialSubscriptionRequestEntity:
      type: object
      properties:
        charge_behavior:
          type: string
          description: >-
            How the first period is paid. `charge_immediately` (the only value,
            and what an omitted field means) charges the full price of the first
            period on the saved payment method now.
          enum:
            - charge_immediately
          example: charge_immediately
    SubscriptionEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          example: subscription
        product:
          description: The product associated with the subscription.
          oneOf:
            - $ref: '#/components/schemas/ProductEntity'
            - type: string
        customer:
          description: The customer who owns the subscription.
          oneOf:
            - $ref: '#/components/schemas/CustomerEntity'
            - type: string
        items:
          description: Subscription items.
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionItemEntity'
        collection_method:
          $ref: '#/components/schemas/SubscriptionCollectionMethod'
          example: charge_automatically
        status:
          $ref: '#/components/schemas/SubscriptionStatus'
          example: active
        last_transaction_id:
          type: string
          description: The ID of the last paid transaction.
          example: tran_3e6Z6TzvHKdsjEgXnGDEp0
        last_transaction:
          description: The last paid transaction.
          allOf:
            - $ref: '#/components/schemas/TransactionEntity'
        last_transaction_date:
          format: date-time
          type: string
          description: The date of the last paid transaction.
          example: '2024-09-12T12:34:56Z'
        next_transaction_date:
          format: date-time
          type: string
          description: The date when the next subscription transaction will be charged.
          example: '2024-09-12T12:34:56Z'
        current_period_start_date:
          format: date-time
          type: string
          description: The start date of the current subscription period.
          example: '2024-09-12T12:34:56Z'
        current_period_end_date:
          format: date-time
          type: string
          description: The end date of the current subscription period.
          example: '2024-09-12T12:34:56Z'
        canceled_at:
          type: string
          description: The date and time when the subscription was canceled, if applicable.
          example: '2024-09-12T12:34:56Z'
          format: date-time
          nullable: true
        created_at:
          format: date-time
          type: string
          description: The date and time when the subscription was created.
          example: '2024-01-01T00:00:00Z'
        updated_at:
          type: string
          description: The date and time when the subscription was last updated.
          example: '2024-09-12T12:34:56Z'
          format: date-time
        discount:
          type: object
          description: The discount applied to the subscription, if any.
          properties:
            id:
              type: string
              description: The unique identifier of the discount (e.g. dis_...).
              example: dis_3e6Z6TzvHKdsjEgXnGDEp0
            discountCode:
              type: string
              description: The discount code applied to the subscription.
              example: HOLIDAY2024
            name:
              type: string
            type:
              type: string
              enum:
                - percentage
                - fixed
            amount:
              type: number
            duration:
              type: string
              enum:
                - forever
                - once
                - repeating
            durationInMonths:
              type: number
        metadata:
          type: object
          description: Metadata for the subscription in the form of key-value pairs.
          example:
            userId: user_123
            plan: pro
          additionalProperties: true
        recovered:
          type: boolean
          description: >-
            Whether this subscription was started by a recovered checkout.
            Present on subscription objects returned by the API; absent from
            webhook payloads, because recovery is attributed asynchronously
            right after checkout completion.
          example: false
      required:
        - id
        - mode
        - object
        - product
        - customer
        - collection_method
        - status
        - created_at
        - updated_at
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
    ProductEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
        name:
          type: string
          description: The name of the product
        description:
          type: string
          description: A brief description of the product
          example: This is a sample product description.
        image_url:
          type: string
          description: URL of the product image. Only png as jpg are supported
          example: https://example.com/image.jpg
        image_urls:
          description: >-
            Ordered list of product image URLs. The first entry is the cover
            image (mirrored in image_url).
          example:
            - https://example.com/image.jpg
          type: array
          items:
            type: string
        features:
          description: Features of the product.
          type: array
          items:
            $ref: '#/components/schemas/FeatureEntity'
        usage_prices:
          description: >-
            Metered charges billed on top of the base price, one per meter.
            Present on recurring products that meter usage.
          type: array
          items:
            $ref: '#/components/schemas/UsagePriceEntity'
        price:
          type: number
          description: The price of the product in cents. 1000 = $10.00
          example: 400
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in uppercase. Must be a supported
            currency.
          example: USD
        billing_type:
          $ref: '#/components/schemas/ProductBillingType'
          example: recurring
        billing_period:
          $ref: '#/components/schemas/ProductBillingPeriod'
          example: every-month
        recurring_interval:
          type: string
          description: >-
            The unit of the recurring billing interval (`day`, `week`, `month`,
            or `year`). Together with `recurring_interval_count` this is
            authoritative for renewal timing — a `billing_period` of `custom`
            cannot be interpreted without it. For presets it is derived from the
            cadence (e.g. `every-three-months` → `month`). `null` for one-time
            products.
          example: month
          nullable: true
        recurring_interval_count:
          type: integer
          description: >-
            The number of `recurring_interval` units per billing cycle (e.g. `3`
            with a `month` interval bills every three months). Together with
            `recurring_interval` this is authoritative for renewal timing. For
            presets it is derived from the cadence. `null` for one-time
            products.
          example: 3
          nullable: true
        trial_period_days:
          type: integer
          description: >-
            Length of the trial period in days. A whole number of days, at least
            1. Only supported for recurring products. `null` when the product
            has no trial.
          example: 7
          nullable: true
        trial_price:
          type: integer
          description: >-
            Amount charged at checkout to start the trial, instead of a free
            card verification. In cents (100 = $1.00). Requires a trial period
            and must be at least 100 and lower than `price`; only supported on
            standard-priced recurring products without pay-what-you-want. `null`
            for a free trial and for products without a trial.
          example: 100
          nullable: true
        pay_what_you_want:
          type: boolean
          description: >-
            Whether buyers choose the amount they pay, at least `price`.
            One-time products only. Can be missing on a product embedded in
            another object.
        suggested_price:
          type: number
          description: >-
            The amount in cents pre-filled at checkout while `pay_what_you_want`
            is `true`; `null` when there is none. Checkout ignores it while
            `pay_what_you_want` is `false`. Can be missing on a product embedded
            in another object.
          example: 2500
          nullable: true
        status:
          $ref: '#/components/schemas/ProductStatus'
          example: active
        tax_mode:
          $ref: '#/components/schemas/TaxMode'
          example: inclusive
        business_net_pricing:
          type: boolean
          description: >-
            When true, business customers whose valid VAT ID triggers reverse
            charge pay the price excluding VAT instead of the tax-inclusive
            price. Only supported for tax-inclusive one-time products; the
            merchant gives up the VAT portion on those sales. Defaults to false.
          example: false
        tax_category:
          $ref: '#/components/schemas/TaxCategory'
          example: saas
        product_url:
          type: string
          description: >-
            The product page you can redirect your customers to for express
            checkout.
          example: https://creem.io/product/prod_123123123123
        default_success_url:
          type: string
          description: >-
            The URL to which the user will be redirected after successfull
            payment.
          example: https://example.com/?status=successful
          nullable: true
        custom_fields:
          description: >-
            Custom fields configured for the product. Collect additional
            information from your customer during checkout.
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        abandoned_cart_recovery_enabled:
          type: boolean
          description: >-
            Whether abandoned cart recovery is on for this product. Not included
            when the product is embedded in a checkout or subscription.
        cancel_reason_email_enabled:
          type: boolean
          description: >-
            Whether the cancel reason email is on for this product: a customer
            who cancels a subscription to it is emailed asking why, and replies
            go to the merchant. Not included when the product is embedded in a
            checkout or subscription.
        external_id:
          type: string
          description: >-
            Your own key for this product, such as your SKU or internal product
            id. Creem never sets it. Unique per store, case-sensitive; 1 to 255
            characters: letters, digits, `_`, `-`, `.` and `:`. `null` when the
            product has no key.
          example: pro-monthly
          nullable: true
        metadata:
          type: object
          description: >-
            Key-value pairs for your own use, for example `{ "plan": "pro" }`.
            Values are strings or numbers. `null` when the product has none.
          example:
            plan: pro
          additionalProperties: true
          nullable: true
        created_at:
          format: date-time
          type: string
          description: Creation date of the product
          example: '2023-01-01T00:00:00Z'
        updated_at:
          format: date-time
          type: string
          description: Last updated date of the product
          example: '2023-01-01T00:00:00Z'
      required:
        - id
        - mode
        - object
        - name
        - description
        - price
        - currency
        - billing_type
        - billing_period
        - status
        - tax_mode
        - tax_category
        - external_id
        - metadata
        - created_at
        - updated_at
    CustomerEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object’s type. Objects of the same type
            share the same value.
        email:
          type: string
          description: Customer email address.
          example: user@example.com
        name:
          type: string
          description: >-
            Customer name. An empty string when the customer has no name yet,
            for example one created through the API without a name. Their next
            checkout fills it in.
          example: John Doe
          nullable: true
        metadata:
          type: object
          description: Additional metadata associated with the customer.
          example:
            key: value
          additionalProperties: true
          nullable: true
        country:
          type: string
          description: The ISO 3166-1 alpha-2 country code for the customer.
          example: US
          pattern: ^[A-Z]{2}$
          nullable: true
        external_id:
          type: string
          description: >-
            Your own id for this customer, when you have set one — usage
            ingestion resolves `external_customer_id` against it.
          example: user-42
          nullable: true
        created_at:
          format: date-time
          type: string
          description: Creation date of the customer
          example: '2023-01-01T00:00:00Z'
        updated_at:
          format: date-time
          type: string
          description: Last updated date of the customer
          example: '2023-01-01T00:00:00Z'
      required:
        - id
        - mode
        - object
        - email
        - country
        - created_at
        - updated_at
    SubscriptionItemEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object’s type. Objects of the same type
            share the same value.
        product_id:
          type: string
          description: The ID of the product associated with the subscription item.
        price_id:
          type: string
          description: The ID of the price associated with the subscription item.
        units:
          type: number
          description: The number of units for the subscription item.
          nullable: true
      required:
        - id
        - mode
        - object
    SubscriptionCollectionMethod:
      type: string
      description: The method used for collecting payments for the subscription.
      enum:
        - charge_automatically
    SubscriptionStatus:
      type: string
      description: The current status of the subscription.
      enum:
        - active
        - canceled
        - unpaid
        - paused
        - trialing
        - scheduled_cancel
        - past_due
    TransactionEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object's type. Objects of the same type
            share the same value.
          example: transaction
        amount:
          type: number
          description: The transaction amount in cents. 1000 = $10.00
          example: 2000
        amount_paid:
          type: number
          description: The amount the customer paid in cents. 1000 = $10.00
          example: 2000
          nullable: true
        discount_amount:
          type: number
          description: The discount amount in cents. 1000 = $10.00
          example: 2000
          nullable: true
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in uppercase. Must be a supported
            currency.
          example: USD
        type:
          $ref: '#/components/schemas/TransactionType'
        tax_country:
          type: string
          description: The ISO alpha-2 country code where tax is collected.
          example: US
          pattern: ^[A-Z]{2}$
          nullable: true
        tax_amount:
          type: number
          description: The sale tax amount in cents. 1000 = $10.00
          example: 2000
          nullable: true
        status:
          $ref: '#/components/schemas/TransactionStatus'
        refunded_amount:
          type: number
          description: The amount that has been refunded in cents. 1000 = $10.00
          example: 2000
          nullable: true
        order:
          type: string
          description: The order associated with the transaction.
          nullable: true
        subscription:
          type: string
          description: The subscription associated with the transaction.
          nullable: true
        customer:
          type: string
          description: The customer associated with the transaction.
          nullable: true
        description:
          type: string
          description: The description of the transaction.
        period_start:
          type: number
          description: Start period for the invoice as timestamp
        period_end:
          type: number
          description: End period for the invoice as timestamp
        created_at:
          type: number
          description: Creation date of the order as timestamp
      required:
        - id
        - mode
        - object
        - amount
        - currency
        - type
        - status
        - created_at
    FeatureEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the feature.
          example: feat_abc123
        type:
          $ref: '#/components/schemas/ProductFeatureType'
          example: licenseKey
        description:
          type: string
          description: A brief description of the feature.
          example: Access to premium course materials.
        external_id:
          type: string
          description: >-
            Your own key for this feature, unique per product. `null` when the
            feature has none.
          example: pro-credits
          nullable: true
        customer_credits:
          description: >-
            The credit grant behind a `customerCredits` feature. Absent for
            other feature types.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CustomerCreditsFeatureEntity'
        license_key:
          description: >-
            The settings of a `licenseKey` feature. Absent for other feature
            types.
          allOf:
            - $ref: '#/components/schemas/LicenseKeyFeatureEntity'
        private_note:
          type: string
          description: >-
            The private note of a `custom` feature, shown to the customer after
            purchase. Absent for other feature types.
          example: Thanks for your purchase! Your access code is XYZ123.
        file:
          description: >-
            The files of a `file` feature, without their download links (buyers
            get those after purchase). Absent for other feature types.
          allOf:
            - $ref: '#/components/schemas/ProductFileFeatureEntity'
      required:
        - id
        - type
        - description
        - external_id
    UsagePriceEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the usage price.
          example: price_abc123
        meter_id:
          type: string
          description: The meter this charge bills.
          example: mtr_abc123
        unit_price:
          type: number
          description: >-
            Tax-exclusive price per SINGLE meter unit, in minor units of the
            product currency. "$20 per 1,000,000 tokens" is 0.002 (2000 cents /
            1,000,000). Fractional values are allowed.
          example: 0.002
        free_allowance:
          type: integer
          description: >-
            Meter units free per billing period, per customer, before the charge
            applies.
          example: 1000
        cap:
          type: integer
          description: >-
            Optional ceiling on the charge per billing period, in minor units.
            Null means uncapped.
          example: 50000
          nullable: true
        settlement_mode:
          $ref: '#/components/schemas/UsagePriceSettlementMode'
          example: prepaid
        target_account:
          $ref: '#/components/schemas/UsagePriceTargetAccount'
          example: per_unit
        target_account_name:
          type: string
          description: >-
            The per-unit bucket this charge debits: the name given on write, or
            the meter unit label when none was. Null for a `shared` charge.
          example: images
          nullable: true
        trial_usage_mode:
          $ref: '#/components/schemas/UsagePriceTrialUsageMode'
          example: free
      required:
        - id
        - meter_id
        - unit_price
        - free_allowance
        - settlement_mode
        - target_account
        - trial_usage_mode
    ProductBillingType:
      type: string
      description: >-
        Indicates the billing method for the customer. It can either be a
        `recurring` billing cycle or a `onetime` payment.
      enum:
        - recurring
        - onetime
    ProductBillingPeriod:
      type: string
      description: Billing period
      enum:
        - every-month
        - every-three-months
        - every-six-months
        - every-year
        - every-day
        - once
        - custom
    ProductStatus:
      type: string
      description: 'Lifecycle status of the product: `active` or `archived`.'
      enum:
        - active
        - archived
    TaxMode:
      type: string
      description: >-
        Specifies the tax calculation mode for the transaction. If set to
        "inclusive," the tax is included in the price. If set to "exclusive,"
        the tax is added on top of the price.
      enum:
        - inclusive
        - exclusive
    TaxCategory:
      type: string
      description: >-
        Categorizes the type of product or service for tax purposes. This helps
        determine the applicable tax rules based on the nature of the item or
        service.
      enum:
        - saas
        - digital-goods-service
        - ebooks
    CustomField:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CustomFieldType'
        key:
          type: string
          description: >-
            Unique key for custom field. Must be unique to this field,
            alphanumeric, and up to 200 characters.
          maxLength: 200
        label:
          type: string
          description: >-
            The label for the field, displayed to the customer, up to 50
            characters
          maxLength: 200
        optional:
          type: boolean
          description: >-
            Whether the customer is required to complete the field. Defaults to
            `false`.
          nullable: true
        text:
          description: Configuration for text field type.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Text'
        checkbox:
          description: Configuration for checkbox field type.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Checkbox'
      required:
        - type
        - key
        - label
    TransactionType:
      type: string
      description: >-
        The type of transaction. payment(one time payments) and
        invoice(subscription)
      enum:
        - payment
        - invoice
    TransactionStatus:
      type: string
      description: Status of the transaction.
      enum:
        - pending
        - paid
        - refunded
        - partialRefund
        - chargedBack
        - uncollectible
        - declined
        - canceled
        - void
    ProductFeatureType:
      type: string
      description: >-
        The type of the feature: `custom` (private note), `file` (downloadable
        files), `licenseKey` (license key), `customerCredits` (customer credit
        grant), or `githubRepository` (access to a private GitHub repository).
      enum:
        - custom
        - file
        - licenseKey
        - customerCredits
        - githubRepository
    CustomerCreditsFeatureEntity:
      type: object
      properties:
        amount:
          type: string
          description: The number of credits to grant. String to preserve BigInt precision.
          example: '100'
        unit_label:
          type: string
          description: Optional label for the credit unit (e.g. "tokens", "credits").
          example: tokens
          nullable: true
        bucket_name:
          type: string
          description: >-
            The customer-credit bucket this grant funds — the `name` of the
            customer's credit account. Set it to a meter bucket (e.g. "images")
            so the credits fund a per-unit metered price; otherwise they land in
            `default` and metered usage cannot spend them. Distinct from
            `unit_label`, which is only a display label. On UPDATE the field is
            tri-state: OMIT it to leave the stored bucket unchanged, send `null`
            to clear it to the shared `default` wallet, or send a name to set
            it. On CREATE, omitted or null both mean `default`. A
            present-but-blank value is rejected.
          example: images
          nullable: true
        requires_moderation:
          type: boolean
          description: >-
            When `true`, the credits go to the customer's AI generation wallet:
            spending them requires a `moderation_id` from the Moderation API.
            `bucket_name` must be omitted (422
            `bucket_name_not_allowed_with_requires_moderation`); that wallet is
            the reserved `generation` bucket. `generation` and `generation:*`
            (any casing) cannot be named directly (422
            `generation_bucket_reserved`). Defaults to `false` on create; on
            update, omitting it keeps the stored setting, also when
            `bucket_name` is sent as `null` (as reads return it); send `false`
            to move the credits to the shared wallet, or to the `bucket_name`
            sent with it. Always present on reads.
          example: false
        resets_each_period:
          type: boolean
          description: >-
            Unused credits from subscription grants expire at each renewal;
            credits from one-time purchases never expire. The reset runs on
            every paid subscription transaction of the product: renewals, and
            also the first paid charge after a trial and plan changes charged
            immediately. Each time, the part of the previous grant the customer
            did not spend expires before the new grant lands. Subscription
            products only (422 `credits_reset_requires_subscription` on a
            one-time product). Defaults to `false` on create. On update,
            omitting it keeps the stored setting only when the feature's `id` is
            sent; a feature sent without `id` is replaced and defaults to
            `false`. Always present on reads.
          example: false
      required:
        - amount
    LicenseKeyFeatureEntity:
      type: object
      properties:
        activation_limit:
          type: integer
          description: >-
            How many devices or instances one license key can be activated on.
            `null` for unlimited activations; `0` for keys that can't be
            activated at all. On a write, `0` only when sending back a stored
            feature whose limit is `0`; anywhere else it answers `400`. The
            limit is checked at each activation, so a change applies to keys
            already issued too: activations they already have stay, and a key at
            or above a lowered limit can't be activated again.
          example: 3
          minimum: 0
          maximum: 2147483647
          nullable: true
        expiry:
          description: >-
            How long a license key stays valid after it is issued. `null` for
            keys that never expire. Each key keeps the expiry it was issued
            with, so a change applies only to keys issued later.
          oneOf:
            - $ref: '#/components/schemas/LicenseKeyExpiryEntity'
            - type: object
              nullable: true
              enum:
                - null
              additionalProperties: false
      required:
        - activation_limit
        - expiry
    ProductFileFeatureEntity:
      type: object
      properties:
        files:
          description: The files buyers can download after purchase.
          type: array
          items:
            $ref: '#/components/schemas/ProductFeatureFileEntity'
      required:
        - files
    UsagePriceSettlementMode:
      type: string
      description: >-
        How the charge settles: `prepaid` debits the customer credit account as
        usage aggregates; `postpaid` bills at renewal where the store supports
        it.
      enum:
        - prepaid
        - postpaid
    UsagePriceTargetAccount:
      type: string
      description: >-
        Credit bucket a prepaid charge debits: `shared` (the customer default
        wallet) or `per_unit` (a bucket named after the meter unit label, or
        `target_account_name`). Defaults to `shared`.
      enum:
        - shared
        - per_unit
    UsagePriceTrialUsageMode:
      type: string
      description: >-
        Usage metered during a free trial: `free` is not charged, `accrue` is
        charged when the trial converts. Defaults to `free`.
      enum:
        - free
        - accrue
    CustomFieldType:
      type: string
      description: The type of the field.
      enum:
        - text
        - checkbox
    Text:
      type: object
      properties:
        max_length:
          type: number
          description: Maximum character length constraint for the input.
          nullable: true
        minimum_length:
          type: number
          description: Minimum character length requirement for the input.
          nullable: true
        value:
          type: string
          description: The value of the input.
          nullable: true
    Checkbox:
      type: object
      properties:
        label:
          type: string
          description: The markdown text to display for the checkbox.
          nullable: true
        value:
          type: boolean
          description: The value of the checkbox (checked or not).
          nullable: true
    LicenseKeyExpiryEntity:
      type: object
      properties:
        interval:
          $ref: '#/components/schemas/LicenseKeyExpiryInterval'
          example: year
        interval_count:
          type: integer
          description: How many `interval`s a license key stays valid after it is issued.
          example: 1
          minimum: 1
          maximum: 10000
      required:
        - interval
        - interval_count
    ProductFeatureFileEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file.
          example: file_4dGTkmBdnTnU9vV3KZ2Hcz
        file_name:
          type: string
          description: The name buyers download the file under.
          example: ebook.pdf
        type:
          type: string
          description: The MIME type of the file.
          example: application/pdf
        size:
          type: integer
          description: The size of the file in bytes.
          example: 1024000
        sha256:
          type: string
          description: >-
            The SHA-256 of the file, base64-encoded, as `POST
            /v1/files/{id}/confirm` returns it. Compare it before uploading a
            file again. `null` for a file stored without one.
          example: n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=
          nullable: true
      required:
        - id
        - file_name
        - type
        - size
        - sha256
    LicenseKeyExpiryInterval:
      type: string
      description: The unit of the license key validity period.
      enum:
        - day
        - month
        - year
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.