Plaid Ledger 
=============

#### API reference for Plaid Ledger 

For how-to guidance, see the [Ledger documentation](https://plaid.com/docs/transfer/flow-of-funds/index.html.md) .

| Plaid Ledger |  |
| --- | --- |
| [/transfer/ledger/deposit](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerdeposit) | Deposit funds into a ledger balance held with Plaid |
| [/transfer/ledger/distribute](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerdistribute) | Move available balance between platform and its originator |
| [/transfer/ledger/get](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerget) | Retrieve information about the ledger balance held with Plaid |
| [/transfer/ledger/withdraw](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerwithdraw) | Withdraw funds from a ledger balance held with Plaid |
| [/transfer/ledger/event/list](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgereventlist) | Retrieve a list of ledger balance events |

\=\*=\*=\*=

#### /transfer/ledger/deposit 

#### Deposit funds into a Plaid Ledger balance 

Use the [/transfer/ledger/deposit](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerdeposit) endpoint to deposit funds into Plaid Ledger.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

string

Client ID of the customer that owns the Ledger balance. This is so Plaid knows which of your customers to payout or collect funds. Only applicable for [Platform customers](https://plaid.com/docs/transfer/application/index.html.md#originators-vs-platforms) . Do not include if you're paying out to yourself.

string

Specify which funding account to use. Customers can find a list of `funding_account_id`s in the Accounts page of the Plaid Dashboard, under the "Account ID" column. If this field is left blank, the funding account associated with the specified Ledger will be used. If an `originator_client_id` is specified, the `funding_account_id` must belong to the specified originator.

string

Specify which ledger balance to deposit to. Customers can find a list of `ledger_id`s in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance.

required, string

A positive amount of how much will be deposited into ledger (decimal string with two digits of precision e.g. "5.50").

string

The description of the deposit that will be passed to the receiving bank (up to 10 characters). Note that banks utilize this field differently, and may or may not show it on the bank statement.

Max length: `10`

required, string

A unique key provided by the client, per unique ledger deposit. Maximum of 50 characters.

The API supports idempotency for safely retrying the request without accidentally performing the same operation twice. For example, if a request to create a ledger deposit fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single deposit is created.

Max length: `50`

required, string

The ACH networks used for the funds flow.

For requests submitted as either `ach` or `same-day-ach` the cutoff for Same Day ACH is 3:00 PM Eastern Time and the cutoff for Standard ACH transfers is 8:30 PM Eastern Time. It is recommended to submit a request at least 15 minutes before the cutoff time in order to ensure that it will be processed before the cutoff. Any request that is indicated as `same-day-ach` and that misses the Same Day ACH cutoff, but is submitted in time for the Standard ACH cutoff, will be sent over Standard ACH rails and will not incur same-day charges.

Possible values: `ach`, `same-day-ach`

```node
const request: TransferLedgerDepositRequest = {
  amount: '12.34',
  network: 'ach',
  idempotency_key: 'test_deposit_abc',
  description: 'deposit',
};
try {
  const response = await client.transferLedgerDeposit(request);
  const sweep = response.data.sweep;
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/transfer/ledger/deposit \
 -H 'Content-Type: application/json' \
 -d '{
   "client_id": "${PLAID_CLIENT_ID}",
   "secret": "${PLAID_SECRET}",
   "amount": "12.34",
   "network": "ach",
   "idempotency_key": "test_deposit_abc",
   "description": "deposit"
 }'

```

```ruby
request = Plaid::TransferLedgerDepositRequest.new(
  {
   amount: "12.34",
   network: "ach",
   idempotency_key: "test_deposit_abc",
   description: "deposit",
  }
)
response = client.transfer_ledger_deposit(request)
sweep = response.sweep

```

```java
TransferLedgerDepositRequest request = new TransferLedgerDepositRequest()
  .amount("12.34")
  .network("ach")
  .idempotencyKey("test_deposit_abc")
  .description("deposit");
Response response = client()
  .transferLedgerDeposit(request)
  .execute();
Sweep sweep =
  response.body().getSweep();

```

```python
request = TransferLedgerDepositRequest(
    amount='12.34',
    network='ach',
    idempotency_key='test_deposit_abc',
    description='deposit',
)
response = client.transfer_ledger_deposit(request)
sweep = response['sweep']

```

```go
request := plaid.NewTransferLedgerDepositRequest(
  "12.34",
  "test_deposit_abc",
  "ach"
)
response, _, err := client.PlaidApi.TransferLedgerDeposit(ctx).TransferLedgerDepositRequest(*request).Execute()

```

#### Response fields 

object

Describes a sweep of funds to / from the sweep account.

A sweep is associated with many sweep events (events of type `swept` or `return_swept`) which can be retrieved by invoking the `/transfer/event/list` endpoint with the corresponding `sweep_id`.

`swept` events occur when the transfer amount is credited or debited from your sweep account, depending on the `type` of the transfer. `return_swept` events occur when a transfer is returned and Plaid undoes the credit or debit.

The total sum of the `swept` and `return_swept` events is equal to the `amount` of the sweep Plaid creates and matches the amount of the entry on your sweep account ledger.

string

Identifier of the sweep.

string

The id of the funding account to use, available in the Plaid Dashboard. This determines which of your business checking accounts will be credited or debited.

nullable, string

Plaid's unique identifier for a Plaid Ledger Balance.

string

The datetime when the sweep occurred, in RFC 3339 format.

Format: `date-time`

string

Signed decimal amount of the sweep as it appears on your sweep account ledger (e.g. "-10.00")

If amount is not present, the sweep was net-settled to zero and outstanding debits and credits between the sweep account and Plaid are balanced.

string

The currency of the sweep, e.g. "USD".

nullable, string

The date when the sweep settled, in the YYYY-MM-DD format.

Format: `date`

nullable, string

The expected date when funds from a ledger deposit will be made available and can be withdrawn from the associated ledger balance. Only applies to deposits. This will be of the form YYYY-MM-DD.

Format: `date`

nullable, string

The status of a sweep transfer

`"pending"` - The sweep is currently pending `"posted"` - The sweep has been posted `"settled"` - The sweep has settled. This is the terminal state of a successful credit sweep. `"returned"` - The sweep has been returned. This is the terminal state of a returned sweep. Returns of a sweep are extremely rare, since sweeps are money movement between your own bank account and your own Ledger. `"funds_available"` - Funds from the sweep have been released from hold and applied to the ledger's available balance. (Only applicable to deposits.) This is the terminal state of a successful deposit sweep. `"failed"` - The sweep has failed. This is the terminal state of a failed sweep.

Possible values: `pending`, `posted`, `settled`, `funds_available`, `returned`, `failed`, `null`

nullable, string

The trigger of the sweep

`"manual"` - The sweep is created manually by the customer `"incoming"` - The sweep is created by incoming funds flow (e.g. Incoming Wire) `"balance_threshold"` - The sweep is created by balance threshold setting `"automatic_aggregate"` - The sweep is created by the Plaid automatic aggregation process. These funds did not pass through the Plaid Ledger balance.

Possible values: `manual`, `incoming`, `balance_threshold`, `automatic_aggregate`

string

The description of the deposit that will be passed to the receiving bank (up to 10 characters). Note that banks utilize this field differently, and may or may not show it on the bank statement.

nullable, string

The trace identifier for the transfer based on its network. This will only be set after the transfer has posted.

For `ach` or `same-day-ach` transfers, this is the ACH trace number. For `rtp` transfers, this is the Transaction Identification number. For `wire` transfers, this is the IMAD (Input Message Accountability Data) number.

nullable, object

The failure reason if the status for a sweep is `"failed"` or `"returned"`. Null value otherwise.

nullable, string

The failure code, e.g. `R01`. A failure code will be provided if and only if the sweep status is `returned`. See [ACH return codes](https://plaid.com/docs/errors/transfer/index.html.md#ach-return-codes) for a full listing of ACH return codes and [RTP/RfP error codes](https://plaid.com/docs/errors/transfer/index.html.md#rtprfp-error-codes) for RTP error codes.

nullable, string

A human-readable description of the reason for the failure or reversal.

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "sweep": {
    "id": "8c2fda9a-aa2f-4735-a00f-f4e0d2d2faee",
    "funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
    "ledger_id": "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
    "created": "2020-08-06T17:27:15Z",
    "amount": "-12.34",
    "iso_currency_code": "USD",
    "settled": null,
    "status": "pending",
    "trigger": "manual",
    "description": "deposit",
    "network_trace_id": null
  },
  "request_id": "saKrIBuEB9qJZno"
}
```

\=\*=\*=\*=

#### /transfer/ledger/distribute 

#### Move available balance between ledgers 

Use the [/transfer/ledger/distribute](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerdistribute) endpoint to move available balance between ledgers, if you have multiple. If you're a platform, you can move funds between one of your ledgers and one of your customer's ledger.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

required, string

The Ledger to pull money from.

required, string

The Ledger to credit money to.

required, string

The amount to move (decimal string with two digits of precision e.g. "10.00"). Amount must be positive.

required, string

A unique key provided by the client, per unique ledger distribute. Maximum of 50 characters.

The API supports idempotency for safely retrying the request without accidentally performing the same operation twice. For example, if a request to create a ledger distribute fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single distribute is created.

Max length: `50`

string

An optional description for the ledger distribute operation.

```node
const request: TransferLedgerDistributeRequest = {
   from_ledger_id: 'ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0',
   to_ledger_id: '0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1',
   amount: '12.34',
   idempotency_key: 'test_distribute_abc',
   description: 'distribute',
};
try {
  const response = await client.transferLedgerDistribute(request);
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/transfer/ledger/distribute \
 -H 'Content-Type: application/json' \
 -d '{
   "client_id": "${PLAID_CLIENT_ID}",
   "secret": "${PLAID_SECRET}",
   "amount": "12.34",
   "from_ledger_id": "ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0",
   "to_ledger_id": "0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1",
   "idempotency_key": "test_distribute_abc",
   "description": "distribute",
 }'

```

```ruby
request = Plaid::TransferLedgerDistributeRequest.new(
  {
   amount: "12.34",
   from_ledger_id: "ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0",
   to_ledger_id: "0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1",
   idempotency_key: "test_distribute_abc",
   description: "distribute",
  }
)
response = client.transfer_ledger_distribute(request)

```

```java
TransferLedgerDistributeRequest request = new TransferLedgerDistributeRequest()
  .fromLedgerId("ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0")
  .toLedgerId("0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1")
  .amount("12.34")
  .idempotencyKey("test_distribute_abc")
  .description("distribute");
Response response = client()
  .transferLedgerDistribute(request)
  .execute();

```

```python
request = TransferLedgerDistributeRequest(
    amount='12.34',
    from_ledger_id="ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0",
    to_ledger_id="0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1",
    idempotency_key='test_distribute_abc',
    description='distribute',
)
response = client.transfer_ledger_distribute(request)

```

```go
request := plaid.NewTransferLedgerDistributeRequest(
  "ec07bbf3-a3d4-4ada-8be0-7be9a6f9bcd0",
  "0b13ddd5-fa46-432f-8e5d-7e8ea6f8c8b1",
  "12.34",
  "test_distribute_abc",
)
request.SetDescription("distribute")
response, _, err := client.PlaidApi.TransferLedgerDistribute(ctx).TransferLedgerDistributeRequest(*request).Execute()

```

#### Response fields 

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "request_id": "saKrIBuEB9qJZno"
}
```

\=\*=\*=\*=

#### /transfer/ledger/get 

#### Retrieve Plaid Ledger balance 

Use the [/transfer/ledger/get](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerget) endpoint to view a balance on the ledger held with Plaid.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

string

Specify which ledger balance to get. Customers can find a list of `ledger_id`s in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance.

string

Client ID of the end customer.

```node
try {
  const response = await client.transferLedgerGet({});
  const available_balance = response.data.balance.available;
  const pending_balance = response.data.balance.pending;
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/transfer/ledger/get \
 -H 'Content-Type: application/json' \
 -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}"
 }'

```

```ruby
response = client.transfer_ledger_get({})
available_balance = response.balance.available

```

```java
Response response = client().transferLedgerGet(new Object()).execute();

String availableBalance =
  response.body().getBalance().getAvailable();

```

```python
response = client.transfer_ledger_get({})
available_balance = response['balance']['available']

```

```go
  resp, _, err := client.PlaidApi.TransferLedgerGet(ctx).Body(nil).Execute()
  if err != nil {
    plaidErr, _ := plaid.ToPlaidError(err)
    fmt.Println(plaidErr.ErrorMessage)
  }
  balance, ok := resp.GetBalance().GetAvailable();


```

#### Response fields 

string

The unique identifier of the Ledger that was returned.

object

Information about the balance of the ledger held with Plaid.

string

The amount of this balance available for use (decimal string with two digits of precision e.g. "10.00").

string

The amount of pending funds that are in processing (decimal string with two digits of precision e.g. "10.00").

string

The name of the Ledger

boolean

Whether this Ledger is the client's default ledger.

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "ledger_id": "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
  "name": "Default",
  "is_default": true,
  "balance": {
    "available": "1721.70",
    "pending": "123.45"
  },
  "request_id": "saKrIBuEB9qJZno"
}
```

\=\*=\*=\*=

#### /transfer/ledger/withdraw 

#### Withdraw funds from a Plaid Ledger balance 

Use the [/transfer/ledger/withdraw](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgerwithdraw) endpoint to withdraw funds from a Plaid Ledger balance.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

string

Client ID of the customer that owns the Ledger balance. This is so Plaid knows which of your customers to payout or collect funds. Only applicable for [Platform customers](https://plaid.com/docs/transfer/application/index.html.md#originators-vs-platforms) . Do not include if you're paying out to yourself.

string

Specify which funding account to use. Customers can find a list of `funding_account_id`s in the Accounts page of the Plaid Dashboard, under the "Account ID" column. If this field is left blank, the funding account associated with the specified Ledger will be used. If an `originator_client_id` is specified, the `funding_account_id` must belong to the specified originator.

string

Specify which ledger balance to withdraw from. Customers can find a list of `ledger_id`s in the Accounts page of your Plaid Dashboard. If this field is left blank, this will default to id of the default ledger balance.

required, string

A positive amount of how much will be withdrawn from the ledger balance (decimal string with two digits of precision e.g. "5.50").

string

The description of the deposit that will be passed to the receiving bank (up to 10 characters). Note that banks utilize this field differently, and may or may not show it on the bank statement.

Max length: `10`

required, string

A unique key provided by the client, per unique ledger withdraw. Maximum of 50 characters.

The API supports idempotency for safely retrying the request without accidentally performing the same operation twice. For example, if a request to create a ledger withdraw fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single withdraw is created.

Max length: `50`

required, string

The network or rails used for the transfer.

For transfers submitted as `ach` or `same-day-ach`, the Standard ACH cutoff is 8:30 PM Eastern Time.

For transfers submitted as `same-day-ach`, the Same Day ACH cutoff is 3:00 PM Eastern Time. It is recommended to send the request 15 minutes prior to the cutoff to ensure that it will be processed in time for submission before the cutoff. If the transfer is processed after this cutoff but before the Standard ACH cutoff, it will be sent over Standard ACH rails and will not incur same-day charges; this will apply to both legs of the transfer if applicable. The transaction limit for a Same Day ACH transfer is $1,000,000. Authorization requests sent with an amount greater than $1,000,000 will fail.

For transfers submitted as `rtp`, Plaid will automatically route between Real Time Payment rail by TCH or FedNow rails as necessary. If a transfer is submitted as `rtp` and the counterparty account is not eligible for RTP, the `/transfer/authorization/create` request will fail with an `INVALID_FIELD` error code. To pre-check to determine whether a counterparty account can support RTP, call `/transfer/capabilities/get` before calling `/transfer/authorization/create`.

Wire transfers are currently in early availability. To request access to `wire` as a payment network, contact your account manager. For transfers submitted as `wire`, the `type` must be `credit`; wire debits are not supported. The cutoff to submit a wire payment is 6:30 PM Eastern Time on a business day; wires submitted after that time will be processed on the next business day. The transaction limit for a wire is $999,999.99. Authorization requests sent with an amount greater than $999,999.99 will fail.

Possible values: `ach`, `same-day-ach`, `rtp`, `wire`

```node
const request: TransferLedgerWithdrawRequest = {
  amount: '12.34',
  network: 'ach',
  idempotency_key: 'test_withdraw_abc',
  description: 'withdraw',
};
try {
  const response = await client.transferLedgerWithdraw(request);
  const sweep = response.data.sweep;
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/transfer/ledger/withdraw \
 -H 'Content-Type: application/json' \
 -d '{
   "client_id": "${PLAID_CLIENT_ID}",
   "secret": "${PLAID_SECRET}",
   "amount": "12.34",
   "network": "ach",
   "idempotency_key": "test_withdraw_abc",
   "description": "withdraw"
 }'

```

```ruby
request = Plaid::TransferLedgerWithdrawRequest.new(
  {
   amount: "12.34",
   network: "ach",
   idempotency_key: "test_withdraw_abc",
   description: "withdraw",
  }
)
response = client.transfer_ledger_withdraw(request)
sweep = response.sweep

```

```java
TransferLedgerWithdrawRequest request = new TransferLedgerWithdrawRequest()
  .amount("12.34")
  .network("ach")
  .idempotencyKey("test_withdraw_abc")
  .description("withdraw");
Response response = client()
  .transferLedgerWithdraw(request)
  .execute();
Sweep sweep =
  response.body().getSweep();

```

```python
request = TransferLedgerWithdrawRequest(
    amount='12.34',
    network='ach',
    idempotency_key='test_withdraw_abc',
    description='withdraw',
)
response = client.transfer_ledger_withdraw(request)
sweep = response['sweep']

```

```go
request := plaid.NewTransferLedgerWithdrawRequest(
  "12.34",
  "test_withdraw_abc",
  "ach",
)
response, _, err := client.PlaidApi.TransferLedgerWithdraw(ctx).TransferLedgerWithdrawRequest(*request).Execute()

```

#### Response fields 

object

Describes a sweep of funds to / from the sweep account.

A sweep is associated with many sweep events (events of type `swept` or `return_swept`) which can be retrieved by invoking the `/transfer/event/list` endpoint with the corresponding `sweep_id`.

`swept` events occur when the transfer amount is credited or debited from your sweep account, depending on the `type` of the transfer. `return_swept` events occur when a transfer is returned and Plaid undoes the credit or debit.

The total sum of the `swept` and `return_swept` events is equal to the `amount` of the sweep Plaid creates and matches the amount of the entry on your sweep account ledger.

string

Identifier of the sweep.

string

The id of the funding account to use, available in the Plaid Dashboard. This determines which of your business checking accounts will be credited or debited.

nullable, string

Plaid's unique identifier for a Plaid Ledger Balance.

string

The datetime when the sweep occurred, in RFC 3339 format.

Format: `date-time`

string

Signed decimal amount of the sweep as it appears on your sweep account ledger (e.g. "-10.00")

If amount is not present, the sweep was net-settled to zero and outstanding debits and credits between the sweep account and Plaid are balanced.

string

The currency of the sweep, e.g. "USD".

nullable, string

The date when the sweep settled, in the YYYY-MM-DD format.

Format: `date`

nullable, string

The expected date when funds from a ledger deposit will be made available and can be withdrawn from the associated ledger balance. Only applies to deposits. This will be of the form YYYY-MM-DD.

Format: `date`

nullable, string

The status of a sweep transfer

`"pending"` - The sweep is currently pending `"posted"` - The sweep has been posted `"settled"` - The sweep has settled. This is the terminal state of a successful credit sweep. `"returned"` - The sweep has been returned. This is the terminal state of a returned sweep. Returns of a sweep are extremely rare, since sweeps are money movement between your own bank account and your own Ledger. `"funds_available"` - Funds from the sweep have been released from hold and applied to the ledger's available balance. (Only applicable to deposits.) This is the terminal state of a successful deposit sweep. `"failed"` - The sweep has failed. This is the terminal state of a failed sweep.

Possible values: `pending`, `posted`, `settled`, `funds_available`, `returned`, `failed`, `null`

nullable, string

The trigger of the sweep

`"manual"` - The sweep is created manually by the customer `"incoming"` - The sweep is created by incoming funds flow (e.g. Incoming Wire) `"balance_threshold"` - The sweep is created by balance threshold setting `"automatic_aggregate"` - The sweep is created by the Plaid automatic aggregation process. These funds did not pass through the Plaid Ledger balance.

Possible values: `manual`, `incoming`, `balance_threshold`, `automatic_aggregate`

string

The description of the deposit that will be passed to the receiving bank (up to 10 characters). Note that banks utilize this field differently, and may or may not show it on the bank statement.

nullable, string

The trace identifier for the transfer based on its network. This will only be set after the transfer has posted.

For `ach` or `same-day-ach` transfers, this is the ACH trace number. For `rtp` transfers, this is the Transaction Identification number. For `wire` transfers, this is the IMAD (Input Message Accountability Data) number.

nullable, object

The failure reason if the status for a sweep is `"failed"` or `"returned"`. Null value otherwise.

nullable, string

The failure code, e.g. `R01`. A failure code will be provided if and only if the sweep status is `returned`. See [ACH return codes](https://plaid.com/docs/errors/transfer/index.html.md#ach-return-codes) for a full listing of ACH return codes and [RTP/RfP error codes](https://plaid.com/docs/errors/transfer/index.html.md#rtprfp-error-codes) for RTP error codes.

nullable, string

A human-readable description of the reason for the failure or reversal.

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "sweep": {
    "id": "8c2fda9a-aa2f-4735-a00f-f4e0d2d2faee",
    "funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
    "ledger_id": "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
    "created": "2020-08-06T17:27:15Z",
    "amount": "12.34",
    "iso_currency_code": "USD",
    "settled": null,
    "status": "pending",
    "trigger": "manual",
    "description": "withdraw",
    "network_trace_id": null
  },
  "request_id": "saKrIBuEB9qJZno"
}
```

\=\*=\*=\*=

#### /transfer/ledger/event/list 

#### List transfer ledger events 

Use the [/transfer/ledger/event/list](https://plaid.com/docs/api/products/transfer/ledger/index.html.md#transferledgereventlist) endpoint to get a list of ledger events for a specific ledger based on specified filter criteria.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Filter transfer events to only those with the specified originator client. (This field is specifically for resellers. Caller's client ID will be used if this field is not specified.)

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

string

The start created datetime of transfers to list. This should be in RFC 3339 format (i.e. 2019-12-06T22:35:49Z)

Format: `date-time`

string

The end created datetime of transfers to list. This should be in RFC 3339 format (i.e. 2019-12-06T22:35:49Z)

Format: `date-time`

string

Plaid's unique identifier for a Plaid Ledger Balance.

string

Plaid's unique identifier for the ledger event.

string

Source of the ledger event.

`"TRANSFER"` - The source of the ledger event is a transfer `"SWEEP"` - The source of the ledger event is a sweep `"REFUND"` - The source of the ledger event is a refund

Possible values: `TRANSFER`, `SWEEP`, `REFUND`

string

Plaid's unique identifier for a transfer, sweep, or refund.

integer

The maximum number of transfer events to return. If the number of events matching the above parameters is greater than `count`, the most recent events will be returned.

Default: `25`

Maximum: `25`

Minimum: `1`

integer

The offset into the list of transfer events. When `count`\=25 and `offset`\=0, the first 25 events will be returned. When `count`\=25 and `offset`\=25, the next 25 events will be returned.

Default: `0`

Minimum: `0`

```node
const request: TransferLedgerEventListRequest = {
    originator_client_id: "8945fedc-e703-463d-86b1-dc0607b55460",
    start_date: '2019-12-06T22:35:49Z',
    end_date: '2019-12-12T22:35:49Z',
    count: 14,
    offset: 2,
    ledger_id: "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
    ledger_event_id: "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
    source_type: "TRANSFER",
    source_id: "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
 };
try {
  const response = await plaidClient.transferLedgerEventList(request);
  const events = response.data.ledger_events;
  for (const event of events) {
    // iterate through events
  }
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/transfer/ledger/event/list \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}",
    "originator_client_id": "8945fedc-e703-463d-86b1-dc0607b55460",
    "start_date": "2019-12-06T22:35:49Z",
    "end_date": "2019-12-12T22:35:49Z",
    "count": 14,
    "offset": 0,
    "ledger_id": "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
    "ledger_event_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
    "source_type": "TRANSFER",
    "source_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9"
  }'

```

```ruby
require 'time'

request = Plaid::TransferLedgerEventListRequest.new(
  {
    originator_client_id: '8945fedc-e703-463d-86b1-dc0607b55460',
    start_date: Time.parse('2019-12-06T22:35:49Z'),
    end_date: Time.parse('2019-12-12T22:35:49Z'),
    count: 14,
    offset: 2,
    ledger_id: '563db5f8-4c95-4e17-8c3e-cb988fb9cf1a',
    ledger_event_id: '3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr',
    source_type: 'TRANSFER',
    source_id: '460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9',
  }
)
response = client.transfer_ledger_event_list(request)
response.ledger_events.each do |event|
  # iterate through events
end

```

```java
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

OffsetDateTime startDate = OffsetDateTime.parse("2019-12-06T22:35:49+00:00");
OffsetDateTime endDate = OffsetDateTime.parse("2019-12-12T22:35:49+00:00");

TransferLedgerEventListRequest request = new TransferLedgerEventListRequest()
  .originatorClientId("8945fedc-e703-463d-86b1-dc0607b55460")
  .startDate(startDate)
  .endDate(endDate)
  .count(14)
  .offset(2)
  .ledgerId("563db5f8-4c95-4e17-8c3e-cb988fb9cf1a")
  .ledgerEventId("3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr")
  .sourceType("TRANSFER")
  .sourceId("460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9");
Response response = client()
  .transferLedgerEventList(request)
  .execute();
List ledgerEvents =
  response.body().getLedgerEvents();
for (TransferLedgerEvent e : ledgerEvents) {
  // iterate through events
}

```

```python
import datetime

request = TransferLedgerEventListRequest(
  originator_client_id='8945fedc-e703-463d-86b1-dc0607b55460',
  start_date=datetime.datetime(2019, 12, 6, 22, 35, 49, tzinfo=datetime.timezone.utc),
  end_date=datetime.datetime(2019, 12, 12, 22, 35, 49, tzinfo=datetime.timezone.utc),
  count=14,
  offset=2,
  ledger_id='563db5f8-4c95-4e17-8c3e-cb988fb9cf1a',
  ledger_event_id='3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr',
  source_type='TRANSFER',
  source_id='460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9'
)
response = client.transfer_ledger_event_list(request)
events = response['ledger_events']
for event in events:
  # iterate through events

```

```go
request := plaid.NewTransferLedgerEventListRequest()

request.SetOriginatorClientId("8945fedc-e703-463d-86b1-dc0607b55460")
request.SetStartDate(time.Date(2019, time.December, 6, 22, 35, 49, 0, time.UTC))
request.SetEndDate(time.Date(2019, time.December, 12, 22, 35, 49, 0, time.UTC))
request.SetCount(14)
request.SetOffset(2)
request.SetLedgerId("563db5f8-4c95-4e17-8c3e-cb988fb9cf1a")
request.SetLedgerEventId("3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr")
request.SetSourceType("TRANSFER")
request.SetSourceId("460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9")

response, _, err := client.PlaidApi.TransferLedgerEventList(ctx).TransferLedgerEventListRequest(*request).Execute()

```

#### Response fields 

\[object\]

string

Plaid's unique identifier for this ledger event.

string

The ID of the ledger this event belongs to.

string

The amount of the ledger event as a decimal string.

nullable, string

The ID of the transfer source that triggered this ledger event.

nullable, string

The ID of the refund source that triggered this ledger event.

nullable, string

The ID of the sweep source that triggered this ledger event.

string

A description of the ledger event.

string

The new pending balance after this event.

string

The new available balance after this event.

string

The type of balance that was impacted by this event.

string

The datetime when this ledger event occurred.

Format: `date-time`

boolean

Whether there are more events to be pulled from the endpoint that have not already been returned

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "ledger_events": [
    {
      "ledger_event_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
      "ledger_id": "563db5f8-4c95-4e17-8c3e-cb988fb9cf1a",
      "amount": "100.00",
      "type": "deposit",
      "transfer_id": "460cbe92-2dcc-8eae",
      "description": "Converted to available",
      "pending_balance": "100.00",
      "available_balance": "100.00",
      "timestamp": "2023-12-01T10:00:00Z"
    }
  ],
  "has_more": false,
  "request_id": "mdqfuVxeoza6mhu"
}
```