# Create an Account object

Create an account object to store a person's bank or card information as a destination for funds.

Endpoint: POST /rest/accounts
Version: 3.0.0-beta.117
Security: oauth_user_token

## Header parameters:

  - `DailyPay-API-Version` (integer)
    The version of the DailyPay API to use for this request. If not provided, the latest version of the API will be used.

## Request fields (application/vnd.api+json):

  - `data` (object, required)

  - `data.type` (string, required)
    The type of the resource. Always accounts.
    Example: "accounts"

  - `data.attributes` (any, required) — one of:
    - Card:
      - `name` (string, required)
        Display name for this account.
        Example: "Debit Card"
      - `account_type` (string, required)
        The type of account. It differentiates between depository accounts (e.g. bank account), cards (e.g. debit) and earnings balance type of accounts (e.g. on demand pay).
      - `subtype` (string, required)
        The subtype of the account. Additional subtypes may be added over time
        Enum: "DEBIT", "DAILYPAY"
      - `details` (object, required)
        The banking details of the account and account holder.
      - `details.token` (string, required)
        A tokenized string replacement for the card data.
        Example: "HX46TY794RG"
      - `details.first_name` (string, required)
        The first name of the account holder.
        Example: "Edith"
      - `details.last_name` (string, required)
        The last name of the account holder.
        Example: "Clarke"
      - `details.expiration_month` (string, required)
        The month of the expiration date for the card.
        Example: "02"
      - `details.expiration_year` (string, required)
        The year of the expiration date for the card.
        Example: "2025"
      - `details.address_line_one` (string, required)
        The first line of the address for the card.
        Example: "123 Kebly Street"
      - `details.address_line_two` (string)
        The second line of the address for the card.
        Example: "Apt #12"
      - `details.address_city` (string, required)
        The city of the address for the card.
        Example: "Fort Lee"
      - `details.address_state` (string, required)
        The two-letter abbreviation of the state in the address for the card.
        Example: "NJ"
      - `details.address_zip_code` (string, required)
        The zip code of the address for the card.
        Example: "72374"
      - `details.address_country` (string, required)
        The country code of the address for the card.
        Example: "US"
      - `details.issuer` (string, required)
        The issuer of the card.
        Example: "411600"
    - Depository:
      - `name` (string, required)
        Display name for this account.
        Example: "Checking Account"
      - `account_type` (string, required)
        The type of account. It differentiates between depository accounts (e.g. bank account), cards (e.g. debit) and earnings balance type of accounts (e.g. on demand pay).
      - `subtype` (string, required)
        The subtype of the account.
        Enum: "SAVINGS", "CHECKING"
      - `details` (object, required)
        The banking details of the account and account holder.
      - `details.first_name` (string, required)
        The first name of the account holder.
        Example: "Edith"
      - `details.last_name` (string, required)
        The last name of the account holder.
        Example: "Clarke"
      - `details.routing_number` (string, required)
        The routing number of the bank that holds this account. Responses from this API that return this number are masked to the last four digits.
        Example: "XXXXX2021"
      - `details.account_number` (string, required)
        The account number. Responses from this API that return this number are masked to the last four digits.
        Example: "XXXXXX4321"

  - `data.relationships` (object, required)

  - `data.relationships.person` (object, required)

  - `data.relationships.person.data` (object, required)

  - `data.relationships.person.data.type` (string, required)
    Example: "people"

  - `data.relationships.person.data.id` (string, required)
    Example: "3fa8f641-5717-4562-b3fc-2c963f66afa6"

## Response 200 fields (application/vnd.api+json):

  - `data` (object, required)

  - `data.id` (string, required)
    The unique identifier of the Account.
    Example: "2bc7d781-3247-46f6-b60f-4090d214936a"

  - `data.type` (string, required)
    The type of the resource. Always accounts.
    Example: "accounts"

  - `data.attributes` (any, required) — one of:
    - Card:
      - `verification_status` (string, required)
        A code that indicates the status of an account that is a destination for funds.
        Enum: "VERIFICATION_PENDING", "VERIFICATION_FAILED", "VERIFIED"
      - `balances` (object, required)
      - `balances.available` (integer,null, required)
        The amount of funds available to be withdrawn from the account. 

