# Update product

This method updates the existing product with specified details and returns the updated product information.


  Recurring products can only be updated when all associated subscriptions are in expired status. Products without subscriptions can be updated without restrictions.

Endpoint: PATCH /products/{product_id}
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"

## Request fields (application/json):

  - `body` (object) — one of:
    - Product-based payment:
      - `name` (string)
        Product name.
        Example: "Luxury product"
      - `description` (string)
        Product description.
        Example: "This product is the best product all over the world"
      - `public_description` (string)
        Product description for customers.


  Highly recommended to provide as it is sent to banks, shown in customer bank statements, and included in Solidgate email receipts, helping customers identify who charged them and for what.


  To remove the existing public description, send null.
        Example: "That cool product which you have bought"
      - `status` (string)
        Product status.
        Enum: "disabled", "active"
      - `payment_action` (string)
        Payment processing flow applied to the transaction.
        Enum: "auth_settle"
      - `settle_interval` (integer)
        Delay before automatic transaction settlement in hours.


  Highly recommended to check validation for PSP limits.
        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,null)
        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
  


  To remove all existing metadata, send null.
        Example: {"access_duration":"30d","plan_tier":"premium"}
    - Subscription payment:
      - `name` (string)
        Product name.
        Example: "Luxury product"
      - `description` (string)
        Product description.
        Example: "This product is the best product all over the world"
      - `public_description` (string)
        Product description for customers.


  Highly recommended to provide as it is sent to banks, shown in customer bank statements, and included in Solidgate email receipts, helping customers identify who charged them and for what.


  To remove the existing public description, send null.
        Example: "That cool product which you have bought"
      - `status` (string)
        Product status.


  Cannot be changed if a subscription exists for the product.
        Enum: same as `status` in "Product-based payment" (2 values)
      - `term_length` (integer)
        Maximum number of billing cycles before subscription expiration and automatic cancellation with error code 8.08.


  Cannot be changed if a subscription exists for the product.
        Example: 20
      - `payment_action` (string)
        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.


  
    If the product has a trial, this field does not affect the first payments but influences recurring ones processed with auth_settle.
    If there is no trial, this field defines the interval for the first auth_settle payment.
        Example: 48
      - `billing_period` (object)
        Billing period in time units, with a maximum value equivalent to 2 years.


  Cannot be changed if a subscription exists for the product.
      - `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.


  Maximum value must not exceed 730 days, 104 weeks, 24 months, or 2 years.
        Example: 10
      - `trial` (object)
        Trial period settings, applicable for products offering free or paid trials.


  Once the product subscription is active, trial settings can be modified, but the trial itself cannot be added or removed.
      - `trial.billing_period` (object, required)
        Trial billing period in time units, with a maximum value equivalent to 2 years.
      - `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.


  Maximum value must not exceed 730 days, 104 weeks, 24 months, or 2 years.
        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.


  Required if trial payment_action auth_settle and must not be used for other payment_action types.
        Example: 48
      - `retry_mode` (string)
        Retry mode to recover the failed subscription payments.
        Enum: "smart", "static"
      - `retry_strategy_id` (string)
        Unique retry strategy identifier.


  Pass it for the static retry mode.
        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,null)
        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
  


  To remove all existing metadata, send null.
        Example: {"access_duration":"30d","plan_tier":"premium"}

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Product-based payment:
      - `id` (string, required)
        Unique product identifier.


  Product used for one-time purchases, such as upsells or single-use services.
        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.


  Cannot be changed if a subscription exists for the product.
        Enum: same as `status` in "Product-based payment" (2 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"
      - `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.


  
    If the product has a trial, this field does not affect the first payments but influences recurring ones processed with auth_settle.
    If there is no trial, this field defines the interval for the first auth_settle payment.
        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: 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"}
    - Subscription payment:
      - `id` (string, required)
        Unique product identifier.


  Product used for recurring purchases, such as services with ongoing access or a subscription-based model.
        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.


  Cannot be changed if a subscription exists for the product.
        Enum: same as `status` in "Product-based payment" (2 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.


  Cannot be changed if a subscription exists for the product.
        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.


  
    If the product has a trial, this field does not affect the first payments but influences recurring ones processed with auth_settle.
    If there is no trial, this field defines the interval for the first auth_settle payment.
        Example: 48
      - `billing_period` (object, required)
        Billing period in time units.
      - `billing_period.unit` (string, required)
        Unit of the billing period.
        Enum: same as `billing_period.unit` in "Subscription payment" (4 values)
      - `billing_period.value` (integer, required)
        Value of the billing period as an integer.
        Example: 10
      - `trial` (object)
        Trial settings. 


  Required if the trial type is free or paid. Must not be sent if the type is absent.
  Once the product subscription is active, trial settings can be modified, but the trial itself cannot be added or removed.
      - `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: same as `trial.payment_action` in "Subscription payment" (3 values)
      - `trial.settle_interval` (integer)
        Delay before automatic transaction settlement in hours used in the auth_settle payment flow.


  Required if trial payment_action auth_settle and must not be used for other payment_action types.
        Example: 48
      - `retry_mode` (string)
        Retry mode to recover the failed subscription payments.
        Enum: same as `retry_mode` in "Subscription payment" (2 values)
      - `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"


