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

# Archive an add-on

> Hide a credit pack from future purchases while retaining purchase history.

Archives the active credit pack with this stable `id` and returns `{ "archived": true }`. It disappears from [List active add-ons](https://docs.integrateledger.com/api-reference/add-ons/list.md) and cannot start new Checkouts. Existing paid purchases and credit grants remain in customer history.

An already opened Checkout can still complete against its captured price and credit amount. An unknown or already archived ID returns `404 not_found`. Creating an add-on with the same ID later reactivates that pack. See [Catalog](https://docs.integrateledger.com/catalog.md) for the full lifecycle.


## OpenAPI

````yaml openapi.json DELETE /v1/add-ons/{id}
openapi: 3.1.0
info:
  title: Ledger API
  version: 0.1.0
servers:
  - url: https://api.integrateledger.com
    description: Hosted Ledger API
security: []
paths:
  /v1/add-ons/{id}:
    delete:
      tags:
        - Add-ons
      summary: Archive an add-on
      operationId: archiveAddOn
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: ^[a-zA-Z0-9_-]+$
          required: true
          name: id
          in: path
      responses:
        '200':
          description: AddOn archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOnArchived'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Invalid Ledger API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl --request DELETE
            'https://api.integrateledger.com/v1/add-ons/extra_credits' \
              -H "Authorization: Bearer $LEDGER_API_KEY"
        - lang: python
          label: Python SDK (source only)
          source: |-
            import os
            from ledger_sdk import Ledger

            ledger = Ledger(api_key=os.environ["LEDGER_API_KEY"])
            ledger.archive_add_on("extra_credits")
        - lang: typescript
          label: TypeScript SDK (source only)
          source: >-
            import { Ledger } from "@ledger/sdk";


            const ledger = new Ledger({ apiKey: process.env.LEDGER_API_KEY ?? ""
            });

            await ledger.archiveAddOn({ id: "extra_credits" });
components:
  schemas:
    AddOnArchived:
      type: object
      properties:
        archived:
          type: boolean
      required:
        - archived
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````

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