---
title: "Update Subscription"
method: PATCH
path: "/subscriptions/{id}"
---

# Update Subscription

`PATCH /subscriptions/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string — The subscription plan name (MAX 255; MIN 3).
  - `description` string — The subscription plan description (MAX 255; MIN 3).
  - `account_id` string — The unique identifier of the account that will have the subscription plan available to use (MAX 64 ; MIN 36).
  - `merchant_reference` string — Identification of the subscription plan (MAX 255; MIN 3).
  - `soft_descriptor` string — Statement descriptor shown on the cardholder's bank statement. Updating it changes the descriptor applied to subsequent rebills generated by the subscription engine. Length and formatting limits vary by provider (for example, Unlimit truncates to 22 characters and Airwallex to 30). Worldpay does not read this field; it builds the statement narrative from `payment_description` instead.
  - `country` string — The subscription's country.
  - `amount` object — Specifies the `amount` object, with the value of each subscription payment and the used currency.
    - `currency` string, required — The currency used to make the payment (MAX 3; MIN 3; [ISO 4217](/reference/country-reference)).
    - `value` number, float, required — The value of each payment of the subscription (multiple of 0.0001).
  - `frequency` object — Specifies the `frequency` object. Defines the billing frequency for the subscription. Including type and value.
    - `type` 'DAY' | 'WEEK' | 'MONTH', required — The type of interval the subscription will have in time (DAY, WEEK, MONTH). If not set, always MONTH by default.
    - `value` integer — The value between each interval the subscription will have in time. The system will use the default value of 1 if not set.
    - `monthly_billing_day` integer — The day of the month when billing is processed. (MAX 31; MIN 1)
  - `billing_cycles` object — Specifies the `billing_cycles` object. Defines the number of charges associated to the subscription.
    - `total` integer — The total number of billing cycles for the subscription.
  - `customer_payer` object — Specifies the `customer_payer` object to identify the customer.
    - `id` string, required — The unique identifier of the customer (MAX 255; MIN 3).
  - `payment_method` object — Specifies the `payment_method` object. Currently, only card as available as payment methods. You can use the card `token`, the `vaulted_token` or the card information using through the card object.
    - `type` 'CARD' — Payment method type.
    - `vaulted_token` string — The vaulted token (MAX: 64; MIN: 36).
    - `card` object — Specifies the card object.
      - `verify` boolean — Using `amount` = 0 and `verify` = true, you can verify the user´s card without authorizing a real amount.
      - `card_data` object — Specifies the card data object.
        - `number` string — Card’s number without any separators. (MAX 19; MIN 8) - only available for PCI certified merchants.
        - `expiration_month` integer — Card’s expiration month - MM (MAX 2; MIN 2) - only available for PCI certified merchants
        - `expiration_year` integer — Card’s expiration year in the YYYY format (MAX 4; MIN 4) - only available for PCI certified merchants
        - `security_code` integer — Card’s security code (MAX 4; MIN 3) - only available for PCI certified merchants.
        - `holder_name` string — Cardholder’s full name as it appears on the card (MAX 26; MIN 3) - only available for PCI certified merchants
      - `store_credentials` object — Specifies the credential usage for the card.
        - `usage` 'FIRST' | 'USED' — Indicates whether this is the first or a subsequent use. Required if a CIT payment was created before the subscription.
    - string
  - `availability` object — Specifies the `availability` object. Defines a date interval based on starting and ending dates when the subscription is available to use.
    - `start_at` string, date-time — The start date that the subscription plan will be available to use. If not set, the subscription is available from the moment it is created.
    - `finish_at` string, date-time — The end date until the subscription plan will be available to use. If not defined, the subscription does not have an expiration date.
  - `retries` object — Specified the 'retries' object. If we need to retry declined transactions in Yuno and the amount if necessary. If modified, the retries will apply to the next payment intent.
    - `retry_on_decline` boolean — If we should retry a payment or not after a first decline. False by default.
    - `amount` integer — The number of retries that the subscription plan will have to completion. If not set, or higher than 7, 7 will be defined as default. Max: 7
  - `metadata` object — Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    - `key` string — Object title that represents the key-value pair inside the metadata (MAX 48 ; MIN 1).
    - `value` string — Object value for the key defined (MAX 512 ; MIN 1).

## Response `200`

200

- object
  - `id` string
  - `name` string
  - `account_id` string
  - `country` string
  - `description` string
  - `merchant_reference` string
  - `soft_descriptor` string
  - `status` string
  - `amount` object
    - `currency` string
    - `value` integer
  - `frequency` object
    - `type` string
    - `value` integer
  - `billing_cycles` object
    - `total` integer
    - `current` integer
    - `next_at` string
  - `customer_payer` object
    - `id` string
  - `payment_method` object
    - `type` string
    - `vaulted_token` string
  - `availability` object
    - `start_at` string
    - `finish_at` unknown
  - `metadata` unknown
  - `created_at` string
  - `updated_at` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/y/apis/ai-caller.md) · [All operations](https://skmtc.net/y/apis/ai-caller/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/y/ai-caller/revisions/05b629819b49/schema)
