O Total ClearSale faz a gestão completa de fraudes, oferecendo a maior taxa de aprovação do mercado, redução do índice de chargeback e rápido tempo de resposta.

Clearsale – URL de envio dos dados

SANDBOX: https://testapi.maxipago.net/UniversalAPI/postXML

PRODUÇÃO: https://api.maxipago.net/UniversalAPI/postXML

Cenários de Teste

Clearsale – Device Fingerprint

O Device Fingerprint é um scprit em JavaScript que realiza coleta de dados e análise de informações públicas da máquina do usuário. Através desse recurso é possível identificar se uma máquina já é conhecida pela Clearsale e qual seu histórico de ações.

  • É necessário que o script esteja em somente uma única página do website.
  • É obrigatório a inclusão das tags do script ao final da página html, antes do fechamento da tag body. Pois o cumprimento desta recomendação garante que o website não sofra nenhum prejuízo de performance na integração.

O código que deverá ser incluído na página, antes da tag body, está abaixo:

<script>
    (function (a, b, c, d, e, f, g){
            a['CsdpObject'] = e; a[e] = a[e] || function () {
                    (a[e].q = a[e].q || []).push(arguments)
               },
               a[e].l = 1 * new Date(); f = b.createElement(c),
               g = b.getElementsByTagName(c)[0]; f.async = 1; f.src = d;
               g.parentNode.insertBefore(f, g)
    })
    (window, document, 'script', '//device.clearsale.com.br/p/fp.js','csdp');
    csdp('app', 'seu_app');
    csdp('sessionid', 'seu_id_de_sessao');
</script>

A Clearsale deverá informar qual valor deve ser utilizado na palavra sinalizada na variável “seu-app”. Ele serve para identificar o seu website em nosso sistema.

Já o valor a ser informador na variável “seu-id-de-sessao”, trata-se do id da sessão do usuário no website. Esta informação é extremamente relevante e deverá ser armazenada para um envio posterior.

Importante:

É preciso considerar que os parâmetros: <captureOnLowRisk> e <voidOnHighRisk> devem estar com a opção “Y“; somente com a opção flag “Y” as capturas e estornos serão feito de maneira automática. Caso estejam com a opção “N”, capturas e estornos somente serão realizamos por ação manual do lojista.

Exemplo de Requisição:

<?xml version="1.0" encoding="UTF-8"?>
<transaction-request>
    <version>3.1.1.15</version>
    <verification>
        <merchantId>********</merchantId>
        <merchantKey>********</merchantKey>
    </verification>
    <order>
        <auth>
            <referenceNum>ref00101010</referenceNum>
            <billing>
                <name>Fulano de Tal</name>
                <address>Rua Borboletas Psicodélicas, 100</address>
                <address2></address2>
                <district>Vila Guarani</district>
                <city>Sao Paulo</city>
                <state>SP</state>
                <postalcode>04313-110</postalcode>
                <country>BR</country>
                <phone>1199999999</phone>
                <email>fulanodetal@email.com</email>
                <id>2546582</id>
                <type>Individual</type>
                <gender>F</gender>
                <birthDate>1982-03-08</birthDate>
                <phones>
                    <phone>
                        <phoneType>Commercial</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>B101</phoneExtension>
                    </phone>
                    <phone>
                        <phoneType>Residential</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>B101</phoneExtension>
                    </phone>
                </phones>
                <documents>
                    <document>
                        <documentType>CPF</documentType>
                        <documentValue>********</documentValue>
                    </document>
                    <document>
                        <documentType>RG</documentType>
                        <documentValue>12546785-2Y</documentValue>
                    </document>
                    </documents>
                </billing>
                <shipping>
                    <name>fulano de Tal</name>
                    <address>Rua Avante, 123</address>
                    <district>Centro</district>
                    <city>São Paulo</city>
                    <state>SP</state>
                    <postalcode>12345000</postalcode>
                    <country>BR</country>
                    <id>5557</id>
                    <type>Individual</type>
                    <gender>F</gender>
                    <phones>
                        <phone>
                            <phoneType>Commercial</phoneType>
                            <phoneCountryCode>55</phoneCountryCode>
                            <phoneAreaCode>11</phoneAreaCode>
                            <phoneNumber>55554444</phoneNumber>
                            <phoneExtension>B101</phoneExtension>
                        </phone>
                        <phone>
                            <phoneType>Residential</phoneType>
                            <phoneCountryCode>55</phoneCountryCode>
                            <phoneAreaCode>11</phoneAreaCode>
                            <phoneNumber>55554444</phoneNumber>
                            <phoneExtension>B101</phoneExtension>
                        </phone>
                    </phones>
                    <documents>
                        <document>
                            <documentType>CPF</documentType>
                            <documentValue>********</documentValue>
                        </document>
                        <document>
                            <documentType>CTPS</documentType>
                            <documentValue>123456789-60Z</documentValue>
                        </document>
                    </documents>
                </shipping>
                <fraudDetails>
                    <fraudProcessorID>97</fraudProcessorID>
                    <captureOnLowRisk>Y</captureOnLowRisk>
                    <voidOnHighRisk>Y</voidOnHighRisk>
                    <fraudToken>q1234564987981alksf43549138</fraudToken>
                </fraudDetails>
                <transactionDetail>
                    <payType>
                        <creditCard>
                            <number>4111111111111111</number>
                            <expMonth>12</expMonth>
                            <expYear>2030</expYear>
                            <cvvNumber>123</cvvNumber>
                        </creditCard>
                    </payType>
                </transactionDetail>
                <payment>
                    <chargeTotal>2.00</chargeTotal>
                    <shippingTotal>0.00</shippingTotal>
                </payment>
                <itemList itemCount="2">
                    <item>
                        <itemIndex>1</itemIndex>
                        <itemProductCode>881287212</itemProductCode>
                        <itemDescription>200 técnicas culinárias essenciais</itemDescription>
                        <itemQuantity>1</itemQuantity>
                        <itemTotalAmount>1.00</itemTotalAmount>
                        <itemUnitCost>1.00</itemUnitCost>
                    </item>
                    <item>
                        <itemIndex>2</itemIndex>
                        <itemProductCode>84234832749</itemProductCode>
                        <itemDescription>Larousse Gastronomique</itemDescription>
                        <itemQuantity>1</itemQuantity>
                        <itemTotalAmount>1.00</itemTotalAmount>
                        <itemUnitCost>1.00</itemUnitCost>
                    </item>
                </itemList>
            </auth>
        </order>
    </transaction-request>

