# Update subscription by subscription id Endpoint: PATCH /subscription/{subscriptionId} Version: 1.2 Security: X-Api-Key ## Header parameters: - `X-Idempotency-Key` (string) The system supports the query deduplication mechanism. Any system-wide merchant's request after the first one with the same X-Idempotency-Key will return an error. For example, if you have retrying mechanism for payouts and you want to avoid double sending, you can put header with value payout_{your_payout_id} ## Path parameters: - `subscriptionId` (string, required) Example: "2E2CL5R3KC7K3" ## Request fields (application/json): - `is_rebill_enabled` (boolean, required) ## Response 200 fields (application/json): - `type` (string) Enum: "SUBSCRIPTION" - `data` (object) - `data.version` (number) - `data.initial_transaction_id` (string) - `data.subscription_id` (string) - `data.created_at` (string) UTC date time format - `data.subscription_status` (string) - `data.expires_at` (string) UTC date time format - `data.merchant_id` (string) - `data.merchant_product_id` (string) - `data.merchant_payment_id` (string) - `data.merchant_customer_id` (string) - `data.payment_method` (string) Enum: "CARD" - `data.currency_code` (string) - `data.amount` (string) - `data.transaction_currency_code` (string) - `data.transaction_amount` (string) - `data.transaction_fee_currency_code` (string) - `data.transaction_fee_amount` (string) - `data.transaction_tax_currency_code` (string) - `data.transaction_tax_amount` (string) - `data.transaction_tax_type` (string) - `data.transaction_tax_label` (string) - `data.transaction_tax_percentage` (string) - `data.is_trial` (boolean) - `data.charge_interval` (string) Enum: "DAY" - `data.charge_interval_value` (number) - `data.is_rebill_enabled` (boolean) - `data.trial_interval` (string) Enum: "DAY" - `data.trial_interval_value` (number) - `data.payment_id` (string) Example: "2JWZGTNKS67K2" - `data.product_id` (string) Example: "2JWZGTNKSG7K2" - `data.retry_at` (string) UTC date time format - `data.retry_count` (number) - `data.retry_total_count` (number) Total count of attempts to rebill - `data.shop_name` (string) Shop name from original payment - `data.shop_url` (string) Shop URL from original payment ## Response 400 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required) ## Response 401 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required) ## Response 500 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required)