ClearSale
Required credentials
As mentioned in "Overview - Required credentials", each institution has credentials that must be obtained for the integration. ClearSale's services demand credentials below:
- app_code (Merchant Code)
- entity_code - Merchant identification in ClearSale
IMPORTANT: The credentials above should be obtained from ClearSale. It is recommended to contact ClearSale and receive guidance on how to obtain the credentials. Then, the merchant should contact e-SiTef support and send the credentials to register in e-SiTef.
Manual review
As mentioned in "manual review flow", ClearSale is one of the anti-fraud institutions that has a manual review flow. Then, confirm that the registration of the manual review warning URLs are properly configured in the ClearSale. In case of doubt, contact our support.
Parâmetros antifraude da ClearSale
Below is the list of anti-fraud parameters processed by ClearSale. Some parameters have different treatments depending on the institution and the "Additional detail" column that specifies ClearSale's treatment. For details of each parameter, see the anti-fraud parameters list
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
b2b_b2c | Order.B2B_B2C | - |
item_amount | Order.TotalItems | - |
total_order_amount | Order.TotalOrder | - |
delivery_time_cd | Order.DeliveryTimeCD | - |
qty_payment_types | Order.QtyPaymentTypes | - |
ip (deprecated) | Order.IP | - |
gift | Order.Gift | - |
gift_message | Order.GiftMessage | - |
obs | Order.Obs | - |
sla_custom | Order.SlaCustom | - |
origin | Order.Origin | - |
reservation_date | Order.ReservationDate | - |
nationality | Order.Nationality | - |
list_type_id | Order.ListTypeID | - |
list_id | Order.ListID | - |
sequential | Payment.Sequential | - |
interest | Payment.Interest | - |
interest_value | Payment.InterestValue | - |
shipping_type | Order.ShippingType | - |
items | Object json Array (Learn more) | |
payer | Object json (Learn more) | |
billing_data | Object json (Learn more) | |
shipment | Object json Array (Learn more) | |
passengers | Object json Array (Learn more) | |
connections | Object json Array (Learn more) | |
hotel_reservations | Object json Array (Learn more) | |
purchase_data | Object json (Learn more) |
Object items
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
id | Item.ID | - |
title | Item.Name | - |
quantity | Item.Qty | - |
unit_price | Item.ItemValue | - |
category_id | Item.CategoryID | Optional and numeric with size 1 |
category_name | Item.CategoryName | - |
gift | Item.Gift | - |
Object payer
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
name | Payment.Name | Optional and with format <150 A |
city | Payment.Address.City | - |
address_street_complement | Payment.Address.Comp | - |
address_country | Payment.Address.Country | - |
address_county | Payment.Address.County | - |
address_street_number | Payment.Address.Number | - |
state | Payment.Address.State | - |
address_street_name | Payment.Address.Street | - |
address_zip_code | Payment.Address.ZipCode | - |
address_reference | Payment.Address.Reference | - |
legal_document | Payment.LegalDocument | - |
Object billing_data
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
cliente_id | BillingData.ID | - |
person | BillingData.Type | - |
cnpj_cpf | BillingData.LegalDocument1 | - |
identification_number | BillingData.LegalDocument2 | - |
name | BillingData.Name | - |
birth_date | BillingData.BirthDate | - |
email | BillingData.Email | - |
gender | BillingData.Gender | - |
address | Object json (Learn more) | |
phones | Object json Array (Learn more) | |
documents | Object json Array (Learn more) |
Object address of billing_data
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
street_name | BillingData.Address.Street | - |
street_number | BillingData.Address.Number | - |
complement | BillingData.Address.Comp | - |
county | BillingData.Address.County | - |
city | BillingData.Address.City | - |
state | BillingData.Address.State | - |
country | BillingData.Address.Country | - |
zip_code | BillingData.Address.ZipCode | - |
reference | BillingData.Address.Reference | - |
Object phones of billing_data
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
type | BillingData.Phones.Phone.Type | - |
ddi | BillingData. Phones. Phone.DDI | - |
ddd | BillingData. Phones. Phone.DDD | - |
number | BillingData. Phones. Phone.Number | - |
extension | BillingData. Phones. Phone.Extension | - |
Object documents of billing_data
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
type | BillingData.Type | Allowed values: CPF or CNPJ |
Object shipment
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
id | ShippingData.ID | - |
cost | Order.ShippingPrice | - |
type | ShippingData.Type | - |
legal_document1 | ShippingData.LegalDocument1 | - |
legal_document2 | ShippingData.LegalDocument2 | - |
name | ShippingData.Name | - |
birth_date | ShippingData.BirthDate | - |
email | ShippingData.Email | - |
gender | ShippingData.Gender | - |
receiver_address | Object json (Learn more) | |
phones | Object json Array (Learn more) |
Object receiver_address of shipment
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
street_name | ShippingData.Address.Street | - |
street_number | ShippingData.Address.Number | - |
complement | ShippingData.Address.Comp | - |
county | ShippingData.Address.County | - |
city | ShippingData.Address.City | - |
state | ShippingData.Address.State | - |
country | ShippingData.Address.Country | - |
zip_code | ShippingData.Address.ZipCode | - |
Object phones of shipment
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
type | ShippingData.Phones.Phone.Type | - |
ddi | ShippingData.Phones.Phone.DDI | - |
ddd | ShippingData.Phones.Phone.DDD | - |
number | ShippingData.Phones.Phone.Number | - |
extension | ShippingData.Phones.Phone.Extension | - |
Object passengers
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
name | Passenger.Name | Preencher com o nome completo |
frequente_flyer_card | Passenger.FrequentFlyerCard | - |
legal_document_type | Passenger.LegalDocumentType | - |
legal_document | Passenger.LegalDocument | - |
birth_date | Passenger.BirthDate | - |
Object connections
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
company | Connection.Compay | - |
flight_number | Connection.FlightNumber | - |
flight_date | Connection.FlightDate | - |
class | Connection.Class | - |
from | Connection.From | - |
to | Connection.To | - |
departure_date | Connection.DepartureDate | - |
arrival_date | Connection.ArrivalDate | - |
Object hotel_reservations
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
hotel | HotelReservation.Hotel | - |
city | HotelReservation.City | - |
state | HotelReservation.State | - |
country | HotelReservation.Country | - |
reservation_date | HotelReservation.ReservationDate | - |
reservation_expiration_date | HotelReservation.ReservationExpirationDate | - |
checkin_date | HotelReservation.CheckInDate | - |
checkout_date | HotelReservation.CheckOutDate | - |
Object purchase_data
| Property e-SiTef | Property ClearSale | Additional detail |
|---|---|---|
last_date_inserted_mail | PurchaseInformationData.LastDateInsertedMail | - |
last_date_change_password | PurchaseInformationData.LastDateChangePassword | - |
last_date_change_phone | PurchaseInformationData.LastDateChangePhone | - |
last_date_change_mobile_phone | PurchaseInformationData.LasteDateChangeMobilePhone | - |
last_date_inserted_address | PurchaseInformationData.LastDateInsertedAddress | - |
purchase_logged | PurchaseInformationData.PurchaseLogged | - |
purchase_logged_with_facebook | PurchaseInformationData.PurchaseLoggedWithFacebook | - |
Example
Example of a request with basic parameters to begin a risk analysis payment transaction. Learn more payment parameters.
{
"merchant_id": "LOJATESTE",
"merchant_usn": "9876",
"order_id": "111",
"redirect": "M",
"authorizer_id": "",
"amount": "1000",
"installments": "",
"installment_type": "",
"style": "N",
"store_card": "",
"soft_descriptor": "",
"authenticate": "0",
"transaction_type": "payment",
"additional_data": {
"anti_fraud": "enabled_after_auth",
"extra_info": "",
"currency": "BRL",
"item_amount": "12343",
"total_order_amount": "13412",
"interest": "10.3",
"interest_value": "100",
"items": [
{
"id": "1",
"title": "bola 1",
"quantity": "1",
"unit_price": "50000",
"currency": "BRL",
"picture_url": "http://sportv.globo.com/platb/files/1103/2011/08/bola_futebol.gif",
"category_id": "others",
"description": "bola para jogar 1",
"weight": "200",
"shipping_cost": "1000"
},
{
"id": "2",
"title": "bola 2",
"quantity": "2",
"unit_price": "25000",
"currency": "BRL",
"picture_url": "http://sportv.globo.com/platb/files/1103/2011/08/bola_futebol.gif",
"category_id": "others",
"description": "bola para jogar 2",
"weight": "200",
"shipping_cost": "1000"
}
],
"payer": {
"name": "Joaquim",
"surname": "Severino",
"email": "js@softexpress.com.br",
"date_created": "2014-03-12T06:55:17.413-04:00",
"phone_area_code": "11",
"phone_number": "11111111",
"identification_type": "CPF",
"identification_number": "09719224703",
"address_street_name": "Rua Jose Ninguem",
"address_street_number": "11",
"address_street_complement": "ap 12",
"address_zip_code": "01230120",
"born_date": "12/12/1900",
"city": "Sao Paulo",
"state": "SP",
"address_country": "Brazil",
"address_county": "Campos Eliseos"
},
"purchase_data": {
"purchase_logged_with_facebook": "1",
"purchase_logged": "1",
"last_date_inserted_address": "2016-02-19T10:00:00",
"last_date_change_phone": "2016-02-19T10:00:00",
"last_date_change_password": "2016-02-19T10:00:00",
"last_date_inserted_mail": "2016-02-19T10:00:00",
"last_date_change_mobile_phone": "2016-02-19T10:00:00"
},
"billing_data": {
"phones": [
{
"number": "123123123",
"ddd": "11",
"ddi": "34",
"extension": "1234",
"type": "0"
}
],
"address": {
"zip_code": "02932900",
"street_number": "123",
"street_name": "rua legal",
"floor": "1",
"apartment": "1200",
"complement": "lala",
"city": "sao paulo",
"state": "SP",
"country": "Brazil",
"county": "jardim lala",
"reference": "lalelo"
},
"email": "email@gmail.com",
"birth_date": "1990-02-19T10:00:00",
"name": "John",
"identification_number": "48515484755",
"cnpj_cpf": "54861548806",
"person": "1",
"client_id": "123",
"gender": "M"
},
"shipment": {
"id": "98765432",
"cost": "2000",
"type": "1",
"name": "Joao",
"legal_document1": "1092384",
"receiver_address": {
"zip_code": "12345678",
"street_number": "Rua of Exemplo",
"street_name": "123",
"floor": "3",
"apartment": "901",
"city": "São Paulo",
"complement": "Sobreloja 3",
"country": "brazil",
"district": "Jardim of Exemplo",
"state": "SP",
"county": "jardins"
},
"phones": [
{
"number": "123123123",
"ddd": "11",
"ddi": "34",
"extension": "1234",
"type": "0"
}
]
}
}
}
ATTENTION: Pending transactions can be confirmed or undone by expired time. Learn more.
e-SiTef considers that ClearSale
Paymenthas the data of the user making the purchase andBillingDatarefers to the data of the cardholder. Also, consider that the order e-mail is the buyer's e-mail and the order date is the date of creation of the payment transaction.
Response Codes
As explained in the chapter "Risk analysis response", the codes below are ClearSale's specific responses.
| Code | Description | Resend |
|---|---|---|
00 | Transaction completed | N |
01 | Non-existent user | N |
02 | XML validation error | Y |
03 | XML transforming error | Y |
04 | Unexpected error | Y |
05 | Request already sent or not in reanalysis | Y |
06 | Input Plugin Error | Y |
07 | Output Plugin Error | N |