For earnings_balance-type accounts, the available balance typically
equals the current balance less any pending outflows, plus any pending inflows,


This value is in units of the lowest denomination in the associated
currency. For example, { amount: 7250, currency: 'USD' } resolves to
$72.50.
        Example: 12000
      - `balances.current` (integer,null, required)
        The total amount of funds settled in the account. 
This value is in units of the lowest denomination in the associated currency. For example, { amount: 7250, currency: 'USD' } resolves to $72.50.
Special note for Earnings Balance accounts:
If a user transfers money from an Earnings Balance account to a personal account, the current balance may be negative as those transfers settle. When a paycheck is processed, DailyPay will automatically attempt to zero out the balance,  transferring any remaining funds to the direct_deposit_default_depository account set for the associated Job.
If DailyPay is unable to zero out the balance during paycheck processing, the current balance will remain negative,  which may impact a user's ability to transfer additional funds from their earnings balance. 
In those cases, the available balance will be 0.
        Example: 50000
      - `balances.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
        Example: "USD"
      - `capabilities` (object, required)
      - `capabilities.transfer_destination` (array, required)
        List of the timing and associate fees available when crediting this account as a
transfer destination.

Actual fees may differ at the time of transfer; please refer to 
the transfer preview attribute for the most accurate fee information 
for any given transfer.
        Example: [{"schedule":"WITHIN_THIRTY_MINUTES","fee":300,"currency":"USD"},{"schedule":"NEXT_BUSINESS_DAY","fee":0,"currency":"USD"}]
      - `capabilities.transfer_destination.schedule` (string, required)
        The expected time for the transfer to be completed.
        Enum: "WITHIN_THIRTY_MINUTES", "NEXT_BUSINESS_DAY"
      - `capabilities.transfer_destination.fee` (integer, required)
        A monetary quantity expressed in units of the lowest denomination in
the associated currency. For example, { amount: 299, currency: 'USD'
} resolves to $2.99.

If a transfer incurs a fee, the fee will be deducted from the amount of
the transfer.
      - `capabilities.transfer_destination.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
      - `name` (string, required)
        Display name for this account.
        Example: "Debit Card"
      - `account_type` (string, required)
        The type of account. It differentiates between depository accounts (e.g. bank account), cards (e.g. debit) and earnings balance type of accounts (e.g. on demand pay).
      - `subtype` (string, required)
        The subtype of the account. Additional subtypes may be added over time
        Enum: same as `subtype` in "Card" (2 values)
      - `details` (object, required)
        The banking details of the account and account holder.
      - `details.last_four` (string, required)
        Last four digits of the card number.
        Example: "0003"
      - `details.issuer` (string, required)
        The issuer of the card.
        Example: "411600"
      - `details.first_name` (string, required)
        The first name of the account holder.
        Example: "Edith"
      - `details.last_name` (string, required)
        The last name of the account holder.
        Example: "Clarke"
      - `details.expiration_month` (string, required)
        The month of the expiration date for the card.
        Example: "02"
      - `details.expiration_year` (string, required)
        The year of the expiration date for the card.
        Example: "2025"
    - Earnings Balance (read only):
      - `verification_status` (string, required)
        A code that indicates the status of an account that is a destination for funds.
        Enum: same as `verification_status` in "Card" (3 values)
      - `balances` (object, required)
      - `balances.available` (integer,null, required)
        The amount of funds available to be withdrawn from the account. 

For earnings_balance-type accounts, the available balance typically
equals the current balance less any pending outflows, plus any pending inflows,


