# The account cards model

Source: https://developers.swell.is/backend-api/account-cards/the-account-card-model

## Fields

- `id` (objectId, auto): The unique identifier for the card.
- `parent_id` (objectId, required): The ID of the parent account.
- `token` (string, required): Link to the associated payment token.
- `active` (boolean): Indicated whether this card is active and available for use. Default: `true`.
- `address_check` (string): Indicates results of the address check for the card: `unchecked`, `pass`, or `fail`. Possible values: `unchecked`, `pass`, `fail`.
- `billing` (object): The customer's billing details. Defaults to `account.billing`. Updating billing will also update the corresponding account billing object.
  - `name` (string): Billing full name. If `first_name` or `last_name` are updated, then `name` will be automatically updated as a combination of first/last.
  - `email` (string): Customer's email address.
  - `company` (string): Customer's company, if applicable.
  - `first_name` (string): Billing first name. If `name` is updated, then `first_name` will be automatically updated as the first word of the name.
  - `last_name` (string): Billing last name. If `name` is updated, then `last_name` will be automatically updated as the last word of the name.
  - `phone` (string): Billing phone number.
  - `address1` (string): Billing address line 1: street address/PO box/company name.
  - `address2` (string): Billing address line 2: apartment/suite/unit/building.
  - `city` (string): Billing city/district/suburb/town/village.
  - `state` (string): Billing state/county/province/region.
  - `zip` (string): Billing zip/postal code.
  - `country` (string): Two-letter [ISO country code](https://www.iso.org/iso-3166-country-codes.html).
  - `vat_number` (string): VAT number for tax purposes, if applicable.
- `brand` (string): Name of card issuer. E.g., `"visa"`.
- `display_brand` (string): Brand of the card displayed to the customer, if different from the underlying brand (for example, co-branded cards).
- `cvc_check` (string): Indicates results of the CVC check for the card: `unchecked`, `pass`, or `fail`. Possible values: `unchecked`, `pass`, `fail`.
- `date_created` (date, auto): The date the card entry was created.
- `date_updated` (date, auto): Date the card entry was last updated.
- `exp_month` (int): The expiration month on the card, `1` through `12`.
- `exp_year` (int): Four-digit card expiration year.
- `fingerprint` (string): A hashed fingerprint generated using `client_id`, `brand`, and `last4`.
- `gateway` (string): Name of the payment gateway.
- `last4` (string): The last four digits of the card number.
- `parent` (Account): Link to the parent account.
- `test` (boolean): Indicated the card is for testing purposes.
- `zip_check` (string): Indicates results of the zip check for the card: `unchecked`, `pass`, or `fail`. Possible values: `unchecked`, `pass`, `fail`.

## Example response

```json
{
  "parent_id": "627308bc32db26001276f091",
  "billing": {
    "name": "Glarthir",
    "first_name": "Glarthir",
    "last_name": null,
    "address1": "Glarthir's House",
    "address2": null,
    "city": "Skingrad",
    "state": "CA",
    "zip": "95051",
    "country": "US",
    "phone": null,
    "company": null
    },
  "brand": "Visa",
  "last4": "4242",
  "exp_month": 2,
  "exp_year": 2024,
  "token": "card_mgLMIJrqdFKjapNnKQXzbGSg",
  "address_check": "pass",
  "zip_check": "pass",
  "cvc_check": "pass",
  "fingerprint": "011778e5080632a4701cb5628266007d",
  "date_created": "2022-05-19T17:17:31.167Z",
  "active": true,
  "id": "62867bab67e544001a6a3218"
},
```
