# Batch Store Registration ## Overview The **Carat Portal** has a interface to register sereval merchant stores in batch mode. For this, the merchant must send to the Carat Portal's support team a store importation file following a certain format, so the data of the merchant's store can be registered at once. The importation can be done only if all the stores belong to the same group. The main purpose of the interface is to offer to developers the possibility to develop an application that creates a file based on this especification. Creating the file manually is not recommended. ## Importation File Format > **ATTENTION**: The importation file must be generated with the **UTF-8** encode. ## Default fields Format to be received (Format **per line**): ```plaintext field1;field2;field3;...;field16;;;...; ``` | Field | Field description | Format and size | Required | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- | -------- | | `field1` | `Merchant code` or `Merchant id`. this value uniquely identifies the store in the Carat Portal. Is recommended to use the company's CNPJ, without formatation, only numbers, in order to avoid merchant code conflicts between different stores. | < 15 AN | Yes | | `field2` | Fantasy Name | < 250 AN (no accentuation) | Yes | | `field3` | Corporate Name | < 250 AN (no accentuation) | Yes | | `field4` | CNPJ | < 15 N | Optional | | `field5` | Address (street name and number) | < 30 AN (no accentuation) | Optional | | `field6` | City | < 13 AN (no accentuation) | Optional | | `field7` | State | = 2 A | Optional | | `field8` | Zip Code (only numbers) | < 9 N | Optional | | `field9` | Phone (Optional) | > 5 and < 20 N | Optional | | `field10` | e-mail (Optional) | > 5 and < 20 AN | Optional | | `field11` | Website domain | < 50 AN (no accentuation) | Optional | | `field12` | Status Notification URL (HTTPS) | < 500 AN (no accentuation) | Optional | | `field13` | Transaction Authenticity URL (HTTPS) | < 500 AN (no accentuation) | Optional | | `field14` | URL for sending HASH (HTTPS) | < 500 AN (no accentuation) | Optional | | `field15` | Success URL | < 500 AN (no accentuation) | Optional | | `field16` | Failure URL | < 500 AN (no accentuation) | Optional | | `field17` | Cancellation URL | < 500 AN (no accentuation) | Optional | | `authorizerN` | Authorizer configurations (See the [Authorizer Configuration Fields](#authorizer-configuration-fields) section. | - | Yes | ## Authorizer Configuration Fields `authorizer1`, `authorizer2`, ..., `authorizerN` - Authorizers to be configured in the store. May be sent N authorizers. The field `authorizerN` must be in the following format: ```plaintext ...;authField1|authField2|authField3|authField4|authField5|parameter1|parameter2|...|parameterN ``` | Field | Field description | Format and size | | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | | `authField1` | Authorizer's code. See the [Authorizer codes Examples](#authorizer-code-examples) section to verify the allowed values. | < 5 N | | `authField2` | Routing's code. See the [Routing Examples](#routing-examples) section to verify the allowed values. | < 5 N | | `authField3` | Minimum value allowed per installment, in cents (**\***). | < 8 N | | `authField4` | Maximum installment with interest (**\***). | < 2 N | | `authField5` | Maximum installment without interest (**\***). | < 2 N | | `parameter1, parameter2, parameterN` | Authorizer parameters. N parameters may be sent. See the [Routing Parameters](#routing-parameters) section to verify the required fields for each routing. | - | (**\***) Field affects only payment e pre-authorization via HTML interface. ### Example | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZERS** | | | **AUTHORIZER 1** | | | `Authorizer` | Visa [1] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | **AUTHORIZER 2** | | | `Authorizer` | Mastercard [2] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZERS** | | | **AUTHORIZER 1** | | | `Authorizer` | Visa [1] | | `Routing` | Cielo [1125] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | `Cielo affiliation code` | 00000001 | | **AUTHORIZER 2** | | | `Authorizer` | Mastercard [2] | | `Routing` | Rede (Redecard) [1005] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `Rede (Redecard) affiliation code` | 00000002 | ### Result ```plaintext cod_loja_comp;Loja dos Computadores;Loja dos Computadores LTDA.;11137051003444;R. dos Computadores,3032;S Joao do Sul;SC;07022000;12341234;email@email.com.br;https://dominio.com.br; https://dominio.com.br/avisoStatus.jsp; https://dominio.com.br/autenticidade.jsp; https://dominio.com.br/envioHash.jsp; https://dominio.com.br/sucesso.jsp;http://dominio.com.br/fracasso.jsp; https://dominio.com.br/cancelamento.jsp;1|1125|2000|5|5|00000001;2|1005|10 00|10|10|00000002 ``` ## Routing Parameters Each routing has required parameters to work properly. They must be used in the variable fields `parameter1`, `parameter2`, ..., `parameterN`: > **ATTENTION**: The parameters must be sent in the order as described below. ### Cielo via SiTef Required parameters for Cielo via SiTef routing: - `Cielo affiliation code` #### Cielo via SiTef Example | Field | Value | | -------------------------------------- | -------------------- | | `Authorizer` | Visa [1] | | `Routing` | Cielo [1125] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `Cielo affiliation code` | 00000001 | ```plaintext ...;1|1125|1000|10|10|00000001 ``` ### Rede (Redecard) via SiTef Required parameters for Rede (Redecard) via SiTef routing: - `Rede (Redecard) affiliation code` #### Rede (Redecard) via SiTef Example | Field | Value | | -------------------------------------- | ---------------------- | | `Authorizer` | Mastercard [2] | | `Routing` | Rede (Redecard) [1005] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `Rede (Redecard) affiliation code` | 00000002 | ```plaintext ...;1|1005|1000|10|10|00000002 ``` ### Stone via SiTef Required parameters for Stone via SiTef routing: - `Stone affiliation code` - `Stone code` (alphanumeric length 9) #### Stone via SiTef Example | Field | Value | | -------------------------------------- | -------------------------------- | | `Authorizer` | Visa [1] | | `Routing` | Stone via SiTef [1265] | | `Minimum value of each installment` | 2,65 reals [265] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `Stone affiliation code` | codigoFiliacaoDaLojaNaStone32Car | | `Stone code` | 123456789 | ```plaintext ...;1|1265|265|10|10|codigoFiliacaoDaLojaNaStone32Car|123456789 ``` ### BIN via SiTef Required parameters for BIN via SiTef routing: - `BIN affiliation code` - `Virtual Terminal` (alphanumeric length 8) #### BIN via SiTef Example | Field | Value | | -------------------------------------- | -------------------- | | `Authorizer` | Mastercard [2] | | `Routing` | BIN via SiTef [1229] | | `Minimum value of each installment` | 2 reals [200] | | `Maximum installment with interest` | 7 installments [7] | | `Maximum installment without interest` | 10 installments [10] | | `BIN affiliation code` | 12345678 | | `Virtual Terminal` | 1TerVir8 | ```plaintext ...;2|1229|200|7|10|12345678|1TerVir8 ``` ### Safra via SiTef Required parameters for Safra via SiTef routing: - `Safra affiliation code` - `TEF Terminal Logic Number` (alphanumeric length 8) #### Safra via SiTef Example | Field | Value | | -------------------------------------- | ---------------------- | | `Authorizer` | Mastercard [2] | | `Routing` | Safra via SiTef [1296] | | `Minimum value of each installment` | 6 reals [600] | | `Maximum installment with interest` | 6 installments [6] | | `Maximum installment without interest` | 11 installments [11] | | `Safra affiliation code` | 98765432 | | `TEF Terminal Logic Number` | NoLgTe12 | ```plaintext ...;2|1296|600|6|11|98765432|NoLgTe12 ``` ### Global Payments via SiTef Required parameters for Global Payments via SiTef routing: - `Global Payments affiliation code` #### Global Payments via SiTef Example | Field | Value | | -------------------------------------- | ---------------------- | | `Authorizer` | Mastercard [2] | | `Routing` | Safra via SiTef [1206] | | `Minimum value of each installment` | 2 reals [200] | | `Maximum installment with interest` | 8 installments [8] | | `Maximum installment without interest` | 10 installments [10] | | `Global Payments affiliation code` | 12345678 | ```plaintext ...;2|1206|200|8|10|12345678 ``` ### Getnet Lac via SiTef Required parameters for Getnet Lac via SiTef routing: - `Getnet Lac affiliation code` - `Logic Terminal` (alphanumeric length 8) #### Getnet Lac via SiTef Example | Field | Value | | -------------------------------------- | ---------------------- | | `Authorizer` | Visa [1] | | `Routing` | Safra via SiTef [1181] | | `Minimum value of each installment` | 8 reals [800] | | `Maximum installment with interest` | 11 installments [11] | | `Maximum installment without interest` | 12 installments [12] | | `Getnet Lac affiliation code` | 87654321 | | `Logic Terminal` | TerLog18 | ```plaintext ...;1|1181|800|11|12|87654321|TerLog18 ``` ### Stone WS This routing refers to the Stone's acquirer e-commerce interface. Required parameters for Stone WS routing: - `salesAffiliationKey`: alphanumeric. > **ATTENTION**: The especific parameters for this routing must be sent in the key:value format. #### Stone WS Example | Field | Value | | -------------------------------------- | --------------------------------- | | `Authorizer` | Visa [1] | | `Routing` | Stone WS [409] | | `Minimum value of each installment` | 9 reals [900] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `salesAffiliationKey` | chaveDeIdentificacaoDaLojaNaStone | ```plaintext ...;1|409|900|10|10|salesAffiliationKey:chaveDeIdentificacaoDaLojaNaSt one ``` ### Cielo EC This routing refers to the Cielo's acquirer e-commerce interface. Required parameters for Cielo EC routing: - `merchantId`: alphanumeric (length < 36) - `merchantKey`: alphanumeric (length < 40) #### Cielo EC Example | Field | Value | | -------------------------------------- | ---------------------------- | | `Authorizer` | Visa [1] | | `Routing` | Cielo EC [201] | | `Minimum value of each installment` | 21 reals [2100] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `merchantId` | identificacaoDaLojaNaCieloEC | | `merchantKey` | chaveDaLojaNaCieloEC | ```plaintext ...;1|201|2100|10|10|merchantId:identificacaoDaLojaNaCieloEC|merchantKey:chaveDaLojaNaCieloEC ``` ### e-Rede This routing refers to the Rede's acquirer e-commerce interface. Required parameters for e-Rede routing: - `filiacao`: numeric (length 9) - `senha`: alphanumeric (length 32) #### e-Rede Example | Field | Value | | -------------------------------------- | -------------------------------- | | `Authorizer` | Visa [1)] | | `Routing` | e-Rede [1200] | | `Minimum value of each installment` | 13 reais [1300] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `filiacao` | 123456789 | | `senha` | aSenhaLojaNaERedeCom32Caracteres | ```plaintext ...;1|1200|1300|10|10|filiacao:123456789|senha:aSenhaLojaNaERedeCom32Caracteres ``` ### Global Payments WS This routing refers to the Global Payments' acquirer e-commerce interface. Required parameters for Global Payments WS routing: - `merchantCode`: numeric (length 15) - `secretKey`: alphanumeric (length 20) - `terminal`: numeric (length 3) #### Global Payments WS Example | Field | Value | | -------------------------------------- | ------------------------ | | `Authorizer` | Mastercard [2] | | `Routing` | Global Payments WS [408] | | `Minimum value of each installment` | 8 reais [800] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `merchantCode` | 123456789012345 | | `secretKey` | qwertyasdf0123456789 | | `terminal` | 001 | ```plaintext ...;2|408|800|10|10| merchantCode:123456789012345|secretKey:qwertyasdf0123456789|terminal:001 ``` ### Getnet WS This routing refers to the GetNet's acquirer e-commerce interface. Required parameters for Global Payments WS routing: - `username`: alphanumeric (length 20) - `password`: alphanumeric (length 40) - `merchantID`: numeric (length 10) - `terminalID`: alphanumeric (length 7) #### Getnet WS Example | Field | Value | | -------------------------------------- | --------------------------------------- | | `Authorizer` | Mastercard [2] | | `Routing` | Getnet WS [407] | | `Minimum value of each installment` | 7 reais [700] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 12 installments [12] | | `username` | nomeUsuarioDeAcessoG | | `password` | senhaRelativaAoUsernameAcimaComQuarenta | | `merchantID` | 1234567890 | | `terminalID` | 1234567 | ```plaintext ...;2|407|700|10|12|username:nomeUsuarioDeAcessoG|password:senhaRelativaAoUsernameAcimaComQuarenta|merchantID:123456790|terminalID:1234567 ``` ## Complete File Lines Example In this section will be listed some examples of importation file lines. ### Just One Authorizer | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZER** | | | `Authorizer` | Visa [1] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZER** | | | `Authorizer` | Visa [1] | | `Routing` | Cielo [1125] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | `Cielo affiliation code` | 00000001 | ```plaintext cod_loja_comp;Loja dos Computadores;Loja dos ComputadoresLTDA.;11137051003444;R. dos Computadores,3032;S Joao doSul;SC;07022000;12341234;email@email.com.br;https://dominio.com.br;https://dominio.com.br/avisoStatus.jsp;https://dominio.com.br/autenticidade.jsp;https://dominio.com.br/envioHash.jsp;https://dominio.com.br/sucesso.jsp;http://dominio.com.br/fracasso.jsp;https://dominio.com.br/cancelamento.jsp;1|1125|2000|5|5|00000001 ``` ### Two Authorizers | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZERS** | | | **AUTHORIZER 1** | | | `Authorizer` | Visa [1] | | `Routing` | Cielo [1125] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | `Cielo affiliation code` | 00000001 | | **AUTHORIZER 2** | | | `Authorizer` | Mastercard [2] | | `Routing` | Stone WS [409] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `salesAffiliationKey` | chaveDeIdentificacaoDaLojaNaStone | | Field | Value | | -------------------------------------- | ---------------------------------------- | | `Merchant Code` | cod_loja_comp | | `Fantasy Name` | Loja dos Computadores | | `Corporate Name` | Loja dos Computadores LTDA. | | `CNPJ` | 11137051003444 | | `Address` | R. dos Computadores, 3032 | | `City` | S Joao do Sul | | `State` | SC | | `Zip Code` | 07022000 | | `Phone` | 12341234 | | `E-mail` | email@email.com | | `Domain` | https://dominio.com.br | | `Status Notification URL` | https://dominio.com.br/avisoStatus.jsp | | `Transaction Authenticity URL` | https://dominio.com.br/autenticidade.jsp | | `Storage URL` | https://dominio.com.br/envioHash.jsp | | `Success URL` | https://dominio.com.br/sucesso.jsp | | `Failure URL` | http://dominio.com.br/fracasso.jsp | | `Cancellation URL` | https://dominio.com.br/cancelamento.jsp | | **AUTHORIZERS** | | | **AUTHORIZER 1** | | | `Authorizer` | Visa [1] | | `Minimum value of each installment` | 20 reais [2000] | | `Maximum installment with interest` | 5 installments [5] | | `Maximum installment without interest` | 5 installments [5] | | **AUTHORIZER 2** | | | `Authorizer` | Mastercard [2] | | `Routing` | Stone WS [409] | | `Minimum value of each installment` | 10 reals [1000] | | `Maximum installment with interest` | 10 installments [10] | | `Maximum installment without interest` | 10 installments [10] | | `salesAffiliationKey` | chaveDeIdentificacaoDaLojaNaStone | ```plaintext cod_loja_comp;Loja dos Computadores;Loja dos ComputadoresLTDA.;11137051003444;R. dos Computadores,3032;S Joao doSul;SC;07022000;12341234;email@email.com.br;https://dominio.com.br;https://dominio.com.br/avisoStatus.jsp;https://dominio.com.br/autenticidade.jsp;https://dominio.com.br/envioHash.jsp;https://dominio.com.br/sucesso.jsp;http://dominio.com.br/fracasso.jsp;https://dominio.com.br/cancelamento.jsp;1|1125|2000|5|5|00000001;2|405|1000|10|10|salesAffiliationKey :chaveDeIdentificacaoDaLojaNaStone ``` ## Authorizer Code Examples List of some allowed authorizers on the importation: | Authorizer | Code | | ----------------------------- | ---- | | `Visa` | 1 | | `Mastercard` | 2 | | `Amex` | 3 | | `Hipercard / Hiper` | 5 | | `Aura` | 6 | | `Diners` | 33 | | `Elo` | 41 | | `JCB` | 43 | | `Discover` | 44 | | `Visa Electron` | 221 | | `Maestro / Mastercard débito` | 286 | ## Routing Examples List of some allowed routings on the importation: | Routing | Code | | -------------------- | ---- | | `Cielo` | 1125 | | `Rede (Redecard)` | 1005 | | `Stone WS` | 409 | | `Cielo EC` | 201 | | `e-Rede` | 1200 | | `Global Payments WS` | 408 | | `Getnet WS` | 407 |