# Archive product

By using this method, merchants can archive products.


  Note that the archived product cannot be restored or added to new subscriptions. Existing subscriptions with the archived product remain active until cancelled.

Endpoint: POST /products/{product_id}/archive
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "api_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

## Path parameters:

  - `product_id` (string, required)
    Unique product identifier.
    Example: "ac43b415-5522-4373-b026-a365462f9657"

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Product-based payment:
      - `id` (string, required)
        Unique product identifier.
        Example: "ac43b415-5522-4373-b026-a365462f9657"
      - `name` (string, required)
        Product name.
        Example: "Luxury product"
      - `type` (string, required)
        Specifies whether the product is a one-time purchase or a subscription product.
        Enum: "one-time"
      - `description` (string, required)
        Product description.
        Example: "This product is the best product all over the world"
      - `public_description` (string)
        Product description for customers.
        Example: "That cool product that you have bought"
      - `status` (string, required)
        Product status.
        Enum: "archived"
      - `created_at` (string, required)
        Datetime of the product creation.
        Example: "2025-05-31 12:53:12"
      - `updated_at` (string, required)
        Datetime of the product update.
        Example: "2025-05-31 12:53:13"
      - `payment_action` (string, required)
        Payment processing flow applied to the transaction.
        Enum: "auth_settle"
      - `settle_interval` (integer)
        Delay before automatic transaction settlement in hours.
        Example: 48
      - `tax` (object)
        Contains product tax details.
      - `tax.category_id` (string, required)
        Unique tax category identifier.
        Example: "taxc_01JJVD231C879QBHVTVCWJ1K2A"
      - `tax.behavior` (string)
        Defines how taxes are applied to product prices and shown to customers.


  included or excluded tax behavior takes priority over tax rules configured for locations.
        Enum: "location_preset", "included", "excluded"
      - `metadata` (object)
        Metadata for storing additional, structured information about the product, such as access duration, plan tier, or feature flags.


  Supports up to 50 key-value pairs:
  
    Keys can be up to 40 characters (letters, digits, hyphens, and underscores)
    Values can be up to 500 characters
        Example: {"access_duration":"30d","plan_tier":"premium"}
    - Subscription payment:
      - `id` (string, required)
        Unique product identifier.
        Example: "ac43b415-5522-4373-b026-a365462f9657"
      - `name` (string, required)
        Product name.
        Example: "Luxury product"
      - `type` (string, required)
        Specifies whether the product is a one-time purchase or a subscription product.
        Enum: "recurring"
      - `description` (string, required)
        Product description.
        Example: "This product is the best product all over the world"
      - `public_description` (string)
        Product description for customers.
        Example: "That cool product that you have bought"
      - `status` (string, required)
        Product status.
        Enum: same as `status` in "Product-based payment" (1 values)
      - `created_at` (string, required)
        Datetime of the product creation.
        Example: "2025-05-31 12:53:12"
      - `updated_at` (string, required)
        Datetime of the product update.
        Example: "2025-05-31 12:53:13"
      - `term_length` (integer)
        Maximum number of billing cycles before subscription expiration and automatic cancellation with error code 8.08.
        Example: 20
      - `payment_action` (string, required)
        Payment processing flow applied to the transaction.
        Enum: same as `payment_action` in "Product-based payment" (1 values)
      - `settle_interval` (integer)
        Delay before automatic transaction settlement in hours.
        Example: 48
      - `billing_period` (object, required)
        Billing period in time units.
      - `billing_period.unit` (string, required)
        Unit of the billing period.
        Enum: "day", "week", "month", "year"
      - `billing_period.value` (integer, required)
        Value of the billing period as an integer.
        Example: 10
      - `trial` (object)
        Trial settings.
      - `trial.billing_period` (object, required)
        Trial billing period in time units.
      - `trial.billing_period.unit` (string, required)
        Unit of the trial billing period.
        Enum: same as `billing_period.unit` in "Subscription payment" (4 values)
      - `trial.billing_period.value` (integer, required)
        Value of the trial billing period as an integer.
        Example: 10
      - `trial.payment_action` (string, required)
        Specifies a payment flow applied to the first transaction, with or without the next money return, for:
- free trial - the payment actions are auth_0_amount and auth_void, with the last indicating that the funds will be refunded to the customer
- paid trial - the payment action is auth_settle, indicating the funds will be deducted from the customer's account as payment for the trial period and transferred to the merchant's account
        Enum: "auth_0_amount", "auth_void", "auth_settle"
      - `trial.settle_interval` (integer)
        Delay before automatic transaction settlement in hours used in the auth_settle payment flow.
        Example: 48
      - `retry_mode` (string)
        Retry mode to recover the failed subscription payments.
        Enum: "smart", "static"
      - `retry_strategy_id` (string)
        Unique retry strategy identifier.
        Example: "db43b415-5522-4373-b026-a365462f9439"
      - `tax` (object)
        Contains product tax details.
      - `tax.category_id` (string, required)
        Unique tax category identifier.
        Example: "taxc_01JJVD231C879QBHVTVCWJ1K2A"
      - `tax.behavior` (string)
        Defines how taxes are applied to product prices and shown to customers.


  included or excluded tax behavior takes priority over tax rules configured for locations.
        Enum: same as `tax.behavior` in "Product-based payment" (3 values)
      - `metadata` (object)
        Metadata for storing additional, structured information about the product, such as access duration, plan tier, or feature flags.


  Supports up to 50 key-value pairs:
  
    Keys can be up to 40 characters (letters, digits, hyphens, and underscores)
    Values can be up to 500 characters
        Example: {"access_duration":"30d","plan_tier":"premium"}

## Response 400 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: "2.01"

  - `error.message` (string, required)
    Error message.
    Example: "Validation error"

  - `error.constraints` (object)
    Map of constraints.

## Response 401 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating the specific authorization failure.
    Example: "1.01"

  - `error.message` (string, required)
    Descriptive message providing more details about the authorization failure.
    Example: "Authorization failed"

## Response 403 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating that access to the service is denied.
    Example: "1.02"

  - `error.message` (string, required)
    Message informing that the service is not allowed for the account.
    Example: "Access denied"

## Response 404 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: "2.01"

  - `error.message` (string, required)
    Error message.
    Example: "{entityName} not found with id: {entityId}"

## Response 422 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating that while the request is well-formed, it cannot be processed due to conflicting or incorrect data.
    Example: "2.01"

  - `error.message` (string, required)
    Descriptive message providing more details about the processing failure.
    Example: "Unprocessable entity"


