Integration

Documentation for Connect's order (transactional) integration.

POST Integration/{integrationId}

The /Integration/integrationId route allows integrating specific transaction information identified by the integrationId.

It receives detailed transaction data, such as values, devices, billing and shipping information, as well as items and payments. After processing, the route returns an analysis with results, including decisions, biometric verifications, and insights. Authentication with a security token is required to use it.


Endpoint Authentication

The endpoint requires authentication. Clients must provide valid credentials so the system can successfully authenticate and transmit data.

Supported Authentication Method: Bearer Token (JWT)

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

📘

Details about the authentication process and how to obtain a token can be found in Authentication.


Integration Identification by Module

Each system module has a specific integrationId that uniquely identifies it, these are:

Note: It is possible to compose multiple modules, which provides greater flexibility and granularity in the integration between functionalities, allowing to efficiently address more complex scenarios.



Synchronous and Asynchronous Modules


Synchronous Module Operation

Synchronous modules perform data analysis immediately upon receiving a request. This process involves cross-referencing multiple relevant pieces of information to calculate the score and determine the request status.

The analysis response is returned within seconds, allowing for quick decisions integrated into the application flow, without the need for asynchronous processing or prolonged waiting.


Asynchronous Module Operation

Asynchronous modules process requests non-immediately, allowing data analysis to occur in the background after the request is received. During this process, various relevant pieces of information are cross-referenced for score calculation and request status definition.

Upon completion of processing, the system performs an automatic notification via webhook, sending the results to the endpoint previously provided by the client.

📘

Our services address:

Homologation:

POST https://homologapix.clearsale.com.br/connect/v1/integration/integrationId

Production:

POST https://apix.clearsale.com.br/connect/v1/integration/integrationId


Configuration for Staging Environment

The staging environment is used for integration testing between systems. By default, responses are generated with fixed values, but it is possible to request custom configurations in the modules that offer this option.

The definition of the score and status is based on the last digit of the numeric field present in the billing document, allowing different scenarios to be simulated in a controlled manner.

Available Modules

  • Decision (standard and customized)
  • Score (standard and customized)
  • MFA (standard)
  • Biolink (standard and customized)
  • Insights (standard)

Default Score Configuration

Document (last digit)Score Range (randomly generated)
00.0000 – 0.1000
10.1001 – 0.2000
20.2001 – 0.3000
30.3001 – 0.4000
40.4001 – 0.5000
50.5001 – 0.6000
60.6001 – 0.7000
70.7001 – 0.8000
80.8001 – 0.9000
90.9001 – 0.9999

Default Status Configuration

Document (last digit)Status
0APA – Automatic Approval
1RPA – Automatic Rejection
2AMA – Queued
3FRD – Confirmed Fraud
4APM – Approved
5APP – Approved by Policy
6AME – External Manual Review
7APB – Approved by Biometrics
8APS - Approved by SMS
9ACT - Approved by Contingency

Webhook Configuration

For the MFA and Biolink modules, it is possible to configure a webhook to receive notifications or results directly at an endpoint defined by the client.

This feature allows:

  • Real-time integration with internal systems.
  • Automation of processes based on returned events.
  • Greater control over tests and responses in the staging environment.

To enable the webhook, provide:

  • The endpoint URL that will receive the requests.
  • Expected format: JSON.
  • Authentication, if required (Basic, ApiKey, JWT).

Schema Request

This section represents the general request structure for integration. The requirement of certain fields may vary depending on the context, and these specific rules will be detailed in the documentation for each individual module.

DescriptionFieldsTypeRequired
Transaction informationtransactionTransactionYes
Transaction value informationtransactionValueTransaction ValueNo
Device informationdeviceDeviceNo
Billing informationbillingBillingYes
Shipping informationshippingShippingNo
List of transaction itemsitemsItem ArrayNo
List of payment methodspaymentsPayment ArrayNo
Air travel informationairTravelAir TravelNo
Payment link informationpaymentLinkPaymentLinkNo
Seller informationsellerSellerNo

