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

# Simulations 2.0 — Direct Deposits

> Marqeta's Simulations API allows you to simulate API calls and review responses.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

The Marqeta platform provides you with a production environment and a sandbox. The main difference between the production and sandbox environments is that your production environment communicates with a payment card network. This communication allows your program’s cards to pay for goods and services by initiating live transactions over the card network.

There are two types of sandbox environments available:

* **Public sandbox:** A single-user environment where you can begin building your program and experiment with the Marqeta platform.

* **Private sandbox:** A multi-user environment where you can integrate your application with the Marqeta platform.

All funds and transactions are simulated in both types of sandbox environments.

Unlike the production environment, a sandbox does not communicate with a card network, so the cards you create within them cannot be used to conduct real-world transactions. Therefore, you must rely on simulated transactions in order to test all objects you create within a sandbox. The sandbox environments provide a set of endpoints that let you simulate various types of card network transactions, such as authorizations, reversals, and balance inquiries. These endpoints are available only within the sandbox, so the details on this page do not apply to production.

To use the Simulations API for direct deposits:

* Create a card in your sandbox environment.

* Use the `/simulations/directdeposits/*` endpoints to simulate transaction event types. Each endpoint is its own event type.

* Use the `/webhooks` endpoint to send optional customer notifications for system events.

To use the Simulations API for card transactions, see [Simulations 2.0 — Card Transactions](/core-api/simulations-card-transactions/).

