{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-update-subscription-request-schema.json",
  "title": "UpdateSubscriptionRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-recurring-billing-api-openapi.yml#/components/schemas/UpdateSubscriptionRequest",
  "type": "object",
  "properties": {
    "amt_tran": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The subscription billing amount. To update the amount for all upcoming billing cycles (the `recur_amt`), send `amt_tran` without `date_next`. To update the amount for only one billing cycle, send all of the following:<ul><li>`date_next`,</li><li>`payment_flag` set to `Next`, and</li><li>`amt_tran`.</li></ul>",
      "format": "double"
    },
    "date_next": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 10, YYYY-MM-DD format<br><strong>Description: </strong>The next billing date for this subscription.<br><strong>Conditional Requirement: </strong>`payment_flag` is required when sending `date_next`."
    },
    "date_start": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 10, YYYY-MM-DD format<br><strong>Description: </strong>The date the subscription will start."
    },
    "card_id": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>Update the card ID to be used for recurring charges. The card ID can be updated any time on an active subscription. Send an empty string in this field to udpate the record to charge by the customer's primary form of payment. "
    },
    "payment_flag": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, 3 to 4 A<br><strong>Description: </strong> Determines whether `date_next` changes only the upcoming billing date or all future billing dates. Possible values:<ul> <li>`Next` - The `date_next` value only changes one future billing date (the next billing date).</li> <li>`All` - The `date_next` value changes the next billing date, and all future billing dates are updated in line with the (new) next billing date.</li></ul> <p><strong>Conditional Requirement: </strong>`payment_flag` is required when sending `date_next`.</p>"
    },
    "plan_desc": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, AN<br><strong>Description: </strong>A short description of the subscription."
    },
    "profile_id": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 20 N<br><strong>Description: </strong>The Payment Gateway profile ID to be used when billing transactions. The new profile should use the same currency as the original. "
    },
    "merchant_id": {
      "type": "integer",
      "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>Identifies the merchant to whom this request applies. Optional field, applicable only if the request is sent on behalf of another merchant.<br><strong>Conditional Requirement: </strong>Required if this request is on behalf of another merchant.",
      "format": "int64"
    }
  }
}