Transaction

Represents transaction data.

FieldsDescriptionTypeLengthRequired
codeUnique transaction codeString50Yes
dateTransaction dateDateTime-Yes
emailEmail associated with the transactionString150No
statusTransaction statusInteger-No
ipAddressCustomer IP addressString150No
originTransaction origin: APP, WEBSITE, TELEVENDAS, etcString150No
observationAdditional observationsString8000No

Transaction Value

Represents the total transaction value.

FieldsDescriptionTypeRequired
totalValueTotal transaction valueFloatYes

Device

Represents information about the device used in the transaction.

FieldsDescriptionTypeRequired
fingerprintUnique device identifierFingerprintYes

Fingerprint

Represents identification information of the device used in the transaction.

FieldsDescriptionTypeRequired
sessionIdUnique device session identifierGuidYes

Billing

Represents billing information.

FieldsDescriptionTypeLengthRequired
typePerson typeInteger-No
nameCustomer nameString500Yes
emailCustomer emailString150No
genderCustomer genderString1No
birthdateCustomer birthdateDateTime-No
documentsCustomer documentsDocument Array-Yes
addressBilling addressAddress-No
phonesCustomer phonesPhone Array-Yes

Shipping

Represents shipping information.

FieldsDescriptionTypeLengthRequired
typePerson typeInteger-No
priceShipping priceFloat-No
nameRecipient nameString500Yes
emailRecipient emailString150No
genderRecipient genderString1No
birthdateRecipient birthdateDateTime-No
clientIdInternal customer identifier (who made the transaction)String200No
deliveryTypeDelivery typeInteger-Yes
deliveryTimeEstimated delivery timeString100No
documentsRecipient documentsDocument Array-No
addressShipping addressAddress-No
phonesAssociated phonesPhone Array-No

Item

Represents a transaction item.

FieldsDescriptionTypeLengthRequired
codeInternal customer item codeString50No
nameItem nameString150No
descriptionItem descriptionString500No
categoryIdInternal customer item category IDInteger-No
categoryNameItem category name (example table in Glossary)String200No
barCodeItem barcodeString30No
valueItem valueFloat-Yes
quantityItem quantityInteger-Yes
isGiftIndicates if the item is a giftBoolean-No
sellerNameSeller nameString150No
sellerSegmentSeller segmentString150No
isMarketPlaceIndicates if it is a marketplaceString50No
shippingCompanyShipping companyString150No
sellerDocumentSeller documentDocument-No

Payment

Represents a payment method.

FieldsDescriptionTypeLengthRequired
typePayment typeInteger-Yes
valuePayment valueFloat-Yes
currencyCurrency usedInteger-No
sequentialPayment sequential numberInteger-No
paymentDatePayment dateDateTime-No
installmentsNumber of installmentsInteger-No
payableTypePayment category within the segment: VOUCHER, SUBSCRIPTION, etcString150No
interestRateInterest rate applied to the paymentFloat-No
interestValueValue of interest appliedFloat-No
visaCheckoutUserIdVisa Checkout user identifierString200No
digitalWalletCodeDigital wallet code usedString200No
voucherOrderOriginVoucher order originString200No
subAcquirerSubacquirer responsible for the paymentString200No
bankAuthenticationBank authentication informationString200No
cardCredit card informationCard-Yes

Card

Represents credit card information.

FieldsDescriptionTypeLengthRequired
ownerNameCardholder nameString150Yes
numberCard numberString200No
hashCard number hashString50No
binCard BIN (Bank Identification Number)String12Yes
endLast digits of the cardString4Yes
typeCard typeInteger-No
expirationDateCard expiration dateString50No
documentDocument associated with the cardDocument-No

Document

Represents a document associated with an entity.

FieldsDescriptionTypeLengthRequired
typeDocument typeInteger-Yes
numberDocument numberString18Yes
documentTypeCustomerCustomer type associated with the documentString50No
authorityDocument issuing authorityString100No
authorityStateIssuing authority stateString5No
issueDateDocument issue dateString11No