<Note>
  **Note**\
  You can use [Postman](https://www.postman.com) to run requests for [card transaction](/core-api/simulations-card-transactions/) and [direct deposit](/core-api/simulations-direct-deposits/) simulations endpoints. This collection of requests has been saved as a YAML file for your convenience. To access the YAML file, see [Postman Collection for Simulations 2.0](/core-api/postman-collection-simulations/).
</Note>

All direct deposit simulations endpoints share the same request/response model, as described below.

<span id="SimulationRequestBody" />

<h2 id="simulation_request_body">
  Request body
</h2>

| Fields                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| account\_number<br /><br />string<br /><br />Required                    | The account number of the user to debit or credit.<br /><br />**Allowable Values:**<br /><br />Valid account number belonging to an active user with an active card                                                                                                                                                                                                                                         |
| amount<br /><br />decimal<br /><br />Required                            | Amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00<br /><br />Must be greater than zero                                                                                                                                                                                                                                                                                    |
| company\_discretionary\_data<br /><br />string<br /><br />Optional       | Company-specific data provided by the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />20 char max                                                                                                                                                                                                                                                                                    |
| company\_entry\_description<br /><br />string<br /><br />Optional        | Company-specific data provided by the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />10 char max                                                                                                                                                                                                                                                                                    |
| company\_identification<br /><br />string<br /><br />Optional            | Alphanumeric code that identifies the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />10 char max                                                                                                                                                                                                                                                                                    |
| company\_name<br /><br />string<br /><br />Optional                      | Name of the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />16 char max                                                                                                                                                                                                                                                                                                              |
| earlyPayEligible<br /><br />boolean<br /><br />Optional                  | Indicates whether the transaction is eligible for early pay.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                    |
| individual\_identification\_number<br /><br />string<br /><br />Optional | Accounting number by which the recipient is known to the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />22 char max                                                                                                                                                                                                                                                                 |
| individual\_name<br /><br />string<br /><br />Optional                   | Identity of the direct deposit recipient.<br /><br />**Allowable Values:**<br /><br />35 char max                                                                                                                                                                                                                                                                                                           |
| settlement\_date<br /><br />datetime<br /><br />Required                 | Date when the credit or debit is applied.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-mm-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                          |
| standard\_entry\_class\_code<br /><br />string<br /><br />Optional       | Three-letter code identifying the type of entry.<br /><br />**Allowable Values:**<br /><br />3 char max                                                                                                                                                                                                                                                                                                     |
| token<br /><br />string<br /><br />Optional                              | Unique identifier of the direct deposit transaction.<br /><br />If you do not include a token, the system generates one automatically. This token is used in other API calls. Marqeta recommends that you enter a string that you can remember for the token, rather than having the system generate a token for you. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />36 char max |
| type<br /><br />string<br /><br />Optional                               | Provides information about whether funds are being debited from or credited to the account.<br /><br />**Allowable Values:**<br /><br />`CREDIT`, `DEBIT`                                                                                                                                                                                                                                                   |

<span id="SimulationResponseBody" />

<h2 id="simulation_response_body">
  Response body
</h2>

| Fields                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type<br /><br />string<br /><br />Optional                               | Whether funds are being debited from or credited to the account.<br /><br />**Allowable Values:**<br /><br />`CREDIT`, `DEBIT`                                                                                                                                                                                                                                                                     |
| state<br /><br />string<br /><br />Optional                              | Current status of the direct deposit record.<br /><br />**Allowable Values:**<br /><br />`PENDING`, `APPLIED`, `REVERSED`, `REJECTED`                                                                                                                                                                                                                                                              |
| state\_reason<br /><br />string<br /><br />Optional                      | Explains the current state of the direct deposit record.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                  |
| state\_reason\_code<br /><br />string<br /><br />Optional                | A standard code describing the reason for the current state.<br /><br />**Allowable Values:**<br /><br />Valid three-character code                                                                                                                                                                                                                                                                |
| token<br /><br />string<br /><br />Optional                              | Unique identifier of the direct deposit record.<br /><br />**Allowable Values:**<br /><br />Existing direct deposit record token                                                                                                                                                                                                                                                                   |
| user\_token<br /><br />string<br /><br />Optional                        | Unique identifier of the user associated with the direct deposit record.<br /><br />**Allowable Values:**<br /><br />Existing user token                                                                                                                                                                                                                                                           |
| amount<br /><br />decimal<br /><br />Optional                            | Amount being debited or credited.<br /><br />**Allowable Values:**<br /><br />Existing amount in 0.00 decimal format                                                                                                                                                                                                                                                                               |
| business\_token<br /><br />string<br /><br />Optional                    | Unique identifier of the business associated with the direct deposit record.<br /><br />**Allowable Values:**<br /><br />Existing business token                                                                                                                                                                                                                                                   |
| company\_discretionary\_data<br /><br />string<br /><br />Optional       | Company-specific data provided by the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />20 char max                                                                                                                                                                                                                                                                           |
| company\_entry\_description<br /><br />string<br /><br />Optional        | Description of the purpose of the direct deposit.<br /><br />**Allowable Values:**<br /><br />10 char max                                                                                                                                                                                                                                                                                          |
| company\_identification<br /><br />string<br /><br />Optional            | Alphanumeric code that identifies the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />10 char max                                                                                                                                                                                                                                                                           |
| company\_name<br /><br />string<br /><br />Optional                      | Name of the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />16 char max                                                                                                                                                                                                                                                                                                     |
| created\_time<br /><br />datetime<br /><br />Optional                    | Date and time when the deposit account was created, in UTC.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-MM-dd’T’HH:mm:ssZ                                                                                                                                                                                                                                                             |
| direct\_deposit\_account\_token<br /><br />string<br /><br />Optional    | Unique identifier of the affected deposit account.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                                                                                                                                         |
| individual\_identification\_number<br /><br />string<br /><br />Optional | Accounting number by which the recipient is known to the direct deposit originator.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                       |
| individual\_name<br /><br />string<br /><br />Optional                   | Name of the direct deposit recipient.<br /><br />**Allowable Values:**<br /><br />22 char max                                                                                                                                                                                                                                                                                                      |
| last\_modified\_time<br /><br />datetime<br /><br />Optional             | Date and time when the direct deposit account was last modified, in UTC.<br /><br />**Allowable Values:**<br /><br />date-time<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                    |
| settlement\_date<br /><br />datetime<br /><br />Optional                 | Date and time when the credit or debit is applied, in UTC.<br /><br />**Allowable Values:**<br /><br />date-time<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                  |
| standard\_entry\_class\_code<br /><br />string<br /><br />Optional       | Three-letter code identifying the type of entry.<br /><br />**Allowable Values:**<br /><br />- `ACK`<br />- `ADV`<br />- `ARC`<br />- `ATX`<br />- `BOC`<br />- `CCD`<br />- `CIE`<br />- `COR`<br />- `CTX`<br />- `DNE`<br />- `ENR`<br />- `IAT`<br />- `MTE`<br />- `POP`<br />- `POS`<br />- `PPD`<br />- `RCK`<br />- `SHR`<br />- `TEL`<br />- `TRC`<br />- `TRX`<br />- `WEB`<br />- `XCK` |

<h2 id="direct_deposits_credit_event">
  Simulate credit
</h2>

**Action:** `POST`\
**Endpoint:** `/simulations/directdeposits/credit`

Use this endpoint to simulate crediting funds to a deposit account.

Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be credited. You can find the account number in the `account_number` field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a `GET` request to the `/depositaccounts/user/{user_token}` endpoint. For more information, see [Direct Deposit](/core-api/direct-deposits/).

You can view the full request body structure on the [Simulations 2.0 — Direct Deposits](/core-api/simulations-direct-deposits/#simulation_request_body) page.

<h3 id="_request_body">
  Request body
</h3>

See [Request Body](/core-api/simulations-direct-deposits/#simulation_request_body).

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": 10,
  "account_number": "**ACCOUNT_NUMBER**",
  "settlement_date": "2025-02-03T13:22:42Z",
  "earlyPayEligible": false
}
```

<h3 id="_response_body">
  Response body
</h3>

See [Response Body](/core-api/simulations-direct-deposits/#simulation_response_body).

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "**DIRECT_DEPOSIT_TOKEN**",
  "user_token": "**USER_TOKEN**",
  "type": "CREDIT",
  "state": "PENDING",
  "state_reason": "testing",
  "amount": 10,
  "created_time": "2025-03-23T19:34:05Z",
  "direct_deposit_account_token": "**DIRECT_DEPOSIT_ACCT_TOKEN**",
  "last_modified_time": "2025-03-23T19:34:05Z",
  "settlement_date": "2025-02-03T13:22:42Z"
}
```

<h2 id="direct_deposits_debit_event">
  Simulate debit
</h2>

**Action:** `POST`\
**Endpoint:** `/simulations/directdeposits/debit`

Use this endpoint to simulate debiting funds from a deposit account.

Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be debited. You can find the account number in the `account_number` field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a `GET` request to the `/depositaccounts/user/{user_token}` endpoint. For more information, see [Direct Deposit](/core-api/direct-deposits/).

You can view the full request body structure on the [Simulations 2.0 — Direct Deposits](/core-api/simulations-direct-deposits/#simulation_request_body) page.

<h3 id="_request_body_2">
  Request body
</h3>

See [Request Body](/core-api/simulations-direct-deposits/#simulation_request_body).

<h3 id="_sample_request_body_2">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "amount": 10,
  "account_number": "**ACCOUNT_NUMBER**",
  "settlement_date": "2025-02-03T13:22:42Z",
  "earlyPayEligible": false
}
```

<h3 id="_response_body_2">
  Response body
</h3>

See [Response Body](/core-api/simulations-direct-deposits/#simulation_response_body).

<h3 id="_sample_response_body_2">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "**DIRECT_DEPOSIT_TOKEN**",
  "user_token": "**USER_TOKEN**",
  "type": "DEBIT",
  "state": "PENDING",
  "state_reason": "testing",
  "amount": 10,
  "created_time": "2025-03-23T19:34:05Z",
  "direct_deposit_account_token": "**DIRECT_DEPOSIT_ACCT_TOKEN**",
  "last_modified_time": "2025-03-23T19:34:05Z",
  "settlement_date": "2025-02-03T13:22:42Z"
}
```


## Related topics

- [Direct Deposit](/docs/diva-api/direct-deposit.md)
- [Postman Collection for Simulations 2.0](/docs/core-api/postman-collection-simulations.md)
- [2023 Release Notes](/docs/developer-guides/release-notes-2023.md)
- [ACH Receiving](/docs/core-api/ach-receiving.md)
- [Simulations 2.0 — Card Transactions](/docs/core-api/simulations-card-transactions.md)