Exemplo de chamada – HotelReservation, AirTravelInformation e ItemList

A transação de fraude do t-Clearsale pode ser realizada utilizando ou não as tags “hotelReservation”, “airTravelInformation” e “itemList”, ou seja dá a flexibilidade que o estabelecimento necessita para transacionar os “n” tipos de negócio junto à maxiPago!.

<?xml version="1.0" encoding="UTF-8"?>
<transaction-request>
    <version>3.1.1.15</version>
    <verification>
        <merchantId>*******</merchantId>
        <merchantKey>*******</merchantKey>
    </verification>
    <order>
        <auth>
            <processorID>1</processorID>
            <referenceNum>lulisairtravel</referenceNum>
            <fraudCheck>Y</fraudCheck>
            <billing>
                <name>Fulano Pedroso</name>
                <address>Av. Republica do Chile, 230</address>
                <address2>16 Andar</address2>
                <district>Braz de Pina</district>
                <city>Rio de Janeiro</city>
                <state>RJ</state>
                <postalcode>20031170</postalcode>
                <country>BR</country>
                <phone>2140099400</phone>
                <email>fulanodetal@email.com</email>
                <id>2546582</id>
                <type>Individual</type>
                <gender>M</gender>
                <birthDate>1982-03-08</birthDate>
                <phones>
                    <phone>
                        <phoneType>Commercial</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>B101</phoneExtension>
                    </phone>
                    <phone>
                        <phoneType>Residential</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>B101</phoneExtension>
                    </phone>
                </phones>
                <documents>
                    <document>
                        <documentType>CPF</documentType>
                        <documentValue>52743822589</documentValue>
                    </document>
                    <document>
                        <documentType>RG</documentType>
                        <documentValue>12546785-2Y</documentValue>
                    </document>
                </documents>
            </billing>
            <shipping>
                <name>Fulano de Tal</name>
                <address>Rua de Teste, 123</address>
                <city>São Paulo</city>
                <state>SP</state>
                <district>Braz de Pina</district>
                <postalcode>12345000</postalcode>
                <country>BR</country>
                <id>5557</id>
                <type>Individual</type>
                <gender>F</gender>
                <phones>
                    <phone>
                        <phoneType>Commercial</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>101</phoneExtension>
                    </phone>
                    <phone>
                        <phoneType>Residential</phoneType>
                        <phoneCountryCode>55</phoneCountryCode>
                        <phoneAreaCode>11</phoneAreaCode>
                        <phoneNumber>55554444</phoneNumber>
                        <phoneExtension>101</phoneExtension>
                    </phone>
                </phones>
                <documents>
                    <document>
                        <documentType>CPF</documentType>
                        <documentValue>52743822589</documentValue>
                    </document>
                    <document>
                        <documentType>CTPS</documentType>
                        <documentValue>123456789-60</documentValue>
                    </document>
                </documents>
            </shipping>
            <fraudDetails>
                <fraudProcessorID>98</fraudProcessorID>
                <captureOnLowRisk>Y</captureOnLowRisk>
                <voidOnHighRisk>Y</voidOnHighRisk>
                <fraudToken>q1234564987981alksf43549138</fraudToken>
                <hotelReservations>
                    <hotelReservation>
                        <hotel>Hilton Hotel</hotel>
                        <city>Sao Paulo</city>
                        <state>SP</state>
                        <country>BR</country>
                        <reservationDate>2024-09-03 17:50:00</reservationDate>
                        <reservationExpirationDate>2024-11-20 09:00:00</reservationExpirationDate>
                        <checkInDate>2024-12-20 13:00:00</checkInDate>
                        <checkOutDate>2024-01-05 18:00:00</checkOutDate>
                    </hotelReservation>
                </hotelReservations>
                <airTravelInformation>
                    <passengers>
                        <passenger>
                            <name>Pax Hum Test</name>
                            <frequentFlyerCard>444555888-1</frequentFlyerCard>
                            <documentType>CPF</documentType>
                            <documentValue>52743822589</documentValue>
                            <birthDate>1982-03-08</birthDate>
                        </passenger>
                        <passenger>
                            <name>Pax Dois Test</name>
                            <frequentFlyerCard>444555888-2</frequentFlyerCard>
                            <documentType>CPF</documentType>
                            <documentValue>527438225891</documentValue>
                            <birthDate>1983-08-03</birthDate>
                        </passenger>
                    </passengers>
                    <connections>
                        <connection>
                            <company>TAM</company>
                            <flightNumber>8956</flightNumber>
                            <flightDate>2024-12-20 10:00:00</flightDate>
                            <class>Business</class>
                            <from>GRU</from>
                            <to>EZE</to>
                            <departureDate>2024-12-20 10:00:00</departureDate>
                            <arrivalDate>2024-12-20 11:25:00</arrivalDate>
                        </connection>
                        <connection>
                            <company>TAM</company>
                            <flightNumber>4946</flightNumber>
                            <flightDate>2024-01-05 21:15:00</flightDate>
                            <class>Business</class>
                            <from>EZE</from>
                            <to>GRU</to>
                            <departureDate>2024-01-05 21:15:00</departureDate>
                            <arrivalDate>2024-01-05 22:35:00</arrivalDate>
                        </connection>
                    </connections>
                </airTravelInformation>
            </fraudDetails>
            <transactionDetail>
                <payType>
                    <creditCard>
                        <number>4111111111111111</number>
                        <expMonth>12</expMonth>
                        <expYear>2030</expYear>
                        <cvvNumber>123</cvvNumber>
                    </creditCard>
                </payType>
            </transactionDetail>
            <payment>
                <chargeTotal>20.00</chargeTotal>
                <shippingTotal>0.00</shippingTotal>
            </payment>
            <itemList itemCount="2">
                <item>
                        <itemIndex>1</itemIndex>
                        <itemProductCode>881287212</itemProductCode>
                        <itemDescription>200 técnicas culinárias essenciais</itemDescription>
                        <itemQuantity>1</itemQuantity>
                        <itemTotalAmount>1.00</itemTotalAmount>
                        <itemUnitCost>1.00</itemUnitCost>
                    </item>
                    <item>
                        <itemIndex>2</itemIndex>
                        <itemProductCode>84234832749</itemProductCode>
                        <itemDescription>Larousse Gastronomique</itemDescription>
                        <itemQuantity>1</itemQuantity>
                        <itemTotalAmount>1.00</itemTotalAmount>
                        <itemUnitCost>1.00</itemUnitCost>
                </item>
            </itemList>
        </auth>
    </order>
