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

# Top up wallet

> Use when adding funds to a wallet (e.g. top-up, refund, or manual credit). Supports optional idempotency via reference.



## OpenAPI

````yaml /api-reference/openapi.json post /wallets/{id}/top-up
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /wallets/{id}/top-up:
    post:
      tags:
        - Wallets
      summary: Top up wallet
      description: >-
        Use when adding funds to a wallet (e.g. top-up, refund, or manual
        credit). Supports optional idempotency via reference.
      operationId: topUpWallet
      parameters:
        - name: id
          in: path
          description: Wallet ID
          required: true
          schema:
            type: string
      requestBody:
        description: Top up request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TopUpWalletRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpWalletResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TopUpWalletRequest:
      required:
        - transaction_reason
      type: object
      properties:
        amount:
          type: string
          description: >-
            amount is the amount in the currency of the wallet to be added

            NOTE: this is not the number of credits to add, but the amount in
            the currency

            amount = credits_to_add * conversion_rate

            if both amount and credits_to_add are provided, amount will be
            ignored

            ex if the wallet has a conversion_rate of 2 then adding an amount of

            10 USD in the wallet wil add 5 credits in the wallet
        bonus_credits_expiry_date_utc:
          type: string
          description: >-
            bonus_credits_expiry_date_utc is the expiry (UTC, full precision)
            applied to the bonus

            credits transaction. Independent of expiry_date_utc, which governs
            the purchase credits.

            Only honored when bonus credits are actually granted (explicit
            BonusCreditsToAdd or slab).
        bonus_credits_to_add:
          type: string
          description: >-
            bonus_credits_to_add is an explicit override for the bonus credits
            granted alongside this

            purchase. When nil/omitted, the bonus is resolved from the tenant's

            bonus_credits_topup_config slabs (if enabled). When set, it must be
            greater than 0 and is

            used as-is, skipping slab resolution. To grant no bonus, omit this
            field entirely.
        checkout:
          $ref: '#/components/schemas/CheckoutParams'
        credits_to_add:
          type: string
          description: credits_to_add is the number of credits to add to the wallet
        description:
          type: string
          description: description to add any specific details about the transaction
        expiry_date_utc:
          type: string
          description: |-
            expiry_date_utc is the expiry date in UTC timezone
            ex 2025-01-01 00:00:00 UTC
        force_sync_invoice:
          type: boolean
        idempotency_key:
          type: string
          description: idempotency_key is a unique key for the transaction
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        priority:
          type: integer
          description: |-
            priority is the priority of the transaction
            lower number means higher priority
            default is nil which means no priority at all
        transaction_reason:
          $ref: '#/components/schemas/types.TransactionReason'
    TopUpWalletResponse:
      type: object
      properties:
        checkout_session:
          $ref: '#/components/schemas/CheckoutSessionResponse'
        invoice_id:
          type: string
          description: >-
            Invoice ID if an invoice was created (only for
            PURCHASED_CREDIT_INVOICED)
        wallet:
          $ref: '#/components/schemas/WalletResponse'
        wallet_transaction:
          $ref: '#/components/schemas/WalletTransactionResponse'
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    CheckoutParams:
      required:
        - payment_provider
      type: object
      properties:
        cancel_url:
          type: string
        failure_url:
          type: string
        idempotency_key:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        payment_provider:
          $ref: '#/components/schemas/types.CheckoutPaymentProvider'
        payment_provider_config:
          $ref: '#/components/schemas/types.CheckoutPaymentProviderConfig'
        success_url:
          type: string
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.TransactionReason:
      type: string
      enum:
        - INVOICE_PAYMENT
        - FREE_CREDIT_GRANT
        - SUBSCRIPTION_CREDIT_GRANT
        - PURCHASED_CREDIT_INVOICED
        - PURCHASED_CREDIT_DIRECT
        - CREDIT_NOTE
        - CREDIT_EXPIRED
        - WALLET_TERMINATION
        - MANUAL_BALANCE_DEBIT
        - CREDIT_ADJUSTMENT
        - INVOICE_VOID_REFUND
        - PURCHASED_CREDIT_BONUS
      x-enum-varnames:
        - TransactionReasonInvoicePayment
        - TransactionReasonFreeCredit
        - TransactionReasonSubscriptionCredit
        - TransactionReasonPurchasedCreditInvoiced
        - TransactionReasonPurchasedCreditDirect
        - TransactionReasonCreditNote
        - TransactionReasonCreditExpired
        - TransactionReasonWalletTermination
        - TransactionReasonManualBalanceDebit
        - TransactionReasonCreditAdjustment
        - TransactionReasonInvoiceVoidRefund
        - TransactionReasonPurchasedCreditBonus
      x-speakeasy-name-override: TransactionReason
    CheckoutSessionResponse:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/types.CheckoutAction'
        cancel_url:
          type: string
        cancelled_at:
          type: string
          format: date-time
        checkout_invoice_id:
          type: string
          description: >-
            CheckoutInvoiceID and CheckoutPaymentID are set once the apply step

            creates the corresponding Flexprice entities (completed sessions
            only).
        checkout_payment_id:
          type: string
        checkout_status:
          $ref: '#/components/schemas/types.CheckoutStatus'
        completed_at:
          type: string
          format: date-time
        configuration:
          $ref: '#/components/schemas/checkout.JSONBCheckoutConfiguration'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        customer_id:
          type: string
        environment_id:
          type: string
        expires_at:
          type: string
          description: |-
            ExpiresAt is required. A Temporal timer fires at this time for any
            session still in initiated|pending, marking it expired. The caller
            must create a new session after expiry (expire-and-restart model).
          format: date-time
        failure_reason:
          type: string
          description: FailureReason is a human-readable string set on failed sessions.
        failure_url:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
          description: >-
            IdempotencyKey is caller-supplied. It is unique only while the
            session

            is active (initiated|pending). The same key may be reused once the

            session reaches a terminal state (completed|failed|expired).
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_action:
          $ref: '#/components/schemas/types.PaymentAction'
        payment_provider:
          $ref: '#/components/schemas/types.CheckoutPaymentProvider'
        payment_provider_config:
          $ref: '#/components/schemas/checkout.JSONBCheckoutPaymentProviderConfig'
        provider_result:
          $ref: '#/components/schemas/checkout.JSONBCheckoutProviderResult'
        result:
          $ref: '#/components/schemas/checkout.JSONBCheckoutResult'
        status:
          $ref: '#/components/schemas/types.Status'
        success_url:
          type: string
          description: >-
            Redirect URLs sent to the payment provider. The provider redirects
            the

            user browser to the appropriate URL after the payment flow
            completes.
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    WalletResponse:
      type: object
      properties:
        alert_settings:
          $ref: '#/components/schemas/types.AlertSettings'
        alert_state:
          $ref: '#/components/schemas/types.AlertState'
        auto_topup:
          $ref: '#/components/schemas/types.AutoTopup'
        balance:
          type: string
        config:
          $ref: '#/components/schemas/types.WalletConfig'
        conversion_rate:
          type: string
          description: |-
            amount in the currency =  number of credits * conversion_rate
            ex if conversion_rate is 1, then 1 USD = 1 credit
            ex if conversion_rate is 2, then 1 USD = 0.5 credits
            ex if conversion_rate is 0.5, then 1 USD = 2 credits
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        credit_balance:
          type: string
        credits_available_breakdown:
          $ref: '#/components/schemas/types.CreditBreakdown'
        currency:
          type: string
        customer_id:
          type: string
        description:
          type: string
        environment_id:
          type: string
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        name:
          type: string
        real_time_balance:
          type: string
        real_time_credit_balance:
          type: string
        status:
          $ref: '#/components/schemas/types.Status'
        tenant_id:
          type: string
        topup_conversion_rate:
          type: string
          description: >-
            topup_conversion_rate is the conversion rate for the topup to the
            currency

            ex if topup_conversion_rate is 1, then 1 USD = 1 credit

            ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits

            ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
        wallet_status:
          $ref: '#/components/schemas/types.WalletStatus'
        wallet_type:
          $ref: '#/components/schemas/types.WalletType'
    WalletTransactionResponse:
      type: object
      properties:
        amount:
          type: string
        conversion_rate:
          type: string
          description: >-
            conversion_rate is the conversion rate for the transaction to the
            currency
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        created_by_user:
          $ref: '#/components/schemas/UserResponse'
        credit_amount:
          type: string
        credit_balance_after:
          type: string
        credit_balance_before:
          type: string
        credits_available:
          type: string
        currency:
          type: string
        customer:
          $ref: '#/components/schemas/CustomerResponse'
        customer_id:
          type: string
        description:
          type: string
        environment_id:
          type: string
        expiry_date:
          type: string
          format: date-time
        id:
          type: string
        idempotency_key:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        parent_transaction_id:
          type: string
          description: >-
            ParentTransactionID is the ID of the parent wallet_transaction this
            row was earned from

            (the purchase tx, for a bonus grant). Empty for ordinary
            transactions.
        priority:
          type: integer
        reference_id:
          type: string
        reference_type:
          $ref: '#/components/schemas/types.WalletTxReferenceType'
        status:
          $ref: '#/components/schemas/types.Status'
        tenant_id:
          type: string
        topup_conversion_rate:
          type: string
          description: >-
            topup_conversion_rate is the conversion rate for the topup to the
            currency
        transaction_reason:
          $ref: '#/components/schemas/types.TransactionReason'
        transaction_status:
          $ref: '#/components/schemas/types.TransactionStatus'
        type:
          $ref: '#/components/schemas/types.TransactionType'
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
        wallet:
          $ref: '#/components/schemas/WalletResponse'
        wallet_id:
          type: string
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
        - not_implemented
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
        - ErrCodeNotImplemented
      x-speakeasy-name-override: ErrorCode
    types.CheckoutPaymentProvider:
      type: string
      enum:
        - razorpay
      x-enum-varnames:
        - CheckoutPaymentProviderRazorpay
      x-speakeasy-name-override: CheckoutPaymentProvider
    types.CheckoutPaymentProviderConfig:
      type: object
      properties:
        collection_method:
          $ref: '#/components/schemas/types.CollectionMethod'
        max_mandate_limit:
          type: string
        payment_method:
          $ref: '#/components/schemas/types.PaymentMethodType'
      x-speakeasy-name-override: CheckoutPaymentProviderConfig
    types.CheckoutAction:
      type: string
      enum:
        - create_subscription
        - modify_subscription
        - wallet_topup
        - add_addon
      x-enum-varnames:
        - CheckoutActionCreateSubscription
        - CheckoutActionModifySubscription
        - CheckoutActionWalletTopup
        - CheckoutActionAddAddon
      x-speakeasy-name-override: CheckoutAction
    types.CheckoutStatus:
      type: string
      enum:
        - initiated
        - pending
        - completed
        - failed
        - expired
      x-enum-varnames:
        - CheckoutStatusInitiated
        - CheckoutStatusPending
        - CheckoutStatusCompleted
        - CheckoutStatusFailed
        - CheckoutStatusExpired
      x-speakeasy-name-override: CheckoutStatus
    checkout.JSONBCheckoutConfiguration:
      type: object
      properties:
        add_addon_params:
          $ref: '#/components/schemas/types.AddAddonParams'
        create_subscription_params:
          $ref: '#/components/schemas/types.CreateSubscriptionParams'
        modify_subscription_params:
          $ref: '#/components/schemas/types.ModifySubscriptionParams'
        wallet_topup_params:
          $ref: '#/components/schemas/types.WalletTopupParams'
    types.PaymentAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/types.PaymentActionType'
        url:
          type: string
      x-speakeasy-name-override: PaymentAction
    checkout.JSONBCheckoutPaymentProviderConfig:
      type: object
      properties:
        collection_method:
          $ref: '#/components/schemas/types.CollectionMethod'
        max_mandate_limit:
          type: string
        payment_method:
          $ref: '#/components/schemas/types.PaymentMethodType'
    checkout.JSONBCheckoutProviderResult:
      type: object
      properties:
        expires_at:
          type: string
          description: >-
            ExpiresAt is the provider URL expiry. When set and earlier than the
            session expiry,

            executeCheckoutAction tightens the session expiry to match.
          format: date-time
        next_action:
          $ref: '#/components/schemas/types.PaymentAction'
        provider_metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            ProviderMetadata holds provider-specific data not needed for
            business logic.
        provider_payment_intent_id:
          type: string
          description: >-
            ProviderPaymentIntentID is the provider-side charge/intent ID.

            Stripe returns this at link creation (pi_xxx); others populate it
            from the webhook payload.
        provider_session_id:
          type: string
          description: >-
            ProviderSessionID is stored in EntityIntegrationMapping at link
            creation.
              Stripe:   Checkout Session ID  (cs_xxx)
              Razorpay: Payment Link ID      (plink_xxx)
              Nomod:    Payment Link ID      (NOTE: webhook uses Charge ID; look up by PaymentLinkID field)
              Moyasar:  Payment ID
    checkout.JSONBCheckoutResult:
      type: object
      properties:
        create_subscription_result:
          $ref: '#/components/schemas/types.CreateSubscriptionResult'
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    types.AlertSettings:
      type: object
      properties:
        alert_enabled:
          type: boolean
        critical:
          $ref: '#/components/schemas/types.AlertThreshold'
        info:
          $ref: '#/components/schemas/types.AlertThreshold'
        warning:
          $ref: '#/components/schemas/types.AlertThreshold'
      x-speakeasy-name-override: AlertSettings
    types.AlertState:
      type: string
      enum:
        - ok
        - info
        - warning
        - in_alarm
      x-enum-varnames:
        - AlertStateOk
        - AlertStateInfo
        - AlertStateWarning
        - AlertStateInAlarm
      x-speakeasy-name-override: AlertState
    types.AutoTopup:
      type: object
      properties:
        amount:
          type: number
        cooldown:
          $ref: '#/components/schemas/types.Duration'
        enabled:
          type: boolean
        invoicing:
          type: boolean
        threshold:
          type: number
      x-speakeasy-name-override: AutoTopup
    types.WalletConfig:
      type: object
      properties:
        allowed_price_types:
          type: array
          description: >-
            AllowedPriceTypes is a list of price types that are allowed for the
            wallet

            nil means all price types are allowed
          items:
            $ref: '#/components/schemas/types.WalletConfigPriceType'
      x-speakeasy-name-override: WalletConfig
    types.CreditBreakdown:
      type: object
      properties:
        free:
          type: string
        purchased:
          type: string
      x-speakeasy-name-override: CreditBreakdown
    types.WalletStatus:
      type: string
      enum:
        - active
        - frozen
        - closed
      x-enum-varnames:
        - WalletStatusActive
        - WalletStatusFrozen
        - WalletStatusClosed
      x-speakeasy-name-override: WalletStatus
    types.WalletType:
      type: string
      enum:
        - PRE_PAID
        - POST_PAID
      x-enum-varnames:
        - WalletTypePrePaid
        - WalletTypePostPaid
      x-speakeasy-name-override: WalletType
    UserResponse:
      type: object
      properties:
        email:
          type: string
          description: Empty for service accounts
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        roles:
          type: array
          items:
            type: string
        tenant:
          $ref: '#/components/schemas/TenantResponse'
        type:
          $ref: '#/components/schemas/types.UserType'
    CustomerResponse:
      type: object
      properties:
        address_city:
          type: string
          description: AddressCity is the city of the customer's address
        address_country:
          type: string
          description: >-
            AddressCountry is the country of the customer's address (ISO 3166-1
            alpha-2)
        address_line1:
          type: string
          description: AddressLine1 is the first line of the customer's address
        address_line2:
          type: string
          description: AddressLine2 is the second line of the customer's address
        address_postal_code:
          type: string
          description: AddressPostalCode is the postal code of the customer's address
        address_state:
          type: string
          description: AddressState is the state of the customer's address
        contact:
          type: string
          description: Contact is an optional contact number for the customer (e.g. phone)
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        email:
          type: string
          description: Email is the email of the customer
        environment_id:
          type: string
          description: EnvironmentID is the environment identifier for the customer
        external_id:
          type: string
          description: ExternalID is the external identifier for the customer
        id:
          type: string
          description: ID is the unique identifier for the customer
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/EntityIntegrationMappingResponse'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata
        name:
          type: string
          description: Name is the name of the customer
        status:
          $ref: '#/components/schemas/types.Status'
        tenant_id:
          type: string
        timezone:
          type: string
          description: |-
            Timezone is the customer's IANA timezone name (e.g. "Asia/Kolkata").
            Defaults to "UTC". Inherited by subscriptions at creation time.
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
      description: Customer response object containing all customer information
    types.WalletTxReferenceType:
      type: string
      enum:
        - PAYMENT
        - EXTERNAL
        - REQUEST
        - INVOICE
      x-enum-varnames:
        - WalletTxReferenceTypePayment
        - WalletTxReferenceTypeExternal
        - WalletTxReferenceTypeRequest
        - WalletTxReferenceTypeInvoice
      x-speakeasy-name-override: WalletTxReferenceType
    types.TransactionStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
      x-enum-varnames:
        - TransactionStatusPending
        - TransactionStatusCompleted
        - TransactionStatusFailed
      x-speakeasy-name-override: TransactionStatus
    types.TransactionType:
      type: string
      enum:
        - credit
        - debit
      x-enum-varnames:
        - TransactionTypeCredit
        - TransactionTypeDebit
      x-speakeasy-name-override: TransactionType
    types.CollectionMethod:
      type: string
      enum:
        - charge_automatically
        - send_invoice
      x-enum-varnames:
        - CollectionMethodChargeAutomatically
        - CollectionMethodSendInvoice
      x-speakeasy-name-override: CollectionMethod
    types.PaymentMethodType:
      type: string
      enum:
        - CARD
        - ACH
        - OFFLINE
        - CREDITS
        - PAYMENT_LINK
        - UPI
      x-enum-varnames:
        - PaymentMethodTypeCard
        - PaymentMethodTypeACH
        - PaymentMethodTypeOffline
        - PaymentMethodTypeCredits
        - PaymentMethodTypePaymentLink
        - PaymentMethodTypeUPI
      x-speakeasy-name-override: PaymentMethodType
    types.AddAddonParams:
      type: object
      properties:
        addons:
          type: array
          items:
            $ref: '#/components/schemas/types.AddAddonRef'
        subscription_id:
          type: string
      x-speakeasy-name-override: AddAddonParams
    types.CreateSubscriptionParams:
      type: object
      properties:
        billing_period:
          $ref: '#/components/schemas/types.BillingPeriod'
        currency:
          type: string
        end_date:
          type: string
          format: date-time
        lookup_key:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        plan_id:
          type: string
        start_date:
          type: string
          format: date-time
        subscription_id:
          type: string
      x-speakeasy-name-override: CreateSubscriptionParams
    types.ModifySubscriptionParams:
      type: object
      properties:
        line_item_modifications:
          type: array
          items:
            $ref: '#/components/schemas/types.ModifySubscriptionLineItem'
        subscription_id:
          type: string
      x-speakeasy-name-override: ModifySubscriptionParams
    types.WalletTopupParams:
      required:
        - wallet_id
      type: object
      properties:
        wallet_id:
          type: string
        wallet_transaction_id:
          type: string
      x-speakeasy-name-override: WalletTopupParams
    types.PaymentActionType:
      type: string
      enum:
        - checkout_url
        - payment_link
      x-enum-varnames:
        - PaymentActionTypeCheckoutURL
        - PaymentActionTypePaymentLink
      x-speakeasy-name-override: PaymentActionType
    types.CreateSubscriptionResult:
      type: object
      properties:
        invoice_id:
          type: string
        payment_id:
          type: string
        subscription_id:
          type: string
      x-speakeasy-name-override: CreateSubscriptionResult
    types.AlertThreshold:
      type: object
      properties:
        condition:
          $ref: '#/components/schemas/types.AlertCondition'
        threshold:
          type: string
      x-speakeasy-name-override: AlertThreshold
    types.Duration:
      type: object
      properties:
        unit:
          $ref: '#/components/schemas/types.DurationUnit'
        value:
          type: integer
      enum:
        - '3600000000000'
      x-enum-varnames:
        - EntitlementGrantMinDuration
      x-speakeasy-name-override: Duration
    types.WalletConfigPriceType:
      type: string
      enum:
        - ALL
        - USAGE
        - FIXED
      x-enum-varnames:
        - WalletConfigPriceTypeAll
        - WalletConfigPriceTypeUsage
        - WalletConfigPriceTypeFixed
      x-speakeasy-name-override: WalletConfigPriceType
    TenantResponse:
      type: object
      properties:
        billing_details:
          $ref: '#/components/schemas/TenantBillingDetails'
        created_at:
          type: string
          format: date-time
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        name:
          type: string
        status:
          type: string
        updated_at:
          type: string
          format: date-time
    types.UserType:
      type: string
      enum:
        - user
        - service_account
      x-enum-varnames:
        - UserTypeUser
        - UserTypeServiceAccount
      x-speakeasy-name-override: UserType
    EntityIntegrationMappingResponse:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        entity_id:
          type: string
        entity_type:
          $ref: '#/components/schemas/types.IntegrationEntityType'
        environment_id:
          type: string
        id:
          type: string
        metadata:
          type: object
          additionalProperties: true
        provider_entity_id:
          type: string
        provider_type:
          type: string
        status:
          $ref: '#/components/schemas/types.Status'
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    types.AddAddonRef:
      type: object
      properties:
        addon_id:
          type: string
        association_id:
          type: string
        cadence:
          $ref: '#/components/schemas/types.AddonCadence'
        proration_behavior:
          $ref: '#/components/schemas/types.ProrationBehavior'
        start_date:
          type: string
          format: date-time
      x-speakeasy-name-override: AddAddonRef
    types.BillingPeriod:
      type: string
      enum:
        - MONTHLY
        - ANNUAL
        - WEEKLY
        - DAILY
        - QUARTERLY
        - HALF_YEARLY
        - ONETIME
      x-enum-varnames:
        - BILLING_PERIOD_MONTHLY
        - BILLING_PERIOD_ANNUAL
        - BILLING_PERIOD_WEEKLY
        - BILLING_PERIOD_DAILY
        - BILLING_PERIOD_QUARTER
        - BILLING_PERIOD_HALF_YEAR
        - BILLING_PERIOD_ONETIME
      x-speakeasy-name-override: BillingPeriod
    types.ModifySubscriptionLineItem:
      type: object
      properties:
        effective_date:
          type: string
          format: date-time
        line_item_id:
          type: string
        quantity:
          type: string
      x-speakeasy-name-override: ModifySubscriptionLineItem
    types.AlertCondition:
      type: string
      enum:
        - above
        - below
      x-enum-varnames:
        - AlertConditionAbove
        - AlertConditionBelow
      x-speakeasy-name-override: AlertCondition
    types.DurationUnit:
      type: string
      enum:
        - second
        - minute
        - hour
        - day
      x-enum-varnames:
        - DurationUnitSecond
        - DurationUnitMinute
        - DurationUnitHour
        - DurationUnitDay
      x-speakeasy-name-override: DurationUnit
    TenantBillingDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        email:
          type: string
        help_email:
          type: string
        phone:
          type: string
    types.IntegrationEntityType:
      type: string
      enum:
        - customer
        - plan
        - invoice
        - subscription
        - payment
        - credit_note
        - addon
        - item
        - item_price
        - price
        - invoice_line_item
      x-enum-varnames:
        - IntegrationEntityTypeCustomer
        - IntegrationEntityTypePlan
        - IntegrationEntityTypeInvoice
        - IntegrationEntityTypeSubscription
        - IntegrationEntityTypePayment
        - IntegrationEntityTypeCreditNote
        - IntegrationEntityTypeAddon
        - IntegrationEntityTypeItem
        - IntegrationEntityTypeItemPrice
        - IntegrationEntityTypePrice
        - IntegrationEntityTypeInvoiceLineItem
      x-speakeasy-name-override: IntegrationEntityType
    types.AddonCadence:
      type: string
      enum:
        - onetime
        - recurring
      x-enum-varnames:
        - AddonCadenceOnetime
        - AddonCadenceRecurring
      x-speakeasy-name-override: AddonCadence
    types.ProrationBehavior:
      type: string
      enum:
        - create_prorations
        - none
      x-enum-comments:
        ProrationBehaviorCreateProrations: 'Default: Create credits/charges on invoice'
        ProrationBehaviorNone: Calculate but don't apply (e.g., for previews)
      x-enum-varnames:
        - ProrationBehaviorCreateProrations
        - ProrationBehaviorNone
      x-speakeasy-name-override: ProrationBehavior
    Address:
      type: object
      properties:
        address_city:
          maxLength: 100
          type: string
        address_country:
          type: string
        address_line1:
          maxLength: 255
          type: string
        address_line2:
          maxLength: 255
          type: string
        address_postal_code:
          maxLength: 20
          type: string
        address_state:
          maxLength: 100
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````