Address


⚠️

Required fields rule: When the fullAddress field is provided, all other fields in the Address object become optional. If the fullAddress field is not provided, the fields type, street, number, city, state, zipCode and country become required.

Represents an address.

FieldsDescriptionTypeLengthRequired
typeAddress typeString-No
addressIdAddress identifierString150No
streetStreet nameString200No
numberAddress numberString15No
districtDistrictString150No
cityCityString150No
stateStateString5No
zipcodeZip code (00000-000)String10No
countryCountryString150No
additionalInformationAdditional informationString500No
referenceAddress referenceString500No
latitudeAddress latitudeString100No
longitudeAddress longitudeString100No
fullAddressFull addressString500No

Phone

Represents information about a phone associated with an entity.

FieldsDescriptionTypeLengthRequired
typePhone typeInteger-No
countryCodeCountry codeString5No
areaCodeArea codeString5Yes
numberPhone numberString15Yes
extensionPhone extensionString10No

AirTravel

Represents air travel information

FieldsDescriptionTypeRequired
passengersList of air travel passengersPassenger ArrayYes
connectionsList of itinerary connections/segmentsConnection ArrayYes

Passenger

Represents passenger information

FieldsDescriptionTypeLengthRequired
namePassenger nameString100Yes
documentTypeDocument typeInteger-Yes
documentNumberDocument numberString50Yes
companyMileCardCompany mileage cardString50No
MileCardPersonal mileage cardString50No
genderPassenger genderString1No
birthDatePassenger birthdateDateTime-No
cpfPassenger CPFString11No

Connection

Represents connection information

FieldDescriptionTypeLengthRequired
companyAirline companyString50No
flightNumberFlight numberInteger-No
dateFlight dateDateTime-Yes
seatClassSeat classString10No
originOrigin airportString5Yes
destinationDestination airportString5Yes
boardingBoarding date/timeDateTime-Yes
arrivingArrival date/timeDateTime-Yes
fareClassFare classString25No

PaymentLink

Represents the payment link information

FieldDescriptionTypeLengthRequired
flagInternationalTransactionInternational transaction flagString200No
linkURLLink urlString200No
linkDeviceDevice that generated the linkString200No
clusterCluster/segmentationString200No

Seller

Represents the seller/partner information

FieldDescriptionTypeLengthRequired
sellerIDStore/seller identifierString200No
sellerScoreSeller/partner scoreString200No
sellerCNAESeller/partner business activity code (CNAE)String200No
sellerAccreditationDateSeller/partner accreditation dateDateTime-No
sellerMerchantEmailEmail of the seller/partner representativeString150No
sellerMerchantDocumentDocument of the seller/partner representativeString50No
sellerMerchantDDDArea code (DDD) of the seller/partner representativeString10No
sellerMerchantPhoneNumberPhone number of the seller/partner representativeString15No
sellerAccessionDateSeller/partner link accession dateDateTime-No
sellerPaymentDaysNumber of days for payment to the seller/partnerInterger-No
sellerPartnersNameInformation about the company’s partners (CNPJ owners)String200No
sellerClusterSeller cluster/segmentationString200No

Example Request

POST https://homologapix.clearsale.com.br/connect/v1/Integration/{{integrationId}}
Accept: application/json
Content-Type: application/json

