Return File 3.5

  1. Goals
  2. Definitions
  3. File Structure
  4. Record format
    • Record 0 – Header
    • Record 1 - Sale Details
    • Record 10 - Credit Details
    • Record 2 – Adjustments
    • Record 100 – Anticipation Batch
    • Record 200 – Anticipated transactions
    • Record 9 – Trailer
  5. Remark
    1. Limitations
    2. template for saving to database
  6. Code table
  7. Version Changes

1. Goals

  • The detailed return file generated on disk is intended to allow the custommer's back-end system to download the outstanding bills.

Target Audience: Any and all customers that need to save data to disk.

  • The detailed return file generated in the customer's database is intended to allow
    that the back-end system can download the outstanding bills to a table created and managed by the customer. '

    Target audience: Environments that use database as an interface and are managed by DBAs.

  • The generated consolidated file is used to check the values ​​recorded in the map of
    store cash against the value recorded by SiTef, for payment transactions with
    credit, debit and benefit cards.

2. Definitions

  • The generation of the file is done through the "Report" interface, requiring only the
    “Start Date”, “End Date” and version information.
  • Files saved to disk will be generated in CSV format, that is, the fields are
    separated by sonicolons (“;”).
    -The files can also be generated in a database, provided that their respective tables are previously configured and created (1 table for each type of Record) with columns corresponding to the columns configured for each of the Records.

Important: Any and all managonent in this database and/or tables is the customer's responsibility, the Syston only feeds the previously existing tables. If they do not exist, an error will be returned when generating the file. More details in iton 5.2.

  • Only the fields available according to each network are present.

  • In case there is no content for the field, for files saved to disk, there will be the
    separator (“;”), making the number of fields of each “Fixed” record independent of the network.
    In the case of output to database, the field will be sent as “blank”.

  • In the case of Non-TEF transactions, the NSU Sitef field will contain the Receipt Number.

  • If the user selects the date type as "Sale Date", only the Record data
    Sale details (in addition to Header and Trailer) will be filled. This change has occurred so
    that the created file is immutable regardless of the present date.
    In the case of "Credit Date", the other fields will be filled, they are: Credit Details,
    Anticipation Batch, Advance Transactions and Adjustments, in addition to the Header and Trailer;

  • In the case of output to database, neither Header nor Trailer will be generated, only Details will be generated.

  • The ordering, all ascending, of the records for the Sale Details field will be:

    1. Sale Date
    2. Idt Rede
    3. Codlojasitef
    4. TipoProduto
    5. NSU SiTef
    6. Installment Number
  • The ordering, all ascending, of the records for the Credit Details field will be:

    1. Credit Date
    2. Idt Rede
    3. Codlojasitef
    4. TipoProduto
    5. NSU SiTef
    6. Installment Number
  • The ordering, all ascending, of the records for the Adjustments field will be:

    1. Adjustment Date
    2. Idt Rede
    3. Codlojasitef

-The ordering, all ascending, of the records for the Anticipation Batch field will be:

  1. Anticipation Credit Date
  2. Idt Rede
  3. Codlojasitef
  4. Summary number
  5. Installment
  • The ordering, all ascending, of the records for the Anticipated Transactions field will be:

    1. Sale Date
    2. Idt Rede
    3. Codlojasitef
    4. TipoProduto
    5. NSU SiTef
  • The default filename format for saving to disk will be:

    • Detailed file: “Det<Nome_Rede><Data_Atual>.csv”

    • Where:

      • <Nome_Rede> Network Name, or “miscellaneous” when two or more authorizers are selected.
      • <Data_Atual> in the format YYMMDD.
  • The output to database requires the creation of a table for each type of Detail Record.

3. File Structure

Saved on disk:

Filter by Sale Date:

0 – Header
    1 – Sale Details*
9 - Trailer

Filter by Credit Date:

0 – Header
    10 – Credit Detail*
    .
    .
    2 – Adjustments
    .
    .
    100 – Anticipation Batch
    .
    .
    200 – Anticipated Transactions
    .
    .
9 – Trailer

* For transactions in installments, one (1) record of this type will be generated per installment.

Saved in a database, they need 5 tables "Sales", "Credit", "Adjustments", "Anticipation Batch" and "Anticipated Transaction":

Filter by Sale Date:

