> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch v1accountcheckout

> Every field is optional and an absent field is left unchanged, so a screen that changes the provider never has to resend the squad selection it did not touch.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml patch /v1/account/checkout
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/account/checkout:
    patch:
      tags:
        - account
      description: >-
        Every field is optional and an absent field is left unchanged, so a
        screen that changes the provider never has to resend the squad selection
        it did not touch.
      operationId: updateAccountCheckout
      parameters:
        - $ref: '#/components/parameters/CSRFToken'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  type: string
                currency:
                  type: string
                applyWallet:
                  type: boolean
                subscriptionId:
                  type: string
                squadIds:
                  type: array
                  items:
                    type: string
                    format: uuid
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCheckout'
        '404':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
  schemas:
    AccountCheckout:
      type: object
      required:
        - id
        - planVersionId
        - plan
        - operation
        - currency
        - providers
        - applyWallet
        - quote
        - subscriptions
        - targetRequired
        - multiSubscription
        - squads
        - selectedSquadIds
        - squadSelection
        - quoteAvailable
        - addons
        - selectedAddons
      properties:
        id:
          type: string
          format: uuid
        planVersionId:
          type: string
          format: uuid
        plan:
          $ref: '#/components/schemas/AccountPlan'
        operation:
          type: string
          enum:
            - purchase
            - renew
            - upgrade
            - downgrade
        currency:
          type: string
        provider:
          type: string
        providers:
          type: array
          items:
            $ref: '#/components/schemas/AccountPaymentChoice'
        applyWallet:
          type: boolean
        quote:
          $ref: '#/components/schemas/AccountCheckoutQuote'
        promoCode:
          type: string
        promoRejection:
          type: string
          enum:
            - promo_unknown
            - promo_ineligible
            - promo_exhausted
            - promo_invalid
          description: Why the entered code does not apply. Present on a 200, not an error.
        subscriptionId:
          type: string
        newSubscription:
          type: boolean
        subscriptions:
          type: array
          description: The subscriptions this checkout could target.
          items:
            type: object
            required:
              - id
              - slot
              - plan
              - status
            properties:
              id:
                type: string
                format: uuid
              slot:
                type: integer
              label:
                type: string
              plan:
                type: string
              status:
                type: string
              endsAt:
                type: string
                format: date-time
        targetRequired:
          type: boolean
          description: A target must be named before this checkout can be confirmed.
        multiSubscription:
          type: boolean
          description: False means the panel renders no picker at all.
        squads:
          $ref: '#/components/schemas/AccountSquadOffer'
        selectedSquadIds:
          type: array
          items:
            type: string
            format: uuid
        squadSelection:
          type: object
          description: >-
            Whether the server choice still stands between this checkout and a
            price. A plan that asks the customer to choose servers opens with
            `required: true` and no quote rather than failing; `reason` is the
            commerce vocabulary the panel already explains.
          required:
            - required
          properties:
            required:
              type: boolean
            reason:
              type: string
              enum:
                - squad_selection_required
                - squad_selection_too_few
        quoteAvailable:
          type: boolean
          description: >-
            False while the quote is withheld; `quote` then carries only the
            currency.
        addons:
          type: array
          items:
            $ref: '#/components/schemas/AccountAddonOffer'
        selectedAddons:
          type: array
          items:
            type: object
            required:
              - addonVersionId
              - quantity
            properties:
              addonVersionId:
                type: string
                format: uuid
              quantity:
                type: integer
        termsUrl:
          type: string
        expiresAt:
          type: string
          format: date-time
    AccountPlan:
      type: object
      required:
        - planId
        - planVersionId
        - code
        - kind
        - name
        - billingPeriod
        - durationSeconds
        - price
        - operations
        - eligible
      properties:
        planId:
          type: string
          format: uuid
        planVersionId:
          type: string
          format: uuid
        code:
          type: string
        kind:
          type: string
          enum:
            - trial
            - one_time
            - recurring
            - manual
        name:
          type: string
        description:
          type: string
        sortOrder:
          type: integer
        billingPeriod:
          type: string
        durationSeconds:
          type: integer
          format: int64
        gracePeriodSeconds:
          type: integer
          format: int64
        price:
          $ref: '#/components/schemas/AccountMoney'
        recurringCapable:
          type: boolean
        configurableSquads:
          type: boolean
        operations:
          type: array
          description: >-
            The lifecycle actions the configured plan policy allows for this
            customer.
          items:
            type: string
            enum:
              - purchase
              - extension
              - upgrade
              - downgrade
        eligible:
          type: boolean
        held:
          type: boolean
          description: >-
            The customer already holds an entitlement for this plan, so the
            catalogue can mark it as the one they are on.
        ineligibleReason:
          type: string
        trafficAllowanceBytes:
          type: integer
          format: int64
          nullable: true
          description: >-
            Null means unlimited. Nullable rather than zero because unlimited
            and none are different offers.
        deviceLimit:
          type: integer
          nullable: true
          description: Null means unlimited.
    AccountPaymentChoice:
      type: object
      required:
        - provider
        - currency
        - recurring
      properties:
        provider:
          type: string
        currency:
          type: string
        amountMinor:
          type: integer
          format: int64
        recurring:
          type: boolean
    AccountCheckoutQuote:
      type: object
      required:
        - currency
        - subtotalMinor
        - addonMinor
        - discountMinor
        - walletBalanceMinor
        - walletAppliedMinor
        - externalMinor
      description: >-
        The exact application breakdown. Every figure is computed on the server,
        so the number a customer is asked to approve and the number they are
        charged cannot be arrived at two different ways.
      properties:
        currency:
          type: string
        subtotalMinor:
          type: integer
          format: int64
        addonMinor:
          type: integer
          format: int64
        discountMinor:
          type: integer
          format: int64
        walletBalanceMinor:
          type: integer
          format: int64
        walletAppliedMinor:
          type: integer
          format: int64
        externalMinor:
          type: integer
          format: int64
          description: What still has to be settled through a provider.
    AccountSquadOffer:
      type: object
      required:
        - selection
        - minimum
        - configurable
        - offered
      properties:
        selection:
          type: string
          description: Whether squads are assigned automatically or chosen by the customer.
        minimum:
          type: integer
        maximum:
          type: integer
          nullable: true
        configurable:
          type: boolean
        offered:
          type: array
          items:
            type: object
            required:
              - squadId
              - label
            properties:
              squadId:
                type: string
                format: uuid
              label:
                type: string
    AccountAddonOffer:
      type: object
      required:
        - addonId
        - addonVersionId
        - code
        - kind
        - name
        - maxQuantity
        - proration
        - price
      properties:
        addonId:
          type: string
          format: uuid
        addonVersionId:
          type: string
          format: uuid
        code:
          type: string
        kind:
          type: string
          enum:
            - traffic
            - devices
            - squads
        name:
          type: string
        description:
          type: string
        maxQuantity:
          type: integer
        proration:
          type: string
          description: The documented proration rule for this add-on.
        squadCount:
          type: integer
        price:
          $ref: '#/components/schemas/AccountMoney'
        trafficBytes:
          type: integer
          format: int64
          nullable: true
        deviceSlots:
          type: integer
          nullable: true
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
    AccountMoney:
      type: object
      required:
        - amountMinor
        - currency
      properties:
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

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