Credit Card

Description

A credit card.

Properties

Property Description
billingPostalCode

The billing address postal code.

cardNumber

The card number (masked in responses).

cardType read-only

The type of credit card.

cvvCode write-only

The card CVV/CVC/CSC code.

expirationMonth

The card expiration month.

expirationYear

The card expiration year.

nameOnCard

The card-holder name.

type

The type of object represented.

OpenAPI Schema

The following schema is based on OpenAPI 3.0 and is provided in our downloadable OpenAPI document.

{
  "description": "A credit card.",
  "properties": {
    "billingPostalCode": {
      "description": "The billing address postal code.",
      "pattern": "^[A-Za-z0-9 -]{0,10}$",
      "type": "string"
    },
    "cardNumber": {
      "description": "The card number (masked in responses).",
      "type": "string"
    },
    "cardType": {
      "description": "The type of credit card.",
      "enum": [
        "amex",
        "discover",
        "mastercard",
        "visa"
      ],
      "readOnly": true,
      "type": "string"
    },
    "cvvCode": {
      "description": "The card CVV/CVC/CSC code.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "writeOnly": true
    },
    "expirationMonth": {
      "description": "The card expiration month.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ]
    },
    "expirationYear": {
      "description": "The card expiration year.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ]
    },
    "nameOnCard": {
      "description": "The card-holder name.",
      "type": "string"
    },
    "type": {
      "description": "The type of object represented.",
      "enum": [
        "credit-card"
      ],
      "type": "string"
    }
  },
  "required": [
    "type",
    "nameOnCard",
    "cardNumber",
    "cardType",
    "expirationMonth",
    "expirationYear",
    "cvvCode",
    "billingPostalCode"
  ],
  "title": "Credit Card",
  "type": "object"
}