> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argyle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DDS Configurations

> Learn about direct deposit switching (DDS) configurations.

Argyle Link initiates a direct deposit update when a DDS configuration is provided that has been encrypted to a payDistributionConfig. DDS configurations contain bank account and debit card details that determine which DDS screens are shown to users, and what pay allocations are suggested.

Refer to the [structuring DDS configurations](/legacy/guides/argyle-link/flows/direct-deposit-switching#structure-dds-configuration) section of our direct deposit switching guide for more information.

<Note>
  `bank_account`, `card`, and `card_source` objects are validated when they are passed to the `/pay-distribution-configs/encrypt` endpoint. Learn more encryption validation [below](/legacy/api-reference/dds-configurations#encrypt-—).
</Note>

## The DDS configuration object

<Note>
  * Allocation related properties define the amount or percentage of money that is allocated to a bank account. Allocation fields do not apply to cards. Visit our [direct deposit switching guide](/legacy/guides/argyle-link/flows/direct-deposit-switching) for which pay allocations to use for your use case.
  * At least one `bank_account` or `card` / `card_source` object must be specified in your DDS configuration.
  * At least one of `percent_allocation` or `amount_allocation` object is required for [partial paycheck](/legacy/guides/argyle-link/flows/direct-deposit-switching#add-a-bank-account) `bank_account` DDS configurations.
  * Refer to add a bank and debit account in our direct deposit switching guide before including both `bank_account` and `card` in a single DDS configuration.
</Note>

### Attributes

* `default_allocation_type *DEPRECATED` (string, required)
* `bank_account` (object, optional): The object that contains bank account information for a pay allocation.
* `bank_name` (string, optional): Bank name that will be displayed alongside an obfuscated account number in Argyle Link. This is used for labeling purposes and does not need to perfectly match the actual bank name.
* `routing_number` (string, optional): 9-digit code that is based on the bank location where the user's account was opened.
* `account_number` (string, optional): 8 to 17-digit code that identifies the user as the account holder in the bank. The allocation will be sent to this account.
* `card_number` (string, required): 8 to 19-digit payout card number as displayed on the card.
* `cardholder_title` (string, optional): Title of the person to which the card has been issued. This should be entered exactly as displayed on the card.
* `cardholder_first_name` (string, optional): Forename of the person to which the card has been issued.
* `cardholder_last_name` (string, optional): Surname of the person to which the card has been issued.
* `expiration_year` (integer ≥ 2000, required): Expiration year as specified on the card.
* `expiration_month` (integer between 1 and 12, required): Expiration month as specified on the card.
* `card_cvc_cvv` (string, required): 3 or 4-digit security code found on the back of the card.
* `address_line1` (string, optional): Address line 1—for example, street, PO Box, or company name.
* `address_line2` (string, optional): Address line 2—for example, apartment, suite, unit, or building.
* `state` (string, optional): State, county, province, or region.
* `city` (string, optional): City, district, suburb, town, or village.
* `postal_code` (string, optional): Postal code of the address associated with the card.
* `details` (object, optional): The object that contains all required information used in authentication and data retrieval between Argyle's API and the third-party financial service provider.

Refer to DDS flows in our [direct deposit switching guide](/legacy/guides/argyle-link/flows/direct-deposit-switching) for a full list of example DDS configuration objects and their associated use cases.

```json theme={}

{
"bank_account": {
"bank_name": "YellowHorizon",
"routing_number": "084101234",
"account_number": "9483746361234",
"account_type": "checking"
},
"entire_allocation": true,
"allow_editing": false
},
null,
2

```

```json theme={}

{
"card": {
"card_number": "4253177385403456",
"cardholder_title": "Mr",
"cardholder_first_name": "John",
"cardholder_last_name": "Doe",
"card_name": "Master Visa",
"expiration_year": 2030,
"expiration_month": 10,
"card_cvc_cvv": "900",
"address_line1": "759 Victoria Plaza",
"address_line2": "Unit 12",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90210",
"country": "US"
}
},
null,
2

```

```json theme={}

{
"card_source": {
"partner": "unit",
"card_name": "My Unit payout card",
"details": {
"id": "ymp000f9",
"org_id": "lj93cqt2"
}
}
},
null,
2

```

```json theme={}

{
"bank_account": {
"bank_name": "YellowHorizon",
"routing_number": "084101234",
"account_number": "9483746361234",
"account_type": "checking"
},
"entire_allocation": true,
"allow_editing": false,
"card": {
"card_number": "4253177385403456",
"cardholder_title": "Mr",
"cardholder_first_name": "John",
"cardholder_last_name": "Doe",
"card_name": "Master Visa",
"expiration_year": 2030,
"expiration_month": 10,
"card_cvc_cvv": "900",
"address_line1": "759 Victoria Plaza",
"address_line2": "Unit 12",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90210",
"country": "US"
}
},
null,
2

```

<RefSubLayout.Divider />

## Encrypt to payDistributionConfig

**POST** `/v1/pay-distribution-configs/encrypt`

Encrypt a DDS configuration to a `payDistributionConfig`.

* To start the direct deposit update process in Link you must initialize it with the `payDistributionConfig` parameter set to the encrypted string returned as `encrypted_config` after encrypting your DDS configuration.
* The encryption is necessary to ensure bank account and card details are never exposed on the front-end. Full routing, account, and card numbers always appear encrypted on the end user's device.
* To encrypt your DDS configuration make a POST request to `/pay-distribution-configs/encrypt` with your DDS configuration in the payload.

<Accordion title="Learn more about validation of DDS configurations:">
  When encryption is performed, types and values in the `card` and `bank_account` objects are validated. This validation ensures that:

  * Each field is of the correct type.
  * Required fields are specified.
  * `account_number`, `routing_number` , `card_number`, and `card_cvc_cvv` fields contain only numbers and are the correct length.
  * The card expiration date is valid.
  * If either the first or last name card fields are specified, then the other field is as well.
  * If the cardholder title field is specified, the first and last name card fields are as well.
  * The DDS configuration is self-consistent. This means that:
  * At least one destination is set.
  * If `bank_account` is set, the validation ensures that either amount or percent allocation is set, or `entire_allocation` is `true`.
  * If `entire_allocation` is `true`, the validation ensures that neither amount or percent allocation is set.
  * Amount and percent allocations are self-consistent:
  * `value`, `min_value`, `max_value` are valid decimal numbers.
  * 0 ≤ `min_value` ≤ `value` ≤ `max_value` for amount allocations.
  * 0 ≤ `min_value` ≤ `value` ≤ `max_value` ≤ 100 for percent allocations.

      <Note>
        When a card\_source object is defined in your DDS configuration, the Argyle API validates it before encryption. This validation ensures that:

        * If the `card_source` object is defined, then `bank_account` or `card` objects cannot be present in the DDS configuration.
        * The value of the partner attribute must be `unit`. Accepted values can potentially change when more partners are integrated in the future.
      </Note>
</Accordion>

### Request body

* `—` (object, required): DDS configuration (pre-encryption).

<Tabs>
  <Tab title="curl">
    ```bash theme={}
    curl --request POST \\
    --url https://api.argyle.com/v1/pay-distribution-configs/encrypt \\
    --header 'accept: application/json' \\
    --header 'content-type: application/json' \\
    --data '{
    "bank_account": {
        "bank_name": "YellowHorizon",
        "routing_number": "084101234",
        "account_number": "9483746361234",
        "account_type": "checking"
    },
    "amount_allocation": {
        "value": "177",
        "min_value": "177",
        "max_value": "177"
    }
    }'
    ```
  </Tab>

  <Tab title="python">
    ```python theme={}
    import requests
    url = "https://api.argyle.com/v1/pay-distribution-configs/encrypt"
    payload = {
    "bank_account": {
    "bank_name": "YellowHorizon",
    "routing_number": "084101234",
    "account_number": "9483746361234",
    "account_type": "checking"
    },
    "amount_allocation": {
    "value": "177",
    "min_value": "177",
    "max_value": "177"
    }
    }
    headers = {
    "accept": "application/json",
    "content-type": "application/json"
    }
    response = requests.post(url, json=payload, headers=headers)
    ```
  </Tab>
</Tabs>

```json theme={}

{
  "encrypted_config": "CiQAB/5leT7O7tuqZTNRlvgzuORNFdZu0tYaImtc7v5uTy5vBc0S4AQAL2UHl11enTB971I0t8Tx0U729+vnVIIX8splHDJijiiDEtcScd3W8b52FmFpg/IL3eHs7umRmd6JO8mvORDhBGQqF+x0XrZhzaZC4qB+ZiEs2rztEYGLMPgoYKegh7oKauNc9ZDf43l/KFDCYlYgW2Zd7LbB4M+PN39E8+GgMqHYTOKgpXFMYVBAniV8r58eu2PI9FV8sZ0JXRlOX2YTXAkEFC3XeX174olNQU4Eu1xlu+EPf61yCF1/UBvetVB7rSXMW/IcFrYkZCFVw+1YlDtGgk7uksStCB6ePuyWeu0/erjOitZidL5FwCx90OS0AEoMDqsXVQq+nyB+rCe2IAX9YFEL/xiWCB5gGXxzE+Y814WinVKq3YsSzsaMOhpKOpLfFuOb8YhQDzsq+OTlMx6W6RjOPSaqk29yQYWTDOaH37/iOABqnM8YWwbdz434KbuH02vo9gpS5Ny4MEyYTk5Uy0l8Z9rCce+/hUIRjqGNPQgim+kNwBp204V3tGX96fI/3JLwTeTUcmk4JrSK3G/LfDWQrxz+UYvxKO3BV56I6lvJcXMPrAlDGTzlxHOO9jUhSpBun0mU/gdbUXr9wunufZrb/Zc+4th+YCeVoBuwJ/TReBP8+fCfo0WQGXCX3wKGB5kl+PaoxRmTSrj24iSJLRCFTCygEeyW3/IFNK6/lCbYCLitJgLeOlz+oh+//1IDIrwj7f0h61ZQ15UdHqXBua0dJ/INxUjlUKyfmG8tMY5fCJaLLQkfhe/E0StQ8JdzYTbq2YGQIBfDuWCJpRbXYHQ40L7mQGXPDF+ocA=="
},
null,
2

```
