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

# Statements and Transactions

> Pull monthly statements by company or by card (statements / statement-detail) and transaction records unbounded by billing cycles (transactions): the statement header, per-currency summary and transaction-line fields, plus how amount due and overpaymentAmount are computed.

## 📄 Guide

DCS issues a statement for every billing subject automatically, per calendar month, with nothing for the partner to trigger; the data is pulled over the API. The balance mode decides the billing subject: the company pool (SHARED) gets one statement per company, dedicated card balances (DEDICATED) get one statement per card. The billing cycle and its key dates are in [Limits and statements](../basic-concepts/limits-and-billing).

The three query endpoints divide the work:

| Endpoint                                           | Use                                                                   |
| -------------------------------------------------- | --------------------------------------------------------------------- |
| `GET /open-api-corp/statement/v1/statements`       | Statement list: statements over a time range, by company or by card   |
| `GET /open-api-corp/statement/v1/statement-detail` | Statement detail: header + per-currency summary + transaction lines   |
| `GET /open-api-corp/statement/v1/transactions`     | Transaction list: records by time window, unbounded by billing cycles |

<Note>
  **The settled statement is final**: a settled statement (`SETTLED`) is fixed and contains only posted transactions; the open statement (`OPEN`, `statementId` is null) is a live summary of the current cycle that includes unsettled authorization holds, so its purchase total falls back as transactions clear — expected behavior.
</Note>

## Statement list

`GET /open-api-corp/statement/v1/statements` returns statements over a time range, by company or by card, cycles in reverse order.

**Request parameters**

| Field            | Type    | Required | Description                                                                                                     |
| ---------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `organizationId` | String  | Yes      | Company ID                                                                                                      |
| `cardId`         | String  | No       | ≤32; pass it to bill by card, omit it to bill by company. Only dedicated-balance cards have their own statement |
| `startTime`      | String  | Yes      | Range start, ISO-8601                                                                                           |
| `endTime`        | String  | Yes      | Range end, ISO-8601                                                                                             |
| `page`           | Integer | No       | Default 1                                                                                                       |
| `pageSize`       | Integer | No       | Default 20, at most 100                                                                                         |

**Response data** is the standard paging envelope `page` / `pageSize` / `total` + `result[]`, and no longer echoes the request. Each `result[]` entry is a statement header plus per-currency summary. The total already includes the open statement. Each `result[]` entry is a statement header plus a per-currency summary:

| Field             | Description                                                                    |
| ----------------- | ------------------------------------------------------------------------------ |
| `statementId`     | Statement ID; null for the open statement                                      |
| `statementPeriod` | Billing cycle, yyyy-MM                                                         |
| `status`          | `OPEN` (not yet issued) / `SETTLED` (issued)                                   |
| `statementDate`   | Statement date, yyyy-MM-dd; the expected statement date for the open statement |
| `paymentDueDate`  | Payment due date, yyyy-MM-dd; the expected due date for the open statement     |
| `paymentStatus`   | Repayment status, computed live, see below                                     |
| `summary`         | Per-currency summary array, one element per currency, see below                |

The four `paymentStatus` states:

| Value              | Meaning                         |
| ------------------ | ------------------------------- |
| `CURRENT`          | Current cycle, in good standing |
| `AWAITING_PAYMENT` | Awaiting payment                |
| `PAID`             | Paid off                        |
| `OVERDUE`          | Overdue                         |

`summary` fields per currency:

| Field                        | Description                                                                                                                                         |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `currency`                   | Grouping currency, e.g. `USD` / `HKD`                                                                                                               |
| `creditLimitAmount`          | Nominal limit, configured per currency by the platform                                                                                              |
| `availableCreditLimitAmount` | Available deposit balance (the overpaymentAmount shown as a positive number, 0.00 when there is none)                                               |
| `totalPurchaseAmount`        | Purchases total (+)                                                                                                                                 |
| `totalRefundAmount`          | Refunds and chargebacks total (−)                                                                                                                   |
| `totalFeeAmount`             | Fees total (+)                                                                                                                                      |
| `totalRepaymentAmount`       | Repayments / top-ups total (−)                                                                                                                      |
| `totalCashAdvanceAmount`     | Cash advances total (net, +)                                                                                                                        |
| `totalDebitAmount`           | Internal allocations total; not shown among the lines, always 0.00 for SHARED (transfers are in [Balances and Transfers](./balances-and-transfers)) |
| `totalDueAmount`             | Amount due (+)                                                                                                                                      |
| `overpaymentAmount`          | Overpayment (−)                                                                                                                                     |

**Request example**

```json theme={null}
// Request: SHARED, no cardId
{
  "organizationId": "e7c9a1f0-3b52-4d8e-9a67-1f2b3c4d5e6f",
  "startTime": "2026-01-01T00:00:00Z",
  "endTime": "2026-03-31T23:59:59Z",
  "page": 1,
  "pageSize": 20
}
```

