Merchant creation service

After getting the token or signature in the previous step, the virtual store must send the data of the merchant to be created on Carat Portal and SiTef (if necessary).

Attention:

Registered merchants will have the same personalization settings as the registering merchant, such as their logo, CSS and JS.

Call details#

  • Resource: /v1/merchants
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on Carat Portal. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on Carat Portal. The production and certification keys will be different.< 80 ANYES
tokenToken obtained in the previous step. Learn more.= 66 ANNO
Content-TypeMust be sent with the value application/json.= 15 ANYES

Attention:

During merchant registration, the settings related to the use of 3DS and anti-fraud are automatically replicated from the registering merchant.

Example#

Request:

To use this example, don't forget to define the variable {{url}} with the value
esitef-homologacao.softwareexpress.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/merchants"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "token: 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--data-binary
{
"cnpj":"123123123123",
"fantasy_name":"Teste de Loja",
"corporate_name":"Testes de Loja Ltda.",
"mcc":"1234",
"threeds_enabled":"true",
"threeds_payment_link_authentication":"1",
"automatic_threeds_minimum_value" : "30000",
"automatic_threeds_maximum_value" : "99999",
"automatic_antifraud_minimum_value" : "100000",
"automatic_antifraud_maximum_value" : "999999",
"antifraud_over_threeds" : "false",
"soft_descriptor":{
"fantasy_name":"Sub-comércio da Loja",
"country":"BR",
"id":"123456"
},
"subacquirer_group":{
"create":"true",
"id":"123456",
"cnpj":"12345678901234"
},
"domain":"www.testeloja.com",
"address":"Rua do Teste, 123",
"city":"São Teste",
"state":"SP",
"zip_code":"12345678",
"phone_number":"11912341234",
"email":"testeloja@teste.com",
"transactional_urls":{
"status":"https://www.testeloja.com/status",
"authenticity":"https://www.testeloja.com/autent",
"hash":"https://www.testeloja.com/hash"
},
"return_urls":{
"success":"https://www.testeloja.com/sucesso",
"failure":"https://www.testeloja.com/fracasso",
"cancel":"https://www.testeloja.com/cancel"
},
"permissions":{
"payment":"true",
"pre_authorization":"false",
"recharge":"false",
"risk_analysis":"true",
"schedule":"true",
"iata":"false",
"card_store":"false",
"payment_link":"true"
},
"establishments":[
{
"code":"00000000123",
"routing_id":"1125",
"subacquirer_group_id":"123456"
},
{
"code":"00000000321",
"routing_id":"1005"
}
],
"authorizers":[
{
"id":"1",
"routing_id":"1125",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"enable_subacquirer_group":"true",
"acquirer_merchant_id":"11111",
"cvv_mandatory":"true"
},
{
"id":"2",
"routing_id":"201",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"parameters":{
"merchantId":"8h37e9e23oe",
"merchantKey":"b9f374t5983t745f873tb45f93b4f2293b485ft34"
},
"acquirer_merchant_id":"22222"
}
]
}
--verbose

To use this example, don't forget to define the variable {{url}} with the value
esitef-homologacao.softwareexpress.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/merchants"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "Authorization: Bearer YYYYYYY"
--data-binary
{
"cnpj":"123123123123",
"fantasy_name":"Teste de Loja",
"corporate_name":"Testes de Loja Ltda.",
"mcc":"1234",
"threeds_enabled":"true",
"threeds_payment_link_authentication":"1",
"automatic_threeds_minimum_value" : "30000",
"automatic_threeds_maximum_value" : "99999",
"automatic_antifraud_minimum_value" : "100000",
"automatic_antifraud_maximum_value" : "999999",
"antifraud_over_threeds" : "false",
"soft_descriptor":{
"fantasy_name":"Sub-comércio da Loja",
"country":"BR",
"id":"123456"
},
"subacquirer_group":{
"create":"true",
"id":"123456",
"cnpj":"12345678901234"
},
"domain":"www.testeloja.com",
"address":"Rua do Teste, 123",
"city":"São Teste",
"state":"SP",
"zip_code":"12345678",
"phone_number":"11912341234",
"email":"testeloja@teste.com",
"transactional_urls":{
"status":"https://www.testeloja.com/status",
"authenticity":"https://www.testeloja.com/autent",
"hash":"https://www.testeloja.com/hash"
},
"return_urls":{
"success":"https://www.testeloja.com/sucesso",
"failure":"https://www.testeloja.com/fracasso",
"cancel":"https://www.testeloja.com/cancel"
},
"permissions":{
"payment":"true",
"pre_authorization":"false",
"recharge":"false",
"risk_analysis":"true",
"schedule":"true",
"iata":"false",
"card_store":"false",
"payment_link":"true"
},
"establishments":[
{
"code":"00000000123",
"routing_id":"1125",
"subacquirer_group_id":"123456"
},
{
"code":"00000000321",
"routing_id":"1005"
}
],
"authorizers":[
{
"id":"1",
"routing_id":"1125",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"enable_subacquirer_group":"true",
"acquirer_merchant_id":"11111",
"cvv_mandatory":"true",
},
{
"id":"2",
"routing_id":"201",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"parameters":{
"merchantId":"8h37e9e23oe",
"merchantKey":"b9f374t5983t745f873tb45f93b4f2293b485ft34"
},
"acquirer_merchant_id":"22222"
}
]
}
--verbose