0 – Header
    1 – Sale Details*
9 - Trailer

Filter by Credit Date:

0 – Header
10 – Credit Details*
.
.
2 – Adjustments
.
.
100 – Anticipation Batch
.
.
200 – Anticipated Transactions
.
.
9 – Trailer

* For transactions in installments, one (1) record of this type will be generated per installment.

4. Record format

Record 0 – Header

Field NameMinimum sizeMaximum sizeInformations
H01 - Record type11‘0’
H02 - File creation date88YYYYMMDD
H03 - File creation time66HHMMSS
H04 - Period - Start Date88YYYYMMDD
H05 - Period - End Date88YYYYMMDD
H06 - Layout Version55‘V3.2’
H07 - network identifier code13‘00’ – More than one selected Network See Table I
H08 - File sequential number1414
H09 - Sequential number of record in file66

Record 1 - Sale Details**

Field NameMinimum sizeMaximum sizeInformations
V01 - Record Type11‘1’
V02 - Transaction Identifier130Custommer Code
V03 - Company Code115‘’
V04 - Sale Date88YYYYMMDD
V05 - Summary Number110‘’
V06 - receipt Number112‘’
V07 - SiTef's NSU112*
V08 - Credit Card Number119‘’
V09 - Gross Value316No cent separator Gross Value of the installment, if divided into installments
V10 - Total Installments22For cash transactions = “00”
V11 - Net value116No cent separator Value of the installment, if divided into installments
V12 - Credit Date88YYYYMMDD
V13 - Installment Number22Installment Number
V14 - Product Type11‘C’ - credit ‘D’ – debit ‘V’ – voucher ‘S’ – withdraw ‘A’ – payment
V15 - Capture11‘0’, ‘2’, ‘3’ – SiTef ‘1’, ‘4’ , ‘5’ – Others
V16 - Network identity code13[See table I](code table)
V17 - Bank Number16‘’
V18 - bank branch number16‘’
V19 - checking account number115‘’
V20 - commission amount316No cent separator
V21 - Service Fee Amount35No cent separator Eg: 199 = 1,99 %
V22 - CodLojaSiTef88
V23 - Authorization Code012**
V24 - Invoice020Invoice
V25 - Credit Card Company Code44See Table II
V26 – Date Sale Sitef18*** YYYYMMDD date of sale registered on Sitef. If not, it will come with: ‘’
V27 – Sale Time Sitef16HHMMSS time of sale registered on Sitef. If not, it will come with: ‘’.
V28 – Unique Summary Number022*** Exclusive to Cielo2 to find payment record, for other networks ´´ will be displayed.
V29 - record sequence in the file66

* For NON-TEF transactions, this field is filled with the receipt Number information (C06)..

** In the case of Redecard Debit, Goodcard and Tecban, this data is not available in electronic statements.

*** Exclusive field for Cielo2, this field is equivalent to the Unique Identification Number of the RO formatted as follows:

First Part - 15 fixed positions: identifies the summary while maintaining its history at Cielo.

Second Part - 07 variable positions: for use by Cielo. Identifies the changes made to the RO.

Record 10 - Credit Details

Field NameMinimum sizeMaximum sizeInformations
C01 - Record Type22‘10’
C02 - Transaction Identifier130Custommer Code
C03 - Company Code115‘’
C04 - Sale Date88yyyyMMDD
C05 - Summary Number110‘’
C06 - receipt Number112‘’
C07 - SiTef's NSU112*
C08 - Credit Card Number119‘’
C09 - Gross Value316No cent separator Gross Value of the installment, if divided into installments
C10 - Total Installments22For cash transactions = ‘00’
C11 - Net value116No cent separator Value of the installment, if divided into installments. If the value is lower than the value in the column "C12 - Original Net Value", it means that some event has changed the value to be paid. Value=“0”, means total cancellation of the amount to be paid.
C12 - Original Net Value016No cent separator Original Net Value, if divided into installments. Mainly used to indicate a cancellation by Redecard. empty if there is no unscheduling.
C13 - Credit Date88YYYYMMDD
C14 - Original Credit Date08YYYYMMDD Mainly used to indicate an acceleration of Visa. empty in case there is no acceleration.
C15 - Installment Number22Installment Number
C16 - Product Type11‘C’ - credit ‘D’ – debit ‘V’ – voucher ‘S’ – withdraw ‘A’ - payment
C17 – Capture11‘0’, ‘2’, ‘3’ – SiTef ‘1’, ‘4’, ‘5’ – Others
C18 - Network identity code13See Table I
C19 - Bank Number16‘’
C20 - bank branch Number16‘’
C21 - checking account number115‘’
C22 - commission amount316No cent separator
C23 - Service Fee Value35No cent separator Eg: 199 = 1,99 %
C24 - CodLojaSiTef88
C25 - Authorization Code012**
C26 - Invoice020Invoice
C27 - Credit Card Company Code44See table II
C28 – Sale Date Sitef18YYYYMMDD if it doesn't exist ‘’
C29 – Sale Time Sitef16HHMMSS if it doesn't exist ‘’
C30 – Unified Summary Number022*** Exclusive to Cielo2 to find payment record, for other networks, ´´will be displayed.
C31 - Record sequence in the file66

