---
title: "Modify a subscription"
method: POST
path: "/v1/subscriptions/{id}"
---

# Modify a subscription

`POST /v1/subscriptions/{id}`

Update an existing subscription

## Path parameters

- `id` string, required

## Headers

- `x-user-secret-key` string, required
- `Content-Type` string, required

## Request body

- object
  - `amount` string — The amount of the subscription payment
  - `status` string — The subscription status to modify to
  - `schedule` object — The subscription values to be modified.
    - `interval` string, required — Subscription assessment interval. Available values: 'day', 'week', 'month', 'year'
    - `frequency` string, required — Subscription Assessment frequency, 1 by default (i.e. “3” = “Every 3 weeks”)
    - `start_date` string, required — Start date, ISO 8601 format (yyyy-mm-ddThh:mm:ss.sssZ) or short type of date (yyyy-mm-dd) or specify time offsets from UTC (yyyy-mm-ddThh:mm:ss+hh:mm)
    - `end_date` string, required — End date, ISO 8601 format (yyyy-mm-ddThh:mm:ss.sssZ) or short type of date (yyyy-mm-dd) or specify time offsets from UTC (yyyy-mm-ddThh:mm:ss+hh:mm)
    - `end_amount_after` number, float — Total amount of all successful transactions (equals or exceeds)
    - `end_amount_before` number, float — Total amount of all successful transactions (not to exceed)
    - `end_amount_total` number, float — Total amount to be paid with subscription (equals).
    - `end_transactions` integer — Total count of all successful transactions
  - `retry` object — The retry definitions to be modified.
    - `limit` string — maximum amount of retried payments
    - `frequency` string — amount of hours/days between retried payments
    - `interval` string — hours/days
    - `failed_status` string — a parameter allowing a subscription to be set to particular status upon maximum retries (active, held, failed, deleted) etc.
  - `description` string
  - `reference` string — A unique reference provided for the subscription

## Response `200`

200

- object
  - `status` integer
  - `error` unknown
  - `resource` object
    - `type` string
    - `data` object
      - `_id` string
      - `created_at` string
      - `updated_at` string
      - `user_id` string
      - `company_id` string
      - `amount` integer
      - `description` string
      - `reference` string
      - `status` string
      - `latest_charge_id` string
      - `payment_source_id` string
      - `held_at` string
      - `last_change_by` string
      - `retry` unknown
      - `archived` boolean
      - `_source_ip_address` string
      - `customer` object
        - `customer_id` string
        - `first_name` string
        - `last_name` string
        - `email` string
        - `reference` string
      - `statistics` object
        - `total_collected_amount` integer
        - `successful_transactions` integer
      - `schedule` object
        - `interval` string
        - `start_date` string
        - `end_amount_after` integer
        - `end_amount_before` integer
        - `end_amount_total` integer
        - `next_assessment` string
        - `next_assessment_planned` string
        - `first_assessment` string
        - `status` string
        - `processing_pended_at` string
        - `last_assessment_planned` string
        - `last_assessment` string
        - `locked` boolean
        - `completed_count` integer
        - `held_count` integer
        - `retry_count` integer
        - `frequency` integer
      - `currency` string
      - `gateway_type` string
      - `gateway_name` string
      - `gateway_mode` string

## Other responses

- `400` — 400

---

[API](https://skmtc.dev/commbank/apis/powerboard-api.md) · [All operations](https://skmtc.dev/commbank/apis/powerboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/commbank/powerboard-api/revisions/2ef3ed32f8c2/schema)
