{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Credit card token funding instrument",
    "description": "PayPal credit card token funding instrument json schema",
    "type": "object",
    "properties": {
        "credit_card_id": {
            "description": "ID of credit card previously stored using /vault/credit-card",
            "type": "string"
        },
        "payer_id": {
            "description": "A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.",
            "type": "string"
        },
        "last4": {
            "description": "Last four digits of the stored credit card number. Value generated by PayPal.",
            "type": "string"
        },
        "type": {
            "description": "Credit card type. Valid types are: visa, mastercard, discover, amex. Values are presented in lowercase and not should not be used for display. Value generated by PayPal.",
            "type": "string",
            "enum": [
                "visa",
                "mastercard",
                "discover",
                "amex"
            ]
        },
        "expire_year": {
            "description": "4-digit expiration year. Value generated by PayPal.",
            "type": "number",
            "pattern": "^([\\d]{4})$"
        },
        "expire_month": {
            "description": "Expiration month with no leading zero. Acceptable values are 1 through 12. Value generated by PayPal.",
            "type": "number",
            "minimum": 0,
            "maximum": 12
        }
    },
    "required": [
        "id",
        "payment_method",
        "type",
        "expire_month",
        "expire_year"
    ]
}