Antifraud

Antifraud GetNet evaluates the risk of e-commerce transactions using data sent by customers, in addition to relying on machine learning technologies, neural networks, managerial decisions, and adjustable rules.

The more data available to train the models, the better the results and the higher the probability of detection. With this wealth of data, the number of fraud detectors increases, which means better accuracy in identifying the transaction’s risk.

Therefore, we request that you send all the information listed below, you can find the fields on additional_data object:
Customer information: All information listed here are inside the customer object.
AttributeTypeDescriptionExample
document_numberStringPurchaser's document number without punctuation (without mask)2441356709
document_typeStringType of the buyer's identification documentCPF
emailStringPurchaser's emailaceiti@getnet.com.br
nameStringPurchaser's nameJose da Silva
phone numberStringPurchaser's phone number11999999999
Billing address: All information listed here are inside the customer object.
AttributeTypeDescriptionExample
billing_addressObjectCustomer's address information for billing-
cityStringCity nameSão Paulo
complementStringAddress complementapto 43
countryStringCountry, report in the ISO 3166-1 alpha-3 standardBRA
districtStringDistrictJardins
numberStringStreet number123
postal_codeStringPostal Code, CEP in Brazil or ZIP in the United States (without mask)02576896
stateStringState (UF)SP
streetStringStreet nameDark Tower
typeStringAddress typeResidential
Device information:
All information listed here are inside the device object.
AttributeTypeDescriptionExample
deviceObjectSet of data referring to the device used by the buyer-
device_idStringDevice unique Idae44e06c-3e85-44af-8542-bcaccd54ef2e
finger_printStringIdentification hash (Device Fingerprint) of the deviceaGVsbG8td29ybGQtZGV2aWNlLWlkCg==
ip_addressStringIP address (IPv4) of the buyer's device. This attribute must be captured by your application, from the device of the buyer (mobile; browser; etc.) and sent in the payload, in order to enrich our preventive analyses10.0.0.1

For more details, see the API reference

Device Fingerprint Implementation

Device Fingerprint is a technique that collects dozens of data points from a user's device and network environment, enabling merchants to more effectively detect anomalies and enhance overall fraud prevention capabilities.

The integration flow for this method involves two main phases:

  • A client-side step, where device data is captured by loading the antifraud URL containing the session ID previously generated by the e-commerce system.
  • A backend step, where the e-commerce system submits the payment data to the Getnet API, including the aforementioned session ID.

Step 1: Capturing device data

To collect device information from the transacting user, construct the antifraud URL using the following format:

https://BASE_URL?session={session id}&country={country code}, where:
https://BASE_URL corresponds to one of the following environments: https://api.pre.globalgetnet.com/dpm/digital-platform/antifraud/afdf.js (stage), https://api.globalgetnet.com/dpm/digital-platform/antifraud/afdf.js (production). ? indicates the beginning of the query section, session={session_id} is a required parameter used to identify the device during the transaction analysis process, and its value must follow the UUIDv4 format, & is used as a connector between query parameters, country={country_code} corresponds to the second mandatory parameter, required to identify the country of origin and should have the value of the corresponding ISO country code (AR, BR, CL, MX).
Once the URL is correctly constructed, you should implement the resulting antifraud url inside the head or body tag of your web application, as you can see in the examples below:
For head tag:
javascript
<head> <script type="text/javascript" src="https://base_url?session=${session_id}&country=${country_code}" /> </head>
For body tag:
javascript
<body> <noscript> <iframe style="width: 100px; height: 100px; border: 0; position:absolute; top: -5000px;" src="https://base_url?session=${session_id}&country=${country_code}" /> </noscript> </body>

Step 2: Create payment through Getnet API

When the user initiates a payment, the previously generated session_id must be included in the request body sent to the Getnet API. This value should be passed as the device_id within the device object, alongside the ip_address and the finger_print (fingerprint hash). The device object should be nested inside the second-level additional_data object, as shown below:
json
additional_data: { device: { ip_address: {ip_address}, device_id: {session_id}, finger_print: {finger-print-hash} } }

For more details, see the API reference