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:
Parameter | Description | Format | Mandatory |
---|---|---|---|
merchant_id | Merchant code on e-SiTef. The production and certification codes will be different. | < 15 AN | YES |
merchant_key | Merchant authentication key on e-SiTef. The production and certification keys will be different. | < 80 AN | YES |
token | Token obtained on the token creation service. Learn more. | = 66 AN | NO |
Content-Type | Must be sent with the value application/json . | = 15 AN | YES |
Authorization | The merchant's signature must be sent in the format Bearer {signature} . Exemple: Bearer JHVGytfdgauygdauiw78264284527852897hagdg . | < 2000 AN | NO |
Example
curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/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",
"mcc":"1234",
"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",
"cnpj":"123123123123",
"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"
},
{
"id":"2",
"routing_id":"201",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"parameters":{
"merchantId":"8h37e9e23oe",
"merchantKey":"b9f374t5983t745f873tb45f93b4f2293b485ft34"
}
}
]
}
--verbose
curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/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",
"mcc":"1234",
"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",
"cnpj":"123123123123",
"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"
},
{
"id":"2",
"routing_id":"201",
"min_installments_amount":"100",
"max_installments_without_interest":"1",
"max_installments_with_interest":"12",
"parameters":{
"merchantId":"8h37e9e23oe",
"merchantKey":"b9f374t5983t745f873tb45f93b4f2293b485ft34"
}
}
]
}
--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:
Parameter | Description | Format | Mandatory |
---|---|---|---|
{id} | Code of the merchant to be created. Sent in the URL. | < 15 AN | YES |
fantasy_name | Fantasy name of the merchant. | < 250 AN | NO |
corporate_name | Corporate name of the merchant. | < 250 AN | NO |
merchant_status | Merchant's current status. Can take the following values:
| = 1 AN | NO |
domain | Domain (site) of the merchant. | < 65 AN | NO |
cnpj | CNPJ or CPF of the merchant. Numbers only. | < 14 N | NO |
address | Address of the merchant. | < 30 AN | NO |
city | City of the merchant. | < 13 AN | NO |
state | State of the merchant (abbreviation). | = 2 AN | NO |
zip_code | Zip code of the merchant. | < 9 AN | NO |
phone_number | Phone number of the merchant. | < 30 AN | NO |
email | E-mail address of the merchant. | < 100 AN | NO |
mcc | Merchant Category Code. | = 4 N | NO |
soft_descriptor | Submerchant data. | ||
id | Submerchant ID | < 22 AN | NO |
country | Submerchant country. ISO 3166-1 numeric code. | = 3 N | NO |
fantasy_name | Submerchant fantasy name | < 22 AN | NO |
subacquirer_group | Subacquirer group data. | ||
create | Flag indicating whether the subacquirer group should be created | < 5 T/F | NO |
id | Subacquirer group ID | < 6 AN | NO |
cnpj | Subacquirer group CNPJ | = 14 N | YES, if the field subacquirer_group.create is true |
establishments | Data of the establishments to be created on SiTef. | ||
code | Establishment code (logical number) to be created on SiTef | = 11 N | NO |
routing_id | Acquirer/routing ID on e-SiTef | < 4 N | NO |
subacquirer_group_id | Subacquirer group ID. Should be sent in case the establishment must be created for the group instead of the merchant. | = 6 N | NO |
extra_data | Additional establishment information | < 32 AN | NO |
transactional_urls | URLs used on transactional flows. | ||
status | URL for receiving status notifications. | < 500 AN | NO |
authenticity | URL for receiving authenticity POSTs. | < 500 AN | NO |
hash | URL for receiving stored card hash/token. | < 500 AN | NO |
return_urls | HTML payment return URLs. | ||
success | Success return URL. | < 500 AN | NO |
failure | Failure return URL. | < 500 AN | NO |
cancel | Cancel return URL. | < 500 AN | NO |
permissions | Transactional permissions to be attributed to the merchant. Send the value true to enable the desired functionality. | ||
payment | Payment permission. | < 5 AN | NO |
pre_authorization | Pre-authorization permission. | < 5 AN | NO |
recharge | Recharge permission. | < 5 AN | NO |
risk_analysis | Risk analysis permission. | < 5 AN | NO |
schedule | Schedule permission. | < 5 AN | NO |
iata | IATA permission. | < 5 AN | NO |
card_store | Card store permission. | < 5 AN | NO |
payment_link | Payment link permission. | < 5 AN | NO |
authorizers[] | Authorizers to be registered to the merchant. | ||
id | Authorizer ID on e-SiTef. Learn more. | < 4 N | YES |
routing_id | Routing/acquirer ID on e-SiTef. Learn more. | < 4 N | YES |
status | Send A to activate or I to inactivate the authorizer. | < 1 AN | NO |
min_installments_amount | Minimum installment amount for HTML transactions. Default value: 1000 | < 12 N | NO |
max_installments_without_interest | Maximum installments without interest for HTML transactions. Default value: 3 | < 2 N | NO |
max_installments_with_interest | Maximum installments with interest for HTML transactions. Default value: 12 | < 2 N | NO |
enable_subacquirer_group | Enable subacquirer group usage for the authorizer. Send true to enable or false to disable. | < 5 T/F | NO |
authorizers[].parameters | Specific 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:
Parameter | Description | Format |
---|---|---|
response_code | e-SiTef response code. Any code different from 0 means failure. | < 4 N |
response_message | e-SiTef response message. | < 500 AN |
authorizer_response_code | Authorizer response code. | < 4 N |
authorizer_response_message | Authorizer response message. | < 500 AN |
id | Code of the created merchant. | < 15 AN |
key | Key of the created merchant. | < 80 AN |