{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-commerce-cloud/json-schema/sap-commerce-cloud-payment-details-schema.json",
  "title": "PaymentDetails",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-commerce-cloud-checkout-api-openapi.yml#/components/schemas/PaymentDetails",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Payment details identifier"
    },
    "accountHolderName": {
      "type": "string",
      "description": "Card holder name"
    },
    "cardNumber": {
      "type": "string",
      "description": "Masked card number"
    },
    "cardType": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Card type code"
        },
        "name": {
          "type": "string",
          "description": "Card type name"
        }
      }
    },
    "expiryMonth": {
      "type": "string",
      "description": "Card expiry month"
    },
    "expiryYear": {
      "type": "string",
      "description": "Card expiry year"
    },
    "billingAddress": {
      "$ref": "#/$defs/Address"
    },
    "defaultPayment": {
      "type": "boolean",
      "description": "Whether this is the default payment method"
    },
    "saved": {
      "type": "boolean",
      "description": "Whether the payment details are saved"
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Address identifier"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "titleCode": {
          "type": "string",
          "description": "Title code"
        },
        "line1": {
          "type": "string",
          "description": "Address line 1"
        },
        "line2": {
          "type": "string",
          "description": "Address line 2"
        },
        "town": {
          "type": "string",
          "description": "City or town"
        },
        "region": {
          "$ref": "#/$defs/Region"
        },
        "district": {
          "type": "string",
          "description": "District"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal or ZIP code"
        },
        "country": {
          "$ref": "#/$defs/Country"
        },
        "phone": {
          "type": "string",
          "description": "Phone number"
        },
        "email": {
          "type": "string",
          "description": "Email address"
        },
        "defaultAddress": {
          "type": "boolean",
          "description": "Whether this is the default address"
        }
      }
    },
    "Country": {
      "type": "object",
      "properties": {
        "isocode": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code"
        },
        "name": {
          "type": "string",
          "description": "Country name"
        }
      }
    },
    "Region": {
      "type": "object",
      "properties": {
        "isocode": {
          "type": "string",
          "description": "Region ISO code"
        },
        "name": {
          "type": "string",
          "description": "Region name"
        }
      }
    }
  }
}