**Response example**

```json theme={null}
{
  "code": "SYS_SUCCESS",
  "message": null,
  "data": {
    "organizationId": "e7c9a1f0-3b52-4d8e-9a67-1f2b3c4d5e6f",
      "cardId": null,
    "statements": {
      "page": 1, "pageSize": 20, "total": 3,
      "result": [{
        "statementId": "6410000000000000001",
        "statementPeriod": "2026-03",
        "status": "SETTLED",
        "statementDate": "2026-04-01",
        "paymentDueDate": "2026-04-27",
        "paymentStatus": "AWAITING_PAYMENT",
        "summary": [{
          "currency": "USD",
          "creditLimitAmount": "500.00",
          "availableCreditLimitAmount": "0.00",
          "totalPurchaseAmount": "120.00",
          "totalRefundAmount": "-20.00",
          "totalFeeAmount": "1.50",
          "totalRepaymentAmount": "-80.00",
          "totalCashAdvanceAmount": "0.00",
          "totalDebitAmount": "0.00",
          "totalDueAmount": "21.50",
          "overpaymentAmount": "0.00"
        }]
      }]
    }
  }
}
```

## How amount due and overpaymentAmount are computed

The result fields of `summary` derive from one net figure S — purchases, fees and cash advances are positive, repayments / top-ups and refunds are negative; a positive net is debt, a negative net is overpaymentAmount:

```text theme={null}
S = totalRepaymentAmount + totalPurchaseAmount + totalRefundAmount
  + totalFeeAmount + totalCashAdvanceAmount + totalDebitAmount

totalDueAmount       = max(0, S)        amount due, debt shown as a positive number
overpaymentAmount          = min(0, S)        overpaymentAmount, shown as a negative number
availableCreditLimitAmount = S < 0 ? -S : 0   available deposit balance, overpaymentAmount shown positive
```

Checked against the response example above: S = −80.00 + 120.00 + (−20.00) + 1.50 + 0 + 0 = 21.50, so `totalDueAmount` is 21.50 and `overpaymentAmount` is 0.00.

## Statement detail

`GET /open-api-corp/statement/v1/statement-detail` returns the statement header + the per-currency summary + the transaction lines (pagination applies to the lines only).

**Request parameters**

| Field            | Type    | Required | Description                                                                                                     |
| ---------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `organizationId` | String  | Yes      | Company ID                                                                                                      |
| `cardId`         | String  | No       | ≤32; pass it to bill by card, omit it to bill by company. Only dedicated-balance cards have their own statement |
| `statementId`    | String  | No       | Required when querying a settled statement; pass null for the open statement                                    |
| `status`         | String  | No       | Only takes `OPEN`: pass it when querying the open statement; omit it for a settled one                          |
| `page`           | Integer | No       | Default 1, applies to the lines only                                                                            |
| `pageSize`       | Integer | No       | Default 20, at most 100                                                                                         |

<Note>
  Two ways to query: for a **settled statement** pass `statementId` and omit `status`; for the **current open statement** pass `statementId=null` + `status=OPEN`.
</Note>

**Response data** is the standard paging envelope `page` / `pageSize` / `total` + `result[]`; it no longer returns the statement header or `summary` — call the statement list for those. Each `result[]` entry is one transaction line:

| Field                                 | Description                                                                                    |
| ------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `currency`                            | Posting currency, also the grouping currency of the lines                                      |
| `transactionId`                       | Transaction reference                                                                          |
| `transactionCategory`                 | Transaction category, seven values, see below                                                  |
| `transactionTime`                     | Transaction time                                                                               |
| `remark`                              | Line remark / transaction description, free text                                               |
| `cardId`                              | Card ID; null for cardless rows such as deposits / transfers                                   |
| `panLast4`                            | Last four digits of the card number; null for cardless rows                                    |
| `postStatus`                          | Posting status, three states, see below                                                        |
| `originalCurrency` / `originalAmount` | Original transaction currency and amount                                                       |
| `postCurrency` / `postAmount`         | Posting currency and amount                                                                    |
| `postTime`                            | Posting / arrival time; null while on authorization hold                                       |
| `merchant`                            | Merchant details: `merchantName` / `mcc` / `merchantCountryCode`; null for repayment-type rows |

The seven `transactionCategory` values:

| Value          | Meaning            |
| -------------- | ------------------ |
| `PURCHASE`     | Purchase           |
| `REFUND`       | Refund             |
| `DEPOSIT`      | Deposit            |
| `TRANSFER`     | Transfer           |
| `CASH_ADVANCE` | Cash advance       |
| `FEE`          | Fee                |
| `REPAYMENT`    | Repayment / top-up |