* For NON-TEF transactions, this field is filled with the receipt Number information (C06).

** In the case of Redecard Debit, Goodcard and Tecban, this data is not available in electronic statements.

*** Exclusive field for Cielo2, this field is equivalent to the Unique Identification Number of the RO formatted as follows:

First Part - 15 fixed positions: identifies the summary while maintaining its history at Cielo.

Second Part - 07 variable positions: for use by Cielo. Identifies the changes made to the RO.

Registro 2 – Adjustments

Field NameMinimum sizeMaximum sizeInformations
A01 - Record Type11‘2’
A02 - Company Code115‘’
A03 - Adjustment Date88YYYYMMDD
A04 - Adjustment Value316No cent separator
A05 - Net Adjustment Value316No cent separator
A06 - Summary Number110‘’
A07 - Credit Card Number119‘’
A08 - Receipt Number112‘’
A09 - Sale Date88YYYYMMDD
A10 - Adjustment Reason Code115‘’
A11 - Description of Reason for Adjustment164‘’
A12 - Reference number115Exclusive Redecard (POS)
A13 - Original Summary Number110Exclusive Redecard
A14 - Reference Month66Exclusive Redecard (POS)
A15 - network identifier code13[See table I](code table)
A16 - Bank Number66
A17 - bank branch Number66
A18 - checking account number115‘’
A19 - commission amount316No cent separator
A20 - Service Fee Value316No cent separator
A21 - Codlojasitef88
A22 – Unified Summary Number022*** Exclusive to Cielo2 to find payment record, for other networks, ´´ will be displayed.
A23 - Record sequence in the file66

*** Exclusive field for Cielo2, this field is equivalent to the Unique Identification Number of the RO formatted as follows:

First Part - 15 fixed positions: identifies the summary while maintaining its history at Cielo.

Second Part - 07 variable positions: for use by Cielo. Identifies the changes made to the RO.

Record 100 – Anticipation Batch

Field NameMinimum sizeMaximum sizeInformations
L01 - Record Type33‘100’
L02 - Company Code115‘’
L03 - CodLojaSiTef88
L04 - Summary Number115‘’
L05 - Anticipated Credit Date88YYYYMMDD
L06 - Amount paid316No cent separator. Net amount paid.
L07 - network identifier code13See Table I
L08 - Installment22For batch with cash transactions = ‘00’
L09 - Original Credit Date88YYYYMMDD
L10 - Original Net Value316No cent separator. Net value before anticipation.
L11 – Gross Value316No cent separator. Gross Value of the Anticipation.
L12 - Bank Number16‘’
L13 - bank branch Number16‘’
L14 - checking account number115‘’
L15 – Unified Summary Number022*** Exclusive to Cielo2 to find payment record, for other networks, ´´will be displayed.
L16 - Record sequence in the file66

*** Exclusive field for Cielo2, this field is equivalent to the Unique Identification Number of the RO formatted as follows:

First Part - 15 fixed positions: identifies the summary while maintaining its history at Cielo.

Second Part - 07 variable positions: for use by Cielo. Identifies the changes made to the RO.

Registro 200 – Anticipated Transactions