This value is in units of the lowest denomination in the associated
currency. For example, { amount: 7250, currency: 'USD' } resolves to
$72.50.
        Example: 12000
      - `balances.current` (integer,null, required)
        The total amount of funds settled in the account. 
This value is in units of the lowest denomination in the associated currency. For example, { amount: 7250, currency: 'USD' } resolves to $72.50.
Special note for Earnings Balance accounts:
If a user transfers money from an Earnings Balance account to a personal account, the current balance may be negative as those transfers settle. When a paycheck is processed, DailyPay will automatically attempt to zero out the balance,  transferring any remaining funds to the direct_deposit_default_depository account set for the associated Job.
If DailyPay is unable to zero out the balance during paycheck processing, the current balance will remain negative,  which may impact a user's ability to transfer additional funds from their earnings balance. 
In those cases, the available balance will be 0.
        Example: 50000
      - `balances.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
        Example: "USD"
      - `capabilities` (object, required)
      - `capabilities.transfer_destination` (array, required)
        List of the timing and associate fees available when crediting this account as a
transfer destination.

Actual fees may differ at the time of transfer; please refer to 
the transfer preview attribute for the most accurate fee information 
for any given transfer.
        Example: [{"schedule":"WITHIN_THIRTY_MINUTES","fee":300,"currency":"USD"},{"schedule":"NEXT_BUSINESS_DAY","fee":0,"currency":"USD"}]
      - `capabilities.transfer_destination.schedule` (string, required)
        The expected time for the transfer to be completed.
        Enum: same as `capabilities.transfer_destination.schedule` in "Card" (2 values)
      - `capabilities.transfer_destination.fee` (integer, required)
        A monetary quantity expressed in units of the lowest denomination in
the associated currency. For example, { amount: 299, currency: 'USD'
} resolves to $2.99.

If a transfer incurs a fee, the fee will be deducted from the amount of
the transfer.
      - `capabilities.transfer_destination.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
      - `name` (string, required)
        Display name for this account.
        Example: "DailyPay Pay Balance"
      - `account_type` (string, required)
        The type of account. It differentiates between depository accounts (e.g. bank account), cards (e.g. debit) and earnings balance type of accounts (e.g. on demand pay).
      - `subtype` (string, required)
        The subtype of the account.
      - `details` (object, required)
        An empty object for earnings balance accounts.
    - Depository:
      - `verification_status` (string, required)
        A code that indicates the status of an account that is a destination for funds.
        Enum: same as `verification_status` in "Card" (3 values)
      - `balances` (object, required)
      - `balances.available` (integer,null, required)
        The amount of funds available to be withdrawn from the account. 

For earnings_balance-type accounts, the available balance typically
equals the current balance less any pending outflows, plus any pending inflows,


This value is in units of the lowest denomination in the associated
currency. For example, { amount: 7250, currency: 'USD' } resolves to
$72.50.
        Example: 12000
      - `balances.current` (integer,null, required)
        The total amount of funds settled in the account. 
