> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/documentacion-editran-editran-sepa-v3-open-en/adaptacion-para-pagos-telematicos-de-la-tgss/envio-de-la-confirmacion.md).

# Sending the confirmation

TGSS expects to receive from the entities an XML confirmation file according to the schema `pain.002.001.03.xsd`.

**TGSS Confirmation → Converter → XML (pain.002.001.03)**

Those users who have generated them in their applications in flat format and according to the following structure can obtain it with the Converter:

**CONFIRMATION RESPONSE FILE (flat format)**

| Field       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **FIELD A** | Identification of the CSB Ledger and Type of Operation. Its value will be `3414`                                                                                                                                                                                                                                                                                                                                                                                           |
| **FIELD B** | Identification of the transmitted file: **B1** corresponds to FIELD F1 of the Transmission Header Record; **B2** corresponds to FIELD F2; **B3** corresponds to FIELD F3                                                                                                                                                                                                                                                                                                   |
| **FIELD C** | Identification of the Issuing Entities: **C1** Reserved (12 positions); **C2** Identification of the Entity, alphanumeric (40 positions)                                                                                                                                                                                                                                                                                                                                   |
| **FIELD D** | Identification of the Financial Entity: **D1** NRBE of the Entity, numeric (4 positions); **D2** Reserved (4 positions)                                                                                                                                                                                                                                                                                                                                                    |
| **FIELD E** | Data for the Quadrant: **E1** Total Number of Records shown in the logical file trailer record, numeric (10 positions); **E2** Total Amount shown in the logical file trailer record, numeric (17 positions); **E3** Number of Records in the Received File, numeric (10 positions); **E4** Total Sum of Amounts of the Received File, numeric (17 positions). *Note: in the first version, where there is a single physical file, fields E1 and E2 will appear as zeros.* |
| **FIELD F** | Control Codes: **F1** Transmission Result Code, numeric (2 positions); **F2** Reserved for future codes, numeric (2 positions), its value will be `00`                                                                                                                                                                                                                                                                                                                     |
| **FIELD G** | Additional Customer Verification Information: **G1** corresponds to FIELD D of the Transmission Header Record; **G2** corresponds to FIELD E; **G3** corresponds to FIELD G; **G4** Reserved (8 positions)                                                                                                                                                                                                                                                                 |

The mapping performed by the Converter is as follows:

* `<CstmrPmtStsRpt><GrpHdr><MsgId>`: G1 + B1 + positions 2 to 5 of B3 + G3
* `<CstmrPmtStsRpt><GrpHdr><CreDtTm>`: in ISODateTime format `YYYY-MM-DDThh:mm:ss`. First and second digits of B1, formatted as `YYYY` + "-" + third and fourth digits of B1 + "-" + fifth and sixth digits of B1 + "T00:00:00"
* `<CstmrPmtStsRpt><OrgnlGrpInfAndSts><OrgnlMsgId>`: same content as `<CstmrCdtTrfInitn><GrpHdr><MsgId>`
* `<CstmrPmtStsRpt><OrgnlGrpInfAndSts><OrgnlMsgNmId>`: `pain.001.001.03`
* `<CstmrPmtStsRpt><OrgnlGrpInfAndSts><OrgnlCtrlSum>`: E4 (with the two rightmost digits separated by '.')
* `<CstmrPmtStsRpt><OrgnlGrpInfAndSts><GrpsSts>`: `ACTC` if F1 is `00`, `RJCT` for any other value.
* `<CstmrPmtStsRpt><OrgnlGrpInfAndSts><GrpsSts><StsRsnInf><Rsn><Cd>`: according to the content of F1 and provided that it is different from `00`.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.editran.onesait.com/documentacion-editran/documentacion-editran-editran-sepa-v3-open-en/adaptacion-para-pagos-telematicos-de-la-tgss/envio-de-la-confirmacion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
