Merchant editing service

After getting the token or signature in the previous step, the virtual store can consume the merchant editing service. For this, only the data to be altered must be sent.

Call details#

  • Resource: /v1/merchants/{id}
  • HTTP Method: PUT
  • 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 on the token creation service. Learn more.= 66 ANNO
Content-TypeMust be sent with the value application/json.= 15 ANYES
AuthorizationThe merchant's signature must be sent in the format Bearer {signature}. Exemple: Bearer JHVGytfdgauygdauiw78264284527852897hagdg.< 2000 ANNO

Example using token#

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

curl
--request PUT "https://{{url}}/e-sitef/api/v1/merchants/qereIoinsd3d"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "token: 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--data-binary
{
"fantasy_name":"Teste de Loja",
"corporate_name":"Testes de Loja Ltda.",
"merchant_status":"A",
"subacquirer_group":{
"create":"true",
"id":"123456",
"cnpj":"12345678901234"
},
"domain":"www.testeloja.com",
"cnpj":"123123123123",
"address":"Rua do Teste, 123",
"city":"São Teste",
"state":"SP",
"zip_code":"12345678",
"phone_number":"11912341234",
"email":"testeloja@teste.com",
"mcc":"1234",
"threeds_payment_link_authentication": "1",
"automatic_threeds_minimum_value" : "9999999",
"automatic_threeds_maximum_value" : "100000",
"automatic_antifraud_minimum_value" : "0",
"automatic_antifraud_maximum_value" : "99999",
"antifraud_over_threeds" : "false",
"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": "12345"
},
{
"id":"2",
"routing_id":"1005",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"enable_subacquirer_group":"false",
"acquirer_merchant_id": "11111",
"cvv_mandatory":"true"
}
]
}
--verbose

Example using signature#

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

curl
--request PUT "https://{{url}}/e-sitef/api/v1/merchants/qereIoinsd3d"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "Authorization: Bearer YYYYYYY"
--data-binary
{
"fantasy_name":"Teste de Loja",
"corporate_name":"Testes de Loja Ltda.",
"merchant_status":"A",
"subacquirer_group":{
"create":"true",
"id":"123456",
"cnpj":"12345678901234"
},
"domain":"www.testeloja.com",
"cnpj":"123123123123",
"address":"Rua do Teste, 123",
"city":"São Teste",
"state":"SP",
"zip_code":"12345678",
"phone_number":"11912341234",
"email":"testeloja@teste.com",
"mcc":"1234",
"threeds_payment_link_authentication": "1",
"automatic_threeds_minimum_value" : "9999999",
"automatic_threeds_maximum_value" : "100000",
"automatic_antifraud_minimum_value" : "0",
"automatic_antifraud_maximum_value" : "99999",
"antifraud_over_threeds" : "false",
"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": "12345",
"cvv_mandatory":"true"
},
{
"id":"2",
"routing_id":"1005",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"enable_subacquirer_group":"false",
"acquirer_merchant_id": "11111"
}
]
}
--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
{id}Code of the merchant to be created. Sent in the URL.< 15 ANYES
fantasy_nameFantasy name of the merchant.< 250 ANNO
corporate_nameCorporate name of the merchant.< 250 ANNO
merchant_statusMerchant's current status. Can take the following values: A = Active I = Inactive= 1 ANNO
domainDomain (site) of the merchant.< 65 ANNO
cnpjCNPJ or CPF of the merchant. Numbers only.< 14 NNO
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.= 4 NNO
threeds_payment_link_authenticationDefault authentication type that will be displayed when generating the payment link.
  • 0 = No authentication
  • 1 = Enable the use of 3DS. But if the 3DS server does not support the flag or fails to perform authentication, payment will be denied.
  • 2 = Enable the use of 3DS. However, if the 3DS server does not support the flag, it does not do authentication with 3DS server. If the flag is supported and authentication is denied, the payment will be denied.
  • 3 = Enable the use of 3DS. However, even if authentication fails, payment will not be denied in authentication.
= 1 NNO
automatic_threeds_minimum_valueMinimum value in cents for the 3DS to be automatically enabled. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_threeds_maximum_valueMaximum value in cents for the 3DS to be automatically enabled. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_antifraud_minimum_valueMinimum value in cents for the Anti-Fraud to be automatically enabled. It will only be possible to edit this value if Anti-Fraud is pre-configured. Attention: intervals that allow the use of 3ds and anti-fraud together must not be used.< 12 NNO
automatic_antifraud_maximum_valueMaximum value in cents for the Anti-Fraud to be automatically enabled. It will only be possible to edit this value if Anti-Fraud is pre-configured. 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.
idAuthorizer ID on Carat Portal. Learn more.< 4 NYES
routing_idRouting/acquirer ID on Carat Portal. Learn more.< 4 NYES
statusSend A to activate or I to inactivate the authorizer.< 1 ANNO
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.

Response parameters#

If successful, the HTTP response code will be 200. Any other code must be interpreted as an error. The table below describes the response parameters of the merchant editing 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.< 15 AN
keyKey of the created merchant.< 80 AN