Field NameMinimum sizeMaximum sizeInformations
TA01 - Record Type33‘200’
TA02 - Transaction Identifier130Custommer Code
TA03 - Company Code115‘’
TA04 - Sale Date88YYYYMMDD
TA05 - Summary Number115‘’
TA06 - Receipt Number112‘’
TA07 - SiTef's NSU112*
TA08 - Credit Card Number119‘’
TA09 - Gross Value316No cent separator Gross Value of the transaction
TA10 - total installments22For cash transactions = “00”
TA11 - Product Type11‘C’ - credit ‘D’ – debit ‘V’ – voucher ‘S’ – withdraw
TA12 - Capture11‘0’, ‘2’, ‘3’ – SiTef ‘1’, ‘4’ , ‘5’ – Others
TA13 - network identifier code13[See table I](code table)
TA14 - CodLojaSiTef88
TA15 - Authorization Code012**
TA16 - Invoice020Invoice
TA17 - Credit Card Company Code44See table II
TA18 - Sale Date Sitef18YYYYMMDD if it doesn't exist ‘’
TA19 - Sale Time Sitef16HHMMSS if it doesn't exist ‘’
TA20 – Unified Summary Number022*** Exclusive to Cielo2 to find payment record, for other networks, ´´will be displayed.
TA21 - Record sequence in the file66

* For NON-TEF transactions, this field is filled with the information on the Receipt Number (TA06).

** In the case of Redecard Débito, Goodcard and Tecban, this data is not available in electronic statonents.

*** Exclusive field for Cielo2, this field is equivalent to the Unique Identification Number of the RO formatted as follows:

First Part - 15 fixed positions: identifies the summary while maintaining its history at Cielo.

Second Part - 07 variable positions: for use by Cielo. Identifies the changes made to the RO.

Record 9 – Trailer

Field NameMinimum sizeMaximum sizeInformations
T01 - Record Type11‘9’
T02 - Sequential number of record in file66

5. Remark

  1. Limitations
  • Due to limitations of the data sent by the administrators, the Amex, Visa and Redecard have their projected installments.
  1. template for saving to database

    • 1st step is to create 3 tables for each record, Sale, Credit and Adjustments, with their respective
      columns.
    • Examples for Oracle:
CREATE TABLE tab_venda
(
tipo_registro VARCHAR2 (01) NULL,
id_cliente VARCHAR2 (30) NULL,
cod_estab VARCHAR2 ( 15 ) NULL,
data_venda VARCHAR2 (08) NULL,
num_resumo VARCHAR2 (15) NULL,
num_comprovante VARCHAR2 (12) NULL,
nsu_sitef VARCHAR2 (12) NULL,
num_cartao VARCHAR2 (19) NULL,
valor_bruto VARCHAR2 (16) NULL,
total_parcelas VARCHAR2 (02) NULL,
valor_liquido VARCHAR2 (16) NULL,
data_credito VARCHAR2 (08) NULL,
num_parcelas VARCHAR2 (02) NULL,
tipo_produto VARCHAR2 (01) NULL,
captura VARCHAR2 (01) NULL,
idt_rede VARCHAR2 (03) NULL,
cod_banco VARCHAR2 (06) NULL,
cod_agencia VARCHAR2 (06) NULL,
num_conta VARCHAR2 (15) NULL,
valor_comissao VARCHAR2 (16) NULL,
taxa_servico VARCHAR2 (05) NULL,
codigo_loja VARCHAR2 (08) NULL,
codigo_autoriz VARCHAR2 (12) NULL,
cupom_fiscal VARCHAR2 (20) NULL,
codigo_bandeira VARCHAR2 (04) NULL,
data_venda_sitef VARCHAR2 (08) NULL,
hora_venda_sitef VARCHAR2 (06) NULL,
numero_ro_unico VARCHAR2 (22) NULL,
seq VARCHAR2 (06) NULL
);
CREATE TABLE tab_credito
(
tipo_registro VARCHAR2 (02) NULL,
id_cliente VARCHAR2 (30) NULL,
cod_estab VARCHAR2 (15) NULL,
data_venda VARCHAR2 (08) NULL,
num_resumo VARCHAR2 (15) NULL,
num_comprovante VARCHAR2 (12) NULL,
nsu_sitef VARCHAR2 (12) NULL,
num_cartao VARCHAR2 (19) NULL,
valor_bruto VARCHAR2 (16) NULL,
total_parcelas VARCHAR2 (02) NULL,
valor_liquido VARCHAR2 (16) NULL,
valor_liquido_orig VARCHAR2 (16) NULL,
data_credito VARCHAR2 (08) NULL,
data_credito_orig VARCHAR2 (08) NULL,
num_parcelas VARCHAR2 (02) NULL,
tipo_produto VARCHAR2 (01) NULL,
captura VARCHAR2 (01) NULL,
idt_rede VARCHAR2 (03) NULL,
cod_banco VARCHAR2 (06) NULL,
cod_agencia VARCHAR2 (06) NULL,
num_conta VARCHAR2 (15) NULL,
valor_comissao VARCHAR2 (16) NULL,
taxa_servico VARCHAR2 (05) NULL,
codigo_loja VARCHAR2 (08) NULL,
codigo_autoriz VARCHAR2 (12) NULL,
cupom_fiscal VARCHAR2 (20) NULL,
codigo_bandeira VARCHAR2 (04) NULL,
data_venda_sitef VARCHAR2 (08) NULL,
hora_venda_sitef VARCHAR2 (06) NULL,
numero_ro_unico VARCHAR2 (22) NULL,
seq VARCHAR2 (06) NULL
);
CREATE TABLE tab_ajuste
(
tipo_registro VARCHAR2 (01) NULL,
cod_estab VARCHAR2 (15) NULL,
data_ajuste VARCHAR2 (08) NULL,
valor_ajuste VARCHAR2 (16) NULL,
valor_liquido_ajuste VARCHAR2 (16) NULL,
num_resumo VARCHAR2 (15) NULL,
num_cartao VARCHAR2 (19) NULL,
num_comprovante VARCHAR2 (12) NULL,
data_venda VARCHAR2 (08) NULL,
cod_ajuste VARCHAR2 (15) NULL,
descrição_ajuste VARCHAR2 (64) NULL,
num_referencia VARCHAR2 (15) NULL,
num_resumo_orig VARCHAR2 (10) NULL,
mês_referencia VARCHAR2 (06) NULL,
idt_rede VARCHAR2 (03) NULL,
cod_banco VARCHAR2 (06) NULL,
cod_agencia VARCHAR2 (06) NULL,
num_conta VARCHAR2 (15) NULL,
valor_comissao VARCHAR2 (16) NULL,
taxa_servico VARCHAR2 (05) NULL,
codigo_loja VARCHAR2 (08) NULL,
numero_ro_unico VARCHAR2 (22) NULL,
seq VARCHAR2 (06) NULL
);
CREATE TABLE tab_lote_antec
(
tipo_registro VARCHAR2 (03) NULL,
cod_estab VARCHAR2 (15) NULL,
codigo_loja VARCHAR2 (08) NULL,
num_resumo VARCHAR2 (15) NULL,
data_credito_antec VARCHAR2 (08) NULL,
valor_pago VARCHAR2 (16) NULL,
idt_rede VARCHAR2 (03) NULL,
num_parcela VARCHAR2 (02) NULL,
data_credito_orig VARCHAR2 (08) NULL,
valor_liquido_orig VARCHAR2 (16) NULL,
valor_bruto VARCHAR2 (16) NULL,
cod_banco VARCHAR2 (06) NULL,
cod_agencia VARCHAR2 (06) NULL,
num_conta VARCHAR2 (15) NULL,
numero_ro_unico VARCHAR2 (22) NULL,
seq VARCHAR2 (06) NULL
);
CREATE TABLE tab_trn_antec
(
tipo_registro VARCHAR2 (03) NULL,
id_cliente VARCHAR2 (30) NULL,
cod_estab VARCHAR2 (15) NULL,
data_venda VARCHAR2 (08) NULL,
num_resumo VARCHAR2 (1 5 ) NULL,
num_comprovante VARCHAR2 (12) NULL,
nsu_sitef VARCHAR2 (12) NULL,
num_cartao VARCHAR2 (19) NULL,
valor_bruto VARCHAR2 (16) NULL,
total_parcelas VARCHAR2 (02) NULL,
tipo_produto VARCHAR2 (01) NULL,
captura VARCHAR2 (01) NULL,
idt_rede VARCHAR2 (03) NULL,
codigo_loja VARCHAR2 (08) NULL,
codigo_autoriz VARCHAR2 (12) NULL,
cupom_fiscal VARCHAR2 (20) NULL,
codigo_bandeira VARCHAR2 (04) NULL,
data_venda_sitef VARCHAR2 (08) NULL,
hora_venda_sitef VARCHAR2 (06) NULL,
numero_ro_unico VARCHAR2 (22) NULL,
seq VARCHAR2 (06) NULL
);