This value is in units of the lowest denomination in the associated currency. For example, { amount: 7250, currency: 'USD' } resolves to $72.50.
Special note for Earnings Balance accounts:
If a user transfers money from an Earnings Balance account to a personal account, the current balance may be negative as those transfers settle. When a paycheck is processed, DailyPay will automatically attempt to zero out the balance,  transferring any remaining funds to the direct_deposit_default_depository account set for the associated Job.
If DailyPay is unable to zero out the balance during paycheck processing, the current balance will remain negative,  which may impact a user's ability to transfer additional funds from their earnings balance. 
In those cases, the available balance will be 0.
        Example: 50000
      - `balances.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
        Example: "USD"
      - `capabilities` (object, required)
      - `capabilities.transfer_destination` (array, required)
        List of the timing and associate fees available when crediting this account as a
transfer destination.

Actual fees may differ at the time of transfer; please refer to 
the transfer preview attribute for the most accurate fee information 
for any given transfer.
        Example: [{"schedule":"WITHIN_THIRTY_MINUTES","fee":300,"currency":"USD"},{"schedule":"NEXT_BUSINESS_DAY","fee":0,"currency":"USD"}]
      - `capabilities.transfer_destination.schedule` (string, required)
        The expected time for the transfer to be completed.
        Enum: same as `capabilities.transfer_destination.schedule` in "Card" (2 values)
      - `capabilities.transfer_destination.fee` (integer, required)
        A monetary quantity expressed in units of the lowest denomination in
the associated currency. For example, { amount: 299, currency: 'USD'
} resolves to $2.99.

If a transfer incurs a fee, the fee will be deducted from the amount of
the transfer.
      - `capabilities.transfer_destination.currency` (string, required)
        A three-letter ISO 4217 currency code. For example, USD for US Dollars, EUR for Euros, or JPY for Japanese Yen.
      - `name` (string, required)
        Display name for this account.
        Example: "Checking Account"
      - `account_type` (string, required)
        The type of account. It differentiates between depository accounts (e.g. bank account), cards (e.g. debit) and earnings balance type of accounts (e.g. on demand pay).
      - `subtype` (string, required)
        The subtype of the account.
        Enum: same as `subtype` in "Depository" (2 values)
      - `details` (object, required)
        The banking details of the account and account holder.
      - `details.first_name` (string, required)
        The first name of the account holder.
        Example: "Edith"
      - `details.last_name` (string, required)
        The last name of the account holder.
        Example: "Clarke"
      - `details.routing_number` (string, required)
        The routing number of the bank that holds this account. Responses from this API that return this number are masked to the last four digits.
        Example: "XXXXX2021"
      - `details.account_number` (string, required)
        The account number. Responses from this API that return this number are masked to the last four digits.
        Example: "XXXXXX4321"

  - `data.links` (object, required)

  - `data.links.self` (string, required)
    The URI for the account

  - `data.relationships` (object, required)

## Response 400 fields (application/vnd.api+json):

  - `errors` (array, required)
    A list of errors that occurred.

  - `errors.code` (string, required)
    A code that indicates what went wrong. Please consider this an open enum, where new codes may be added over time.

  - `errors.status` (string, required)
    The HTTP status code for the error.
    Example: "400"

  - `errors.detail` (string, required)
    A message that explains the meaning of the error code. Developers are advised not to make programmatic use of this value, as it may change
    Example: "The request failed because it was not in the correct format or did not contain valid data."

  - `errors.links` (object, required)
    A list of links to resources that may be helpful in resolving the error.

  - `errors.links.about` (string)
    Example: "https://developer.dailypay.com/tag/Errors"

  - `errors.source` (object)
    Location in the request that may have caused the error.

  - `errors.source.parameter` (string)
    The name of the parameter that caused the error.
    Example: "filter[first_name]"

  - `errors.source.pointer` (string)
    A JSON Pointer to the location in the request that caused the error.
    Example: "/data/attributes/first_name"

  - `errors.source.header` (string)
    The name of the header that caused the error.
    Example: "Accept"

  - `errors.meta` (object, required)
    Additional information about the error.

  - `errors.meta.request_id` (string)
    A UUID for the originating request.
    Example: "3c526bf4-f3c0-4c4a-a4cb-95f7db8b3bbe"

  - `errors.meta.trace_id` (string)
    An ID used for tracing purposes.
    Example: "4016616108459136584"

## Response 401 fields (application/vnd.api+json):

  - `errors` (array, required)
    A list of errors that occurred.

  - `errors.status` (string, required)
    The HTTP status code for the error.
    Example: "400"

  - `errors.detail` (string, required)
    A message that explains the meaning of the error code. Developers are advised not to make programmatic use of this value, as it may change
    Example: "The request failed because it was not in the correct format or did not contain valid data."

  - `errors.links` (object, required)
    A list of links to resources that may be helpful in resolving the error.

  - `errors.links.about` (string)
    Example: "https://developer.dailypay.com/tag/Errors"

  - `errors.source` (object)
    Location in the request that may have caused the error.

  - `errors.source.parameter` (string)
    The name of the parameter that caused the error.
    Example: "filter[first_name]"

  - `errors.source.pointer` (string)
    A JSON Pointer to the location in the request that caused the error.
    Example: "/data/attributes/first_name"

  - `errors.source.header` (string)
    The name of the header that caused the error.
    Example: "Accept"

  - `errors.meta` (object, required)
    Additional information about the error.

  - `errors.meta.request_id` (string)
    A UUID for the originating request.
    Example: "3c526bf4-f3c0-4c4a-a4cb-95f7db8b3bbe"

  - `errors.meta.trace_id` (string)
    An ID used for tracing purposes.
    Example: "4016616108459136584"

  - `errors.code` (string, required)
    A code that indicates what went wrong.
    Enum: "INVALID_TOKEN", "UNAUTHORIZED"

## Response 403 fields (application/vnd.api+json):

  - `errors` (array, required)
    A list of errors that occurred.

  - `errors.status` (string, required)
    The HTTP status code for the error.
    Example: "400"

  - `errors.detail` (string, required)
    A message that explains the meaning of the error code. Developers are advised not to make programmatic use of this value, as it may change
    Example: "The request failed because it was not in the correct format or did not contain valid data."

  - `errors.links` (object, required)
    A list of links to resources that may be helpful in resolving the error.

  - `errors.links.about` (string)
    Example: "https://developer.dailypay.com/tag/Errors"

  - `errors.source` (object)
    Location in the request that may have caused the error.

  - `errors.source.parameter` (string)
    The name of the parameter that caused the error.
    Example: "filter[first_name]"

  - `errors.source.pointer` (string)
    A JSON Pointer to the location in the request that caused the error.
    Example: "/data/attributes/first_name"

  - `errors.source.header` (string)
    The name of the header that caused the error.
    Example: "Accept"

  - `errors.meta` (object, required)
    Additional information about the error.

  - `errors.meta.request_id` (string)
    A UUID for the originating request.
    Example: "3c526bf4-f3c0-4c4a-a4cb-95f7db8b3bbe"

  - `errors.meta.trace_id` (string)
    An ID used for tracing purposes.
    Example: "4016616108459136584"

  - `errors.code` (string, required)
    A code that indicates what went wrong.
    Enum: "FORBIDDEN"

## Response 500 fields (application/vnd.api+json):

  - `errors` (array, required)
    A list of errors that occurred.

  - `errors.status` (string, required)
    The HTTP status code for the error.
    Example: "400"

  - `errors.detail` (string, required)
    A message that explains the meaning of the error code. Developers are advised not to make programmatic use of this value, as it may change
    Example: "The request failed because it was not in the correct format or did not contain valid data."

  - `errors.links` (object, required)
    A list of links to resources that may be helpful in resolving the error.

  - `errors.links.about` (string)
    Example: "https://developer.dailypay.com/tag/Errors"

  - `errors.source` (object)
    Location in the request that may have caused the error.

  - `errors.source.parameter` (string)
    The name of the parameter that caused the error.
    Example: "filter[first_name]"

  - `errors.source.pointer` (string)
    A JSON Pointer to the location in the request that caused the error.
    Example: "/data/attributes/first_name"

  - `errors.source.header` (string)
    The name of the header that caused the error.
    Example: "Accept"

  - `errors.meta` (object, required)
    Additional information about the error.

  - `errors.meta.request_id` (string)
    A UUID for the originating request.
    Example: "3c526bf4-f3c0-4c4a-a4cb-95f7db8b3bbe"

  - `errors.meta.trace_id` (string)
    An ID used for tracing purposes.
    Example: "4016616108459136584"

  - `errors.code` (string, required)
    A code that indicates what went wrong.
    Enum: "UNEXPECTED_ERROR"