The three `postStatus` states:

| Value      | Meaning                                    |
| ---------- | ------------------------------------------ |
| `POSTED`   | Posted                                     |
| `UNPOSTED` | On authorization hold (`postTime` is null) |
| null       | Not meaningful for repayment-type rows     |

**Request example**

```http theme={null}
# A settled statement: pass statementId
GET /open-api-corp/statement/v1/statement-detail?organizationId=e7c9a1f0-3b52-4d8e-9a67-1f2b3c4d5e6f&statementId=6410000000000000001&page=1&pageSize=20

# The current open statement: omit statementId, pass status=OPEN
GET /open-api-corp/statement/v1/statement-detail?organizationId=e7c9a1f0-3b52-4d8e-9a67-1f2b3c4d5e6f&status=OPEN&page=1&pageSize=20
```

**Response example**

```json theme={null}
{
  "code": "SYS_SUCCESS",
  "message": null,
  "data": {
    "page": 1,
    "pageSize": 20,
    "total": 2,
    "result": [
      {
        "transactionId": "6510000000000000001",
        "transactionCategory": "REPAYMENT",
        "transactionTime": "2026-03-10 16:00:12",
        "remark": "REPAYMENT",
        "cardId": null,
        "panLast4": null,
        "postStatus": null,
        "currency": "USD",
        "originalCurrency": "USD",
        "originalAmount": "-80",
        "postCurrency": "USD",
        "postAmount": "-80",
        "postTime": "2026-03-10T08:00:12Z",
        "merchant": null
      },
      {
        "transactionId": "6510000000000000002",
        "transactionCategory": "PURCHASE",
        "transactionTime": "2026-03-05 20:03:41",
        "remark": "ACME ONLINE STORE",
        "cardId": "5185740066240790530",
        "panLast4": "5492",
        "postStatus": "POSTED",
        "currency": "USD",
        "originalCurrency": "JPY",
        "originalAmount": "18000",
        "postCurrency": "USD",
        "postAmount": "121.35",
        "postTime": "2026-03-06T02:10:05Z",
        "merchant": {
          "merchantName": "ACME ONLINE STORE",
          "mcc": "5732",
          "merchantCountryCode": "JP"
        }
      }
    ]
  }
}
```

## Transaction list

`GET /open-api-corp/statement/v1/transactions` returns transaction records by time window, unbounded by billing cycles, in reverse time order.

**Request parameters**

| Field            | Type    | Required | Description                                                                                             |
| ---------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `organizationId` | String  | Yes      | Company ID                                                                                              |
| `cardId`         | String  | No       | Omit = the company view; pass = narrow to that card (including deposits into its bound virtual account) |
| `startTime`      | String  | Yes      | Range start, ISO-8601                                                                                   |
| `endTime`        | String  | Yes      | Range end, ISO-8601                                                                                     |
| `page`           | Integer | No       | Default 1                                                                                               |
| `pageSize`       | Integer | No       | Default 20, at most 100                                                                                 |

<Warning>
  The `startTime`–`endTime` window must not exceed six months; query older records in segments.
</Warning>

**Response data** is the standard paging envelope (`page` / `pageSize` / `total` / `result`); each `result` element is ordered by `transactionTime` descending, with exactly the same fields as the statement-detail lines above.

**Request example**

```json theme={null}
// Request: by card
{
  "organizationId": "e7c9a1f0-3b52-4d8e-9a67-1f2b3c4d5e6f",
  "cardId": "7830000000000009001",
  "startTime": "2026-01-01T00:00:00Z",
  "endTime": "2026-06-30T23:59:59Z",
  "page": 1,
  "pageSize": 20
}
```

**Response example**

```json theme={null}
// Response: one purchase on authorization hold
{
  "code": "SYS_SUCCESS",
  "message": null,
  "data": {
    "page": 1, "pageSize": 20, "total": 152,
    "result": [{
      "currency": "USD",
      "transactionId": "178289884146286860002494",
      "transactionCategory": "PURCHASE",
      "transactionTime": "2026-03-05T12:03:41Z",
      "remark": "EXAMPLE MERDOET",
      "cardId": "7830000000000009001",
      "panLast4": "8180",
      "postStatus": "UNPOSTED",
      "originalCurrency": "USD",
      "originalAmount": "50.00",
      "postCurrency": "USD",
      "postAmount": "50.00",
      "postTime": null,
      "merchant": {
        "merchantName": "EXAMPLE MERDOET",
        "mcc": "4511",
        "merchantCountryCode": "JP"
      }
    }]
  }
}
```

## Next steps

* How debt arises, and how authorizations hold and clear: [Authorization and 3DS](./authorization-and-3ds)
* Repayment is a deposit — the funding path and arrival notification: [Deposits](./deposits)