Response:

{
"id": "qereIoinsd3d",
"key": "9B71234TB12D938T9384TDB294T923D412T938D1293D4B923D",
"response_code": "0",
"response_message": "OK",
"authorizer_response_code": "0",
"authorizer_response_message": "OK"
}

Request parameters#

The table below describes the parameters of the merchant creation service:

ParameterDescriptionFormatMandatory
cnpjCNPJ or CPF of the merchant. Numbers only.= 14 NYES
force_sitef_merchant_creationIf the value true is informed, it activates the alternative generation of company numbers, allowing more than one company to be registered for the same CNPJ/CPF. If not informed, it assumes false, that is, it uses the standard algorithm for generating company code, which guarantees only one company for each CNPJ/CPF. Send true or false.< 5 ANNO
fantasy_nameFantasy name of the merchant.< 250 ANYES
corporate_nameCorporate name of the merchant.< 250 ANYES
domainDomain (site) of the merchant.< 65 ANNO
addressAddress of the merchant.< 30 ANNO
cityCity of the merchant.< 13 ANNO
stateState of the merchant (abbreviation).= 2 ANNO
zip_codeZip code of the merchant.< 9 ANNO
phone_numberPhone number of the merchant.< 30 ANNO
emailE-mail address of the merchant.< 100 ANNO
mccMerchant Category Code - code indicating the category of the establishment (used on the anti-fraud registration). If the field threeds_enabled=true, mcc becomes mandatory. If the value's length has less than 4 digits, zeros will be added to the left of the number until it reaches size 4.= 4 NNO
threeds_enabledEnables the merchant to integrate with the 3DS Server and performing the necessary configurations on Carat Portal, send true or false. Learn more.< 5 ANNO
threeds_payment_link_authenticationDefault authentication type that will be displayed when generating the payment link.
  • 0 = No authentication
  • 1 = Enable the use of 3DS and if the 3DS server does not support the flag or fails to authenticate, payment will be denied.
  • 2 = Enable the use of 3DS only with flags supported by the 3DS server. If the 3DS server does not support the flag, authentication is not performed. If the flag is supported and authentication is denied, payment will be denied.
  • 3 = Enable the use of 3DS and if authentication fails, payment will not be denied in authentication.
= 1 NNO
automatic_threeds_minimum_valueIndicates the minimum amount in cents for a transaction to automatically enable the 3DS. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_threeds_maximum_valueIndicates the maximum amount in cents for a transaction to automatically enable the 3DS. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_antifraud_minimum_valueIndicates the minimum amount in cents for a transaction to automatically enable Anti-Fraud. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_antifraud_maximum_valueIndicates the maximum amount in cents of a transaction to automatically enable Anti-Fraud. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
antifraud_over_threedsFlag that turns on the functionality to activate the anti-fraud automatically in case of error or denied authentication using the 3DS Server integrated with Payment Online< 5 ANNO
soft_descriptorSubmerchant data.
idSubmerchant ID< 22 ANNO
countrySubmerchant country. ISO 3166-1 numeric code.= 3 NNO
fantasy_nameSubmerchant fantasy name< 22 ANNO
subacquirer_groupSubacquirer group data.
createFlag indicating whether the subacquirer group should be created< 5 T/FNO
idSubacquirer group ID< 6 ANNO
cnpjSubacquirer group CNPJ= 14 NYES, if the field subacquirer_group.create is true
establishmentsData of the establishments to be created on SiTef.
codeEstablishment code (logical number) to be created on SiTef= 11 NNO
routing_idAcquirer/routing ID on Carat Portal< 4 NNO
subacquirer_group_idSubacquirer group ID. Should be sent in case the establishment must be created for the group instead of the merchant.= 6 NNO
extra_dataAdditional establishment information< 32 ANNO
transactional_urlsURLs used on transactional flows.
statusURL for receiving status notifications.< 500 ANNO
authenticityURL for receiving authenticity POSTs.< 500 ANNO
hashURL for receiving stored card hash/token.< 500 ANNO
return_urlsHTML payment return URLs.
successSuccess return URL.< 500 ANNO
failureFailure return URL.< 500 ANNO
cancelCancel return URL.< 500 ANNO
permissionsTransactional permissions to be attributed to the merchant. Send the value true to enable the desired functionality.
paymentPayment permission.< 5 ANNO
pre_authorizationPre-authorization permission.< 5 ANNO
rechargeRecharge permission.< 5 ANNO
risk_analysisRisk analysis permission.< 5 ANNO
scheduleSchedule permission.< 5 ANNO
iataIATA permission.< 5 ANNO
card_storeCard store permission.< 5 ANNO
payment_linkPayment link permission.< 5 ANNO
authorizers[]Authorizers to be registered to the merchant. The presence of a SiTef routing indicates that a SiTef merchant must also be created.
idAuthorizer ID on Carat Portal. Learn more.< 4 NYES
routing_idRouting/acquirer ID on Carat Portal. Learn more.< 4 NYES
min_installments_amountMinimum installment amount for HTML transactions. Default value: 1000< 12 NNO
max_installments_without_interestMaximum installments without interest for HTML transactions. Default value: 3< 2 NNO
max_installments_with_interestMaximum installments with interest for HTML transactions. Default value: 12< 2 NNO
enable_subacquirer_groupEnable subacquirer group usage for the authorizer. Send true to enable or false to disable.< 5 T/FNO
acquirer_merchant_idMerchant identifier designated by the acquirer. If threeds_enabled = true you must send at least one acquirer_merchant_id< 35 ANNO
cvv_mandatoryEnable mandatory card security code field. Send true to enable or false to disable.< 5 T/FNO
authorizers[].parametersSpecific routing parameters. Learn more.

