Decision
The Decision module performs synchronous analyses of the received data, returning a score and status within seconds.
How the Decision Module Works
Decision Module WorksThe Decision module operates synchronously, analyzing the data immediately after receiving a request. This process involves cross-referencing multiple relevant pieces of information to calculate the score, determine the status, and the result of the request.
The analysis response is returned within seconds, enabling fast decisions integrated into the application's flow, without the need for asynchronous processing or prolonged waiting.
Schema Request
Represents the integration request.
| Fields | Description | Type | Required |
|---|---|---|---|
| transaction | Transaction information | Transaction | Yes |
| transactionValue | Transaction value information | Transaction Value | No |
| device | Device information | Device | No |
| billing | Billing information | Billing | Yes |
| shipping | Shipping information | Shipping | No |
| items | List of transaction items | Item Array | No |
| payments | List of payment methods | Payment Array | No |
| airTravel | Air travel information | Air Travel | No |
Transaction
Represents transaction data.
| Fields | Description | Type | Required |
|---|---|---|---|
| code | Unique transaction code | String | Yes |
| date | Transaction date | DateTime | Yes |
| Email associated with the transaction | String | Yes | |
| status | Transaction status | Integer | No |
| ipAddress | Customer IP address | String | No |
| origin | Transaction origin: APP, WEBSITE, TELEVENDAS, etc | String | No |
| observation | Additional observations | String | No |
Transaction Value
Represents the total transaction value.
| Fields | Description | Type | Required |
|---|---|---|---|
| totalValue | Total transaction value | Float | Yes |
Device
Represents information about the device used in the transaction.
| Fields | Description | Type | Required |
|---|---|---|---|
| fingerprint | Unique device identifier | Fingerprint | Yes |
Fingerprint
Represents identification information of the device used in the transaction.
| Fields | Description | Type | Required |
|---|---|---|---|
| sessionId | Unique device session identifier | Guid | Yes |
Billing
Represents billing information.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Person type | Integer | No |
| name | Customer name | String | Yes |
| Customer email | String | No | |
| gender | Customer gender | String | No |
| birthdate | Customer birthdate | DateTime | No |
| documents | Customer documents | Document Array | Yes |
| address | Billing address | Address | No |
| phones | Customer phones | Phone Array | Yes |
Shipping
Represents shipping information.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Person type | Integer | No |
| price | Shipping price | Float | Yes |
| name | Recipient name | String | Yes |
| Recipient email | String | No | |
| gender | Recipient gender | String | No |
| birthdate | Recipient birthdate | DateTime | No |
| clientId | Internal customer identifier (who made the transaction) | String | No |
| deliveryType | Delivery type | Integer | Yes |
| deliveryTime | Estimated delivery time | String | No |
| documents | Recipient documents | Document Array | No |
| address | Shipping address | Address | No |
| phones | Associated phones | Phone Array | No |
Item
Represents a transaction item.
| Fields | Description | Type | Required |
|---|---|---|---|
| code | Internal customer item code | String | No |
| name | Item name | String | No |
| description | Item description | String | No |
| categoryId | Internal customer item category ID | Integer | No |
| categoryName | Item category name (example table in Glossary) | String | No |
| barCode | Item barcode | String | No |
| value | Item value | Float | Yes |
| quantity | Item quantity | Integer | Yes |
| isGift | Indicates if the item is a gift | Boolean | No |
| sellerName | Seller name | String | No |
| sellerSegment | Seller segment | String | No |
| isMarketPlace | Indicates if it is a marketplace | String | No |
| shippingCompany | Shipping company | String | No |
| sellerDocument | Seller document | Document | Yes |
Payment
Represents a payment method.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Payment type | Integer | Yes |
| value | Payment value | Float | Yes |
| currency | Currency used | Integer | No |
| sequential | Payment sequential number | Integer | No |
| paymentDate | Payment date | DateTime | No |
| installments | Number of installments | Integer | No |
| payableType | Payment category within the segment: VOUCHER, SUBSCRIPTION, etc | String | No |
| interestRate | Interest rate applied to the payment | Float | No |
| interestValue | Value of interest applied | Float | No |
| visaCheckoutUserId | Visa Checkout user identifier | String | No |
| digitalWalletCode | Digital wallet code used | String | No |
| voucherOrderOrigin | Voucher order origin | String | No |
| subAcquirer | Subacquirer responsible for the payment | String | No |
| bankAuthentication | Bank authentication information | String | No |
| card | Credit card information | Card | Yes |
Card
Represents credit card information.
| Fields | Description | Type | Required |
|---|---|---|---|
| ownerName | Cardholder name | String | Yes |
| number | Card number | String | No |
| hash | Card number hash | String | No |
| bin | Card BIN (Bank Identification Number) | String | Yes |
| end | Last digits of the card | String | Yes |
| type | Card type | Integer | No |
| expirationDate | Card expiration date | String | No |
| document | Document associated with the card | Document | No |
Document
Represents a document associated with an entity.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Document type | Integer | Yes |
| number | Document number | String | Yes |
| documentTypeCustomer | Customer type associated with the document | String | No |
| authority | Document issuing authority | String | No |
| authorityState | Issuing authority state | String | No |
| issueDate | Document issue date | String | No |
Address
Represents an address.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Address type | String | Yes |
| addressId | Address identifier | String | No |
| street | Street name | String | Yes |
| number | Address number | String | Yes |
| district | District | String | No |
| city | City | String | Yes |
| state | State | String | Yes |
| zipcode | Zip code (00000-000) | String | Yes |
| country | Country | String | Yes |
| additionalInformation | Additional information | String | No |
| reference | Address reference | String | No |
| latitude | Address latitude | String | No |
| longitude | Address longitude | String | No |
Phone
Represents information about a phone associated with an entity.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | Phone type | Integer | No |
| countryCode | Country code | String | No |
| areaCode | Area code | String | Yes |
| number | Phone number | String | Yes |
| extension | Phone extension | String | No |
AirTravel
Represents air travel information
| Fields | Description | Type | Required |
|---|---|---|---|
| passengers | List of air travel passengers | Passenger Array | Yes |
| connections | List of itinerary connections/segments | Connection Array | Yes |
Passenger
Represents passenger information
| Fields | Description | Type | Required |
|---|---|---|---|
| name | Passenger name | String | Yes |
| documentType | Document type | Integer | Yes |
| documentNumber | Document number | String | Yes |
| companyMileCard | Company mileage card | String | No |
| MileCard | Personal mileage card | String | No |
| gender | Passenger gender | String | No |
| birthDate | Passenger birthdate | DateTime | No |
| cpf | Passenger CPF | String | No |
Connection
Represents connection information
| Field | Description | Type | Required |
|---|---|---|---|
| company | Airline company | String | No |
| flightNumber | Flight number | Integer | No |
| date | Flight date | DateTime | Yes |
| seatClass | Seat class | String | No |
| origin | Origin airport | String | Yes |
| destination | Destination airport | String | Yes |
| boarding | Boarding date/time | DateTime | Yes |
| arriving | Arrival date/time | DateTime | Yes |
| fareClass | Fare class | String | No |
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"
},
"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"
},
"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"
}
]
}
}Response POST
Represents the integration execution response. If you have contracted more than one module, you may receive all at once. What is not contracted will not be returned.
Result
| Fields | Description | Type | Required |
|---|---|---|---|
| executionId | Execution ID | Guid | Yes |
| analysisId | Analysis ID | Guid | Yes |
| transactionId | Transaction ID | String | Yes |
| decision | Decision result | Decision Result | No |
Decision Result
Represents the result of a decision.
JSON
{
"executionId": "string",
"analysisId": "string",
"transactionId": "string",
"decision": {
"status": "string",
"score": 0,
"result": "string",
"metadata": {}
}
}Response GET
Represents the execution response of the analysis query.
Result
| Fields | Description | Type | Required |
|---|---|---|---|
| analysisId | Analysis ID | Guid | Yes |
| transactionId | Transaction ID | String | Yes |
| decision | Decision result | Decision Result | No |
Decision Result
Represents the result of a decision.
JSON
{
"analysisId": "string",
"transactionId": "string",
"decision": {
"status": "string",
"score": 0,
"result": "string"
}
}Response Error
Represents the details of a problem returned by the API in case of error.
| Fields | Description | Type | Required |
|---|---|---|---|
| type | URI identifying the specific problem type. Can be used to categorize the error. | String | No |
| title | Descriptive title of the problem | String | Yes |
| status | HTTP status code associated with the problem | Integer | Yes |
| errors | Validation errors | Object | Yes |
| instance | URI identifying the specific problem instance | String | No |
JSON
{
"errors": {
"string": [
"string"
]
},
"type": "string",
"title": "string",
"status": 0,
"traceId": "string"
}Updated 19 days ago