6. Code Table

Code Table

7. Version Changes

  • version V3. 5 on 11/09/2012 – Responsible : Adriano.

    • Inclusion of the Credit Card Company Code: 0010 – Visa Vale.
  • version V3.5 on 09/13/2012 – Responsible : Junior.

    • Modification of the column "Summary Number" field modified from 10 to 15 positions.
  • version V3.4 on 07/08/2012 – Responsible : Adriano.

    • Inclusion of the column “Numero RO Único” field with 22 exclusive positions for use by Cielo2. Payment record identification.
  • version V3.3 on 12/11/2012 – Responsible : Leonardo.

    • Dynamic insert on outer base.
  • version V3.2 on 05/24/2012 – Responsible : Adriano.

    • Inclusion of the "Gross Value" column in record 100
  • version V3.1 on 05/16/2012 – Responsible : Adriano.

    • Inclusion of comment in Record 10 column C11 - Net Value
    • Inclusion of new network codes
  • version V3.1 on 12/08/2011 – Responsible : MKK.

    • Inclusion of Anticipation Batch and Anticipated Transaction records
  • version V3.0 on 09/27/2011 – Responsible : Adriano.

    • Inclusion of the SITEF Sale Date and SITEF Sale Time columns in records 1 and 10
  • version V3.0 on 08/29/2011 – Responsible : Adriano.

    • Templates for saving to database
  • version V3.0 on 05/27/2011 – Responsible : Adriano.

    • Correction in the maximum sizes of fields V07 Record 1 and C07 Record 10 from 9 to 12 characters
  • version V3.0 on 03/10/2011 – Responsible : Adriano.

    • Inclusion of a new column: Credit Card Company Code, in Type 1 and 10 Records
    • Possibility of saving to database.
  • version V2.0 on 03/04/2011 – Responsible : Adriano.

    • Inclusion of new Network codes
  • version V2.0 on 04/09/2010 – Responsible : Adriano.

    • Inclusion of Capture =5 as Non-TEF
  • version V2.0 on 01/27/2010 – Responsible : Adriano.

    • Inclusion of the comment in columns V07 and C07
  • version V2.0 on 09/01/2009 – Responsible : MKK.

    • Inclusion of the product type = "S"(Withdraw)
  • version V2.0 on 01/21/2009 – Responsible : MKK.

    • Creation of the Credit Date and Sale Date record
    • Deleting the Negative Values ​​record
    • Inclusion of the withdraw product type ('S') for Redecard and Visanet
  • version V1.9 on 11/06/2008 – Responsible : MKK. ( return file version: 1.6.3 - 11/06/2008)

    • Modification in the Redecard Installment form
  • version V1.8 on 11/06/2008 – Responsible : Adriano. ( return file version: 1.6.1-11/06/2008)

    • Inclusion of the invoice code
  • version V1.7 on 10/09/2008 – Responsible : MKK.

    • Inclusion of the Authorization Code
  • version V1.6 on 01/31/2008 – Responsible : Adriano Galati.

    • Changing the network identifier code column with new codes
  • version V1.5 on 20/04/2007 – Responsible : Adriano Galati.

    • Inclusion of product type "V" - voucher
    • Inclusion of captures "2", "3" - TEF and "4" NON-TEF on 06/08/2007 – Adriano
    • Changing the delimiter to ";" (RMISERVER v. 1.5.3 06/11/2007)
  • version V1.4 on 08/01/2006 – Responsible : Adriano Galati.

    • Inclusion of the identRede column in the Header;
    • Inclusion of a new type of record 3 - Negative sales;
    • Inclusion of Bank, bank branch, Checking Account Number , Codlojasitef columns in the Detailing and Adjustments;
  • version V1.3 on 07/05/2005 – Responsible : Adriano Galati.

  • version V1.2 on 05/04/2004 – Responsible : Marcus Adolfo Lucio

  • version para V1.1;

    • Inclusion of record type '2' - Adjustment record;
  • version V1 on 05/01/2003 - Responsible Alexandro Alves Moreira