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

# Archive Merchant Account

> Archive a merchant account, migrating memberships, locations, and any charges that
still have an outstanding balance to a target merchant account, and de-registering
any attached POS devices. Settled charges and deposits stay attached to the archived
merchant so historical money flow stays auditable.



## OpenAPI

````yaml put /billing/merchant_accounts/{merchant_account_id}/archive
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/merchant_accounts/{merchant_account_id}/archive:
    put:
      tags:
        - Merchant Accounts
      summary: Archive Merchant Account
      description: >-
        Archive a merchant account, migrating memberships, locations, and any
        charges that

        still have an outstanding balance to a target merchant account, and
        de-registering

        any attached POS devices. Settled charges and deposits stay attached to
        the archived

        merchant so historical money flow stays auditable.
      operationId: >-
        archive_merchant_account_billing_merchant_accounts__merchant_account_id__archive_put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: merchant_account_id
          in: path
          required: true
          schema:
            type: string
            title: Merchant Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantAccountArchiveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: >-
                  Response Archive Merchant Account Billing Merchant Accounts 
                  Merchant Account Id  Archive Put
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MerchantAccountArchiveRequest:
      properties:
        targetMerchantAccountId:
          type: string
          title: Targetmerchantaccountid
          description: Merchant account to receive the migrated memberships and locations
        confirmPosDeviceUnregister:
          type: boolean
          title: Confirmposdeviceunregister
          description: >-
            Explicit confirmation that attached POS devices will be
            de-registered with Rainforest
          default: false
      type: object
      required:
        - targetMerchantAccountId
      title: MerchantAccountArchiveRequest
      description: Request body for archiving a merchant account.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````