</transaction-request>

Exemplo de Requisição – Retorno de Transação em Análise

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode/>
	<orderID>0A010497:018583479073:E14D:01D9B343</orderID>
	<referenceNum>ref00101010</referenceNum>
	<transactionID/>
	<transactionTimestamp>1672944783</transactionTimestamp>
	<responseCode>0</responseCode>
	<responseMessage>REVIEW</responseMessage>
	<avsResponseCode/>
	<cvvResponseCode/>
	<processorCode/>
	<processorMessage>NVO</processorMessage>
	<processorName>CLEARSALE</processorName>
	<errorMessage/>
	<processorTransactionID>14005032</processorTransactionID>
	<processorReferenceNumber>c80ad6a9-fc1d-41f0-bdbe-bd412fd306ab</processorReferenceNumber>
	<fraudScore>100.0</fraudScore>
	<creditCardScheme>Visa</creditCardScheme>
</transaction-response>

Exemplo de Request Inválido

<?xml version="1.0" encoding="UTF-8"?>
<transaction-response>
	<authCode/>
	<orderID/>
	<referenceNum/>
	<transactionID/>
	<transactionTimestamp>1672945690614</transactionTimestamp>
	<responseCode>1024</responseCode>
	<responseMessage>INVALID REQUEST</responseMessage>
	<avsResponseCode/>
	<cvvResponseCode/>
	<processorCode/>
	<processorMessage/>
	<processorName>CLEARSALE</processorName>
	<errorMessage>Billing District is a required field.</errorMessage>
	<creditCardScheme>Visa</creditCardScheme>
</transaction-response>

Tabela de Parâmetros

Tabela de Respostas