{
  "transaction": {
    "code": "string",
    "date": "2025-09-25T15:42:34.935Z",
    "email": "string",
    "status": 0,
    "ipAddress": "string",
    "origin": "string",
    "observation": "string"
  },
  "transactionValue": {
    "totalValue": 0
  },
  "device": {
    "fingerprint": {
      "sessionId": "string"
    }
  },
  "billing": {
    "type": 0,
    "name": "string",
    "email": "string",
    "gender": "string",
    "birthdate": "2025-09-25T15:42:34.935Z",
    "documents": [
      {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    ],
    "address": {
      "type": "string",
      "addressId": "string",
      "street": "string",
      "number": "string",
      "district": "string",
      "city": "string",
      "state": "string",
      "zipcode": "string",
      "country": "string",
      "additionalInformation": "string",
      "reference": "string",
      "latitude": "string",
      "longitude": "string",
      "fullAddress": "string"
    },
    "phones": [
      {
        "type": 0,
        "countryCode": "string",
        "areaCode": "string",
        "number": "string",
        "extension": "string"
      }
    ]
  },
  "shipping": {
    "type": 0,
    "price": 0,
    "name": "string",
    "email": "string",
    "gender": "string",
    "birthdate": "2025-09-25T15:42:34.935Z",
    "clientId": "string",
    "deliveryType": 0,
    "deliveryTime": "string",
    "documents": [
      {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    ],
    "address": {
      "type": "string",
      "addressId": "string",
      "street": "string",
      "number": "string",
      "district": "string",
      "city": "string",
      "state": "string",
      "zipcode": "string",
      "country": "string",
      "additionalInformation": "string",
      "reference": "string",
      "latitude": "string",
      "longitude": "string",
      "fullAddress": "string"
    },
    "phones": [
      {
        "type": 0,
        "countryCode": "string",
        "areaCode": "string",
        "number": "string",
        "extension": "string"
      }
    ]
  },
  "items": [
    {
      "code": "string",
      "name": "string",
      "description": "string",
      "categoryId": 0,
      "categoryName": "string",
      "barCode": "string",
      "value": 0,
      "quantity": 0,
      "isGift": true,
      "sellerName": "string",
      "sellerSegment": "string",
      "isMarketPlace": "string",
      "shippingCompany": "string",
      "sellerDocument": {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    }
  ],
  "payments": [
    {
      "type": 0,
      "value": 0,
      "currency": 0,
      "sequential": 0,
      "paymentDate": "2025-09-25T15:42:34.935Z",
      "installments": 0,
      "payableType": "string",
      "interestRate": 0,
      "interestValue": 0,
      "visaCheckoutUserId": "string",
      "digitalWalletCode": "string",
      "voucherOrderOrigin": "string",
      "subAcquirer": "string",
      "bankAuthentication": "string",
      "card": {
        "ownerName": "string",
        "number": "string",
        "hash": "string",
        "bin": "string",
        "end": "string",
        "type": 0,
        "expirationDate": "string",
        "document": {
          "type": 0,
          "number": "string",
          "documentTypeCustomer": "string",
          "authority": "string",
          "authorityState": "string",
          "issueDate": "string"
        }
      }
    }
  ],
  "airTravel": {
    "passengers": [
      {
        "name": "string",
        "documentType": 0,
        "documentNumber": "string",
        "companyMileCard": "string",
        "mileCard": "string",
        "gender": "string",
        "birthDate": "2025-09-25T15:42:34.935Z",
        "cpf": "string"
      }
    ],
    "connections": [
      {
        "company": "string",
        "flightNumber": 0,
        "date": "2025-09-25T15:42:34.935Z",
        "seatClass": "string",
        "origin": "string",
        "destination": "string",
        "boarding": "2025-09-25T15:42:34.935Z",
        "arriving": "2025-09-25T15:42:34.935Z",
        "fareClass": "string"
      }
    ]
  },
  "paymentLink": {
    "flagInternationalTransaction": "string",
    "linkURL": "string",
    "linkDevice": "string",
    "cluster": "string"
  },
  "seller": {
    "sellerID": "string",
    "sellerScore": "string",
    "sellerCNAE": "string",
    "sellerAccreditationDate": "2025-12-12T13:29:22.039Z",
    "sellerMerchantEmail": "string",
    "sellerMerchantDocument": "string",
    "sellerMerchantDDD": "string",
    "sellerMerchantPhoneNumber": "string",
    "sellerAccessionDate": "2025-12-12T13:29:22.039Z",
    "sellerPaymentDays": 0,
    "sellerPartnersName": "string",
    "sellerCluster": "string"
  }
}