v1

latestOpenAPI 3.0.3Apache License Version 2.02026-07-2631211285.4 KB
Ecommerce

Create Pre-Evaluation

Receives a new transaction for antifraud analysis, its meant to be used before payment authorization.

post/v1/antifraud/pre-evaluations

Request body

type'Ecommerce' required

Antifraud type

service_datestring

Date which the service will take place

sla_datestring

The date that the evaluation is expected to be resolved

callback_urlstring

A publicly accessible HTTPS endpoint where your application will receive asynchronous notifications about the status of the evaluation.

Example request

{
  "buyer": {
    "id": "c1245228",
    "first_name": "Alvaro",
    "last_name": "Garrincha",
    "full_name": "Alvaro Garrincha",
    "document": {
      "nationality": "UY",
      "number": "35645888",
      "type": "DNI"
    },
    "address": {
      "address": "SCN Quadra 02, Bloco G",
      "number": "12",
      "cep": "05376-140"
    },
    "birth_date": "1990-05-06",
    "email": "email@domain.com",
    "phone": {
      "area_code": "11",
      "number": "45669874",
      "type": "Mobile"
    },
    "profile": {
      "category": "Platinum"
    }
  },
  "device": {
    "ipv4": "70.56.69.13",
    "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
    "location": {
      "latitude": -34.56532789616039,
      "longitude": -58.48945822129388
    },
    "merchant_device": "234c20c3-45de-41bf-b243-87ad5$RTbc3b",
    "session_id": "5b8c20c3-45de-41bf-b243-87ad5d21bc3b"
  },
  "store": {
    "name": "Store23",
    "countryCode": "BR",
    "document": "1234567"
  },
  "items": [
    {
      "category": {
        "id": "111",
        "name": "Some category name"
      },
      "discount_amount": {
        "currency_code": "USD",
        "value": 8008.99
      },
      "id": "13238487",
      "name": "Some name",
      "price": {
        "currency_code": "USD",
        "value": 8008.99
      },
      "quantity": 5,
      "seller_id": "Some Seller",
      "service_date": "2021-10-23T10:00:00.307062Z",
      "type": "Generic"
    }
  ],
  "payments": [
    {
      "id": "02BF653185664752AA5F8B7415BD5043",
      "payer": {
        "id": "c1245228",
        "first_name": "Alvaro",
        "last_name": "Garrincha",
        "full_name": "Alvaro Garrincha",
        "document": {
          "nationality": "UY",
          "number": "35645888",
          "type": "DNI"
        },
        "address": {
          "address": "SCN Quadra 02, Bloco G",
          "number": "12",
          "cep": "05376-140"
        },
        "birth_date": "1990-05-06",
        "email": "email@domain.com",
        "phone": {
          "area_code": "11",
          "number": "45669874",
          "type": "Mobile"
        }
      },
      "amount": {
        "currency_code": "USD",
        "value": 8008.99
      },
      "personData": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "test@example.com",
        "cpf": "57616508278",
        "birthDate": "1990-05-06",
        "countryCode": "55",
        "phone": "(11)23456-3456",
        "mcc": "8999",
        "address": {
          "address": "SCN Quadra 02, Bloco G",
          "number": "12",
          "cep": "05376-140"
        },
        "revenue": "500055"
      },
      "companyData": {
        "name": "Store 12",
        "cnpj": "56651716001150",
        "address": {
          "address": "SCN Quadra 02, Bloco G",
          "number": "12",
          "cep": "05376-140"
        },
        "email": "test@example.com",
        "countryCode": "55",
        "phone": "(11)23456-3456",
        "mcc": "8999",
        "revenue": "500055"
      },
      "transferData": {
        "account": "05376140",
        "bank": "John Doe",
        "code": "001",
        "branch": "0015",
        "documentNumber": "1234567889"
      },
      "pricing": [
        {
          "detailed": [
            {
              "installment": 1,
              "brand": "VISA"
            }
          ]
        }
      ]
    }
  ],
  "shipping": {
    "address": {
      "address": "SCN Quadra 02, Bloco G",
      "number": "12",
      "cep": "05376-140"
    },
    "delivery": {
      "by": "DHL",
      "date": "2021-02-23T14:10:44.307062Z",
      "type": "EXPRESS"
    },
    "price": {
      "currency_code": "USD",
      "value": 8008.99
    }
  },
  "transaction": {
    "reference_id": "FGCCCEA53JYSHXX",
    "business_id": "6LVHR8W0V7BYEQX",
    "sequence": "1",
    "country_code": "AR",
    "total_amount": {
      "currency_code": "USD",
      "value": 8008.99
    }
  },
  "service_date": "2021-10-23T10:00:00.307062Z",
  "sla_date": "2021-07-23T16:00:00.307062Z",
  "callback_url": "http://domain/service",
  "client_info": {
    "creation_date": "1978-04-29T17:10:35.387Z",
    "classification": "GOLD",
    "customer_order": {
      "currency_code": "USD",
      "value": 8008.99
    },
    "days_since_first_order": 45,
    "days_since_last_order": 10,
    "cancelled_orders": 3,
    "average_order": {
      "currency_code": "USD",
      "value": 8008.99
    },
    "cash_orders": 3,
    "card_orders": 6,
    "bank_orders": 4,
    "debit_orders": 2,
    "super_segmentation": "potential",
    "purchase_power": "pph",
    "year_first_purchase": 2024,
    "purchases_30_days": 12,
    "purchases_60_days": 22,
    "purchases_lifetime": 32
  },
  "strategies_data": {
    "collect_auth_supported": true,
    "acquirer_bin": "408956",
    "acquirer": "WDP",
    "merchant_id": "BRLIARLEGAPR",
    "mcc": "1234",
    "merchant_descriptor": "DAGS_TEST_3DS"
  }
}

Response

Evaluation response

analysis_type'AUTOMATIC' | 'MANUAL'

Resolution type

evaluation_idstring

antifraud provider identifier

idstring

Client transaction identifier

scoreinteger

Evaluation score

status'approved' | 'denied'

Transaction status