> ## 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.

# Reconciliation overview

> Presigned URL, valid for 120 seconds

## Reconciliation overview

Whether you need regulatory reporting, a data warehouse archive, or line-by-line reconciliation against your own ledger, the full daily files that DCS generates let you retrieve the previous day's authorization and transaction detail in a single pass. As a licensed card issuer, DCS generates standardized settlement files on a schedule according to your program configuration and, once your request is authenticated, hands back a secure download link.

A report is a file generated from platform data to convey a summary view of one subject. For financial services and account products, reports matter for compliance filing, risk decisions and operational efficiency, because what they give you is a complete snapshot as of a point in time. If you need real-time changes, use webhook notifications rather than report files.

***

## The two daily reports

Every day, DCS generates two **full** files per partner (Enterprise), one covering authorizations and one covering transaction flow:

| Report                     | fileType        | What it covers                                                                                                     | Details                                               |
| -------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| Daily authorization report | `authorisation` | Every authorization decision made that day, including approvals and declines, decline reasons and merchant details | [Authorization report fields](./authorization-report) |
| Daily transaction report   | `transaction`   | Every movement of funds that day, including clearing, refunds and purchases                                        | [Transaction report fields](./transaction-report)     |

> **Authorization vs. transaction**: an authorization is the decision and the hold placed on funds at the moment the card is used; a transaction is the actual movement of money. The two are linked through the `authId` / `authIds` fields, and a single authorization may map to several clearing transactions. To join the two files for reconciliation, see the [field dictionary](./field-dictionary).

### Who does what

| Step                                                                    | Owner   |
| ----------------------------------------------------------------------- | ------- |
| Generate the full files on schedule and store them in AWS S3            | DCS     |
| Call the endpoint for a download link, then download and parse the file | Partner |
| Reconcile line by line against your own ledger                          | Partner |

> **When files are generated**: by default the two files for the previous day are generated on T+1; the exact daily run time is set on the scheduling platform. The link becomes available once the job reaches status `DONE`.

***

## Retrieving a report file

Files are held in a DCS AWS S3 bucket and are not publicly exposed. You first call the settlement file endpoint to exchange your request for a **short-lived download link**, then use that link to fetch the file.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/dcs-0bf7a937/oUoeUKtwWWK2o-Li/imgs/en/diagrams/pa-report-fetch-light.svg?fit=max&auto=format&n=oUoeUKtwWWK2o-Li&q=85&s=4b9fc3d44d0e60f09cc3917f00fed4e4" alt="Retrieving a report file" width="512" height="354" data-path="imgs/en/diagrams/pa-report-fetch-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/dcs-0bf7a937/oUoeUKtwWWK2o-Li/imgs/en/diagrams/pa-report-fetch-dark.svg?fit=max&auto=format&n=oUoeUKtwWWK2o-Li&q=85&s=14a85bba4e3f65d3a4b0fe6664e57200" alt="Retrieving a report file" width="512" height="354" data-path="imgs/en/diagrams/pa-report-fetch-dark.svg" />
</Frame>

**`GET /open-api/enterprise/v1/settlement-file-url`**

### Request parameters

| name       | in    | type   | required | description                                                                                                   |
| ---------- | ----- | ------ | -------- | ------------------------------------------------------------------------------------------------------------- |
| `fileType` | query | string | ✓        | File type, maximum length 20. Values: `authorisation` (authorization file) / `transaction` (transaction file) |
| `fileDate` | query | string | ✓        | File date, maximum length 8, format `yyyyMMdd`, for example `20260126`                                        |

<Note>
  the `fileType` value for the authorization file is `authorisation` (British spelling, with an `s`), not `authorization`. Pass it exactly as documented.
</Note>

### Request example

```http theme={null}
GET /open-api/enterprise/v1/settlement-file-url?fileType=authorisation&fileDate=20260126
Host: <DCS API Host>
Content-Type: application/json
X-DAPI-API-KEY: <your api_key>
X-DAPI-TIMESTAMP: <request timestamp, milliseconds UTC>
X-DAPI-NONCE: <random number, 10000-99999>
X-DAPI-SIGN: <HMAC-SHA256 signature>
```

> For the full meaning of the authentication headers, the signature calculation and the IP whitelist requirements, see [Authentication](../../integration-resources/authentication).

### Response example

The response follows the standard response envelope. The `data` field is the temporary S3 download link for the file, returned as a string.

```json theme={null}
{
  "code": "...",
  "message": "...",
  "messageDetail": {
    "message": "...",
    "title": "...",
    "type": "...",
    "icon": "...",
    "action": "...",
    "linkTitle": "...",
    "linkUrl": "..."
  },
  "data": "https://<s3-bucket>/...presigned-url..."
}
```

### The standard response envelope

| Field           | Type   | Description                                                                                                                                                                                                                                 |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `code`          | string | Business status code. Always judge success or failure from `code`; for the meaning of each error code see [Authorization declines and error codes](../transactions/decline-codes)                                                           |
| `message`       | string | Short summary message                                                                                                                                                                                                                       |
| `messageDetail` | object | A structured prompt intended for end-user display (title, message, icon, action, link and so on), used to guide the user in your front end. It is not tightly bound to business success, so never use it to decide whether a call succeeded |
| `data`          | string | Business payload. For this endpoint, the temporary download link for the file                                                                                                                                                               |

> For the exact `code` value on success and the complete error code dictionary, see [Authorization declines and error codes](../transactions/decline-codes), or ask the DCS team to confirm.

***

## Download link validity (important)

The link this endpoint returns is a **temporary S3 link (presigned URL) with a fixed validity of 120 seconds**. Download **immediately** after you receive it, and never cache the link for later use. Once it expires, simply call the endpoint again for a fresh link.

| Point to watch | Description                                                                                                                                                                                                                             |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Validity       | Fixed at 120 seconds; the link stops working after that, but the underlying file is retained and a new link can be issued                                                                                                               |
| If it expires  | Call `GET /open-api/enterprise/v1/settlement-file-url` again for a new link (the same `fileType` + `fileDate` can be requested as often as you need)                                                                                    |
| Large files    | You always receive a single file; no `_part` or segment-numbered files are produced                                                                                                                                                     |
| File name      | The file name is randomly generated (a UUID, such as `e53b723d-0b54-472f-89f9-587c7aedb07b.txt`) and carries no partner or date information. Archive it under a name of your own derived from the `fileType` + `fileDate` you requested |
| Integrity      | No checksum, MD5 or SHA is supplied today. If you need integrity verification, agree it separately as part of the file transfer arrangement                                                                                             |

***

## File format

Each report is a text file of `>`-delimited records, one record per line, with fields in the same order as the data structure table on the corresponding report page.

Authorization report example (a single line):

```text theme={null}
1109086179954790401>OUTGOING>NORMAL>>>1095041241881513984>1108391061086846977>1108449591919689729>4382140000003562>D>DAPI_AUTH_ENTERPRISE_TIMEOUT_REJECT>2025-03-19T11:52:33+08:00>702>0.100000000000000000>>0E-18>>>R>5399>2025-03-19T03:52:31+08:00>2025-03-19T03:52:31+08:00>840
```

> Time fields use the format `yyyy-MM-dd'T'HH:mm:ss+08:00` (UTC+8). For the meaning of each field, see the corresponding report page and the [field dictionary](./field-dictionary).

***

## Next steps

* Parse the daily authorization file field by field → [Daily authorization report](./authorization-report)
* Parse the daily transaction file field by field → [Daily transaction report](./transaction-report)
* Join the two files for reconciliation → [Report field dictionary](./field-dictionary)