Routing/acquirer codes#

IDRouting
201Cielo e-Commerce
202e-Rede.REST
407Getnet WS
408Global Payments WS
409Stone WS
1005Rede via SiTef
1181Getnet Lac via SiTef
1125Cielo via SiTef
1206Global Payments via SiTef
1229BIN via SiTef
1265Stone via SiTef
1296Safra via SiTef

Specific routing parameters#

These parameters must be sent in the authorizer[].parameters field depending on the chosen acquirer.

Cielo e-Commerce#

ParameterDescription
authorizers[].parametersSpecific routing parameters.
merchantIdMerchant identification on Cielo.
merchantKeyMerchant key on Cielo.

Getnet WS#

ParameterDescription
authorizers[].parametersSpecific routing parameters.
usernameAccess user.
passwordAccess password.
merchantIDEC code registered on Getnet.
terminalTerminal identification.
subMerchantIdSubmerchant ID.

Global Payments WS#

ParameterDescription
authorizers[].parametersSpecific routing parameters.
merchantCodeEstablishment number defined by Global Payments.
secretKeyMerchant secret key on Global Payments.
terminalTerminal number that will be defined by Global Payments.

Stone WS#

ParameterDescription
authorizers[].parametersSpecific routing parameters.
salesAffiliationKeyMerchant identification key on Stone.
subAdquirenciaHabilitadaSend true to enable sub-acquiring or false otherwise.

BIN via SiTef#

ParameterDescriptionFormat
authorizers[].parametersSpecific routing parameters.
subacquirerMerchantIdSubmerchant code.
establishmentsData of the establishments to be created on SiTef.
establishments.extra_dataTerminal code. Mandatory field for integration with the Bin acquirer.= 8 AN

e-Rede#

ParameterDescription
authorizers[].parametersSpecific routing parameters.
filiationMerchant filiation code on e-Rede.
tokenMerchant public key on e-Rede.

Check more details about "e-Rede routing")

Registering merchants with anti-fraud#

It's possible to automatically register new merchants with the following anti-fraud solutions: Fraud, ClearSale, CyberSource and Konduto. To do it, the merchant must contact the risk analysis institution and request the necessary credentials. Then, the merchant must pass a set of MCC's (Merchant Category Code) for each registered credential to the Carat Portal Production team, which will register this data. These MCC's will be mapped for each credential and these values ​​will be used on the registration of each merchant. Once this pre-registration is done, it will be possible to perform the anti-fraud registration automatically using the merchant creation API.

Attention:

  • It's required to activate the anti-fraud permission (risk_analysis) on the merchant creation call.
  • Only the merchant creation service performs the automatic anti-fraud registration.

Response parameters#

If successful, the HTTP response code will be 201. Any other code must be interpreted as an error. The table below describes the response parameters of the merchant creation service:

ParameterDescriptionFormat
response_codeCarat Portal response code. Any code different from 0 means failure.< 4 N
response_messageCarat Portal response message.< 500 AN
authorizer_response_codeAuthorizer response code.< 4 N
authorizer_response_messageAuthorizer response message.< 500 AN
idCode of the created merchant. Automatically generated (note: uppercase and lowercase characters are differentiated in the system).< 15 AN
keyKey of the created merchant.< 80 AN