# SDK Credit Card Field Model

This model represents all the required data for customizing the text for the SDK's credit card form field.

{% hint style="info" %}

```json
{
  "cardNumber": {
    "label": "Card Number",
    "placeholder": "Credit Card",
    "hint": "Digits",
    "defaultHint": "Full Card Number",
    "errors": {
      "required": "Card Number is Mandatory",
      "cardTypeLength": {
        "minLengthStart": "Must be Over",
        "minLengthEnd": "Digits",
        "maxLengthStart": "Must be Under",
        "maxLengthEnd": "Digits",
        "lengthsStart": "Must be:",
        "lengthsSplit": "or",
        "lengthsEnd": "Digits"
      }
    }
  },
  "expiration": {
    "label": "Expiration",
    "placeholder": "Month / Year",
    "hint": "MM/YY",
    "errors": {
      "required": "Expiration Date is Mandatory",
      "cardExpiration": {
        "invalidDateFormat": "Date Invalid, Should Be MM/YY",
        "monthRange": "Month Should Be Between 1 - 12",
        "yearExpiration": "The Year You've Set Expired",
        "monthExpiration": "The Month You've Set Expired This Year"
      }
    }
  },
  "securityCode": {
    "label": "CVV",
    "placeholder": "CVV/CVC",
    "hint": {
      "amex": "digits, front of the card",
      "default": "digits, back of the card"
    },
    "defaultHint": "Security Code",
    "errors": {
      "required": "CVC is Mandatory",
      "securityCodeLength": {
        "lengthShouldBe": "must be",
        "digits": "digits"
      }
    }
  },
  "socialID": {
    "label": "Document ID",
    "placeholder": "Document ID",
    "hint": "Document ID",
    "errors": {
      "required": "Document ID is Mandatory",
      "minlength": "5 Digits Minimum",
      "maxlength": "20 Digits Maximum"
    }
  },
  "zipCode": {
    "label": "Zip Code",
    "placeholder": "Zip Code",
    "hint": "address associated to your card",
    "errors": {
      "required": "Zip Code is Mandatory",
      "minlength": "0 Digits Minimum",
      "maxlength": "9 Digits Maximum"
    }
  },
  "email": {
    "label": "Email",
    "placeholder": "John@domain.com",
    "hint": "Email",
    "errors": {
      "required": "Email is Mandatory",
      "minlength": "5 Characters Minimum",
      "maxlength": "50 Characters Maximum"
    }
  },
  "mobilePhone": {
    "label": "Mobile Phone",
    "placeholder": "000-000-0000",
    "hint": "Mobile Phone",
    "errors": {
      "required": "Mobile Phone is Mandatory",
      "minlength": "6 Digits Minimum",
      "maxlength": "15 Digits Maximum"
    }
  },
  "installments": "Installments",
  "fullName": {
    "label": "Full Name",
    "placeholder": "Full Name",
    "hint": "First & Last names",
    "errors": {
      "required": "Full Name is Mandatory",
      "pattern": "Full Name must ONLY be letters",
      "minlength": "4 Characters Minimum",
      "maxlength": "50 Characters Maximum"
    }
  },
  "saveCard": {
    "label": "Save this card"
  }
}
```

{% endhint %}

Description of the parameters required for various payment options configurations.

<table><thead><tr><th width="224.9871382636656">field</th><th width="146.1631843673507">type</th><th width="384.2">description</th></tr></thead><tbody><tr><td>label</td><td>string</td><td>label of the field</td></tr><tr><td>placeholder</td><td>string</td><td>placeholder while the field is empty</td></tr><tr><td>hint</td><td>string | object</td><td>hint for the field's use</td></tr><tr><td>defaultHint</td><td>string</td><td>hint to default before user interaction</td></tr><tr><td>errors</td><td>object</td><td>mapping the display-keys of various errors</td></tr><tr><td>errors.required</td><td>string</td><td>required field error message</td></tr><tr><td>errors.minlength</td><td>string</td><td>minimum character length error message</td></tr><tr><td>errors.maxlength</td><td>string</td><td>maximum character length error message</td></tr></tbody></table>

Field specific parameters.

<table><thead><tr><th width="230.9871382636656">field</th><th width="146.1631843673507">type</th><th width="384.2">description</th></tr></thead><tbody><tr><td>securityCode.hint.amex</td><td>string</td><td>hint for Amex's 4 digits once the credit card field detects an amex-type-card</td></tr><tr><td>securityCode.hint.default</td><td>string</td><td>hint for every card's 3 digits, that is not detected as Amex</td></tr><tr><td>cardNumber.errors.cardTypeLength</td><td>object</td><td><p>specific object keys to build an error message to clarify the credit card's length:</p><pre class="language-json"><code class="lang-json">"minLengthStart": "Must be Over",
"minLengthEnd": "Digits",
"maxLengthStart": "Must be Under",
"maxLengthEnd": "Digits",
"lengthsStart": "Must be:",
"lengthsSplit": "or",
"lengthsEnd": "Digits"
</code></pre></td></tr><tr><td>expiration.errors.cardExpiration</td><td>object</td><td><pre class="language-json"><code class="lang-json">"invalidDateFormat": "Date Invalid, Should Be MM/YY",
"monthRange": "Month Should Be Between 1 - 12",
"yearExpiration": "The Year You've Set Expired",
"monthExpiration": "The Month You've Set Expired This Year"
</code></pre></td></tr><tr><td>securityCode.errors.securityCodeLength</td><td>object</td><td><pre class="language-json"><code class="lang-json">"lengthShouldBe": "must be",
"digits": "digits"
</code></pre></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/models/sdk-credit-card-field-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
