{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-update-billing-card-request-schema.json",
  "title": "UpdateBillingCardRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-customer-vault-api-openapi.yml#/components/schemas/UpdateBillingCardRequest",
  "required": [
    "card_id"
  ],
  "type": "object",
  "properties": {
    "card_id": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>The card ID of the payment method you want to update."
    },
    "exp_date": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 4 N, MMYY format<br><strong>Description: </strong>Expiration date of cardholder’s card number.  Use this field to update the card’s expiration date."
    },
    "cvv2": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 4 N<br><strong>Description: </strong>CVV2 or CID value from the signature panel on the back of the cardholder's card. If present during a request where the verify flag is set to `true`, this value is sent to the issuer for validation. This field will not be stored in Vault. "
    },
    "billing_first_name": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Billing first name."
    },
    "billing_last_name": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Billing last name."
    },
    "billing_firm_name": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Business name on the billing card, if applicable. "
    },
    "billing_email": {
      "type": "array",
      "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>An array of billing email addresses.",
      "items": {
        "type": "string"
      }
    },
    "billing_addr1": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing street address. This address will also be used for AVS verification if AVS verification is enabled. "
    },
    "billing_addr2": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing address line 2."
    },
    "billing_city": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Billing city."
    },
    "billing_state": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Billing state."
    },
    "billing_zip": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Billing zip code. This zip code will also be used for AVS verification if AVS verification is enabled."
    },
    "billing_zip4": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 4 N<br><strong>Description: </strong>Billing zip+4 code, if applicable."
    },
    "billing_country": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing country."
    },
    "billing_country_code": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>ISO numeric country code for the billing address. Refer to <a href=\"/docs/references\" target=\"_blank\">Country Codes</a> for a list of country codes."
    },
    "verify": {
      "type": "boolean",
      "description": "<strong>Description: </strong>Set this field to `true` if a `card_number` or `card_id` should be verified by the issuer before adding to Customer Vault. When this field is set to `true`, the payment method is updated in Customer Vault regardless of whether verification succeeds.<br><strong>Default: </strong>false"
    },
    "primary": {
      "type": "boolean",
      "description": "<strong>Description: </strong>Set this field to `true` if this should be the primary payment method.<br><strong>Default: </strong>false"
    },
    "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"
    }
  }
}