get http://{providerApiEndpoint}/transactions/
GET antifraud Status. Implement this API because VTEX will call it to get the status of the antifraud analysis.
GET antifraud Status. Implement this API because VTEX will call it to get the status of the antifraud analysis. This call is performed every two hours up to 5 days. After 5 days in undefined status the order will expire and will be cancelled.
The parameter in the URL transactions.id
is VTEX transaction ID that was passed in the body of send antifraud data api : id
RESPONSE BODY
id |
string | VTEX transaction ID. The ID of this transaction must be in the response. |
tid |
string | Provider transaction ID. The ID of this transaction must be in the response. The antifraud provider MUST generates an unique transaction Id. |
status |
string | Transaction status from provider. Must be one of the values: approved, denied or undefined |
score |
decimal | The value of the score risk in percentage. 100.00 as max value means total fraud |
AnalysisType |
string | Analysis type. Valid values are authomatic or manual |
responses (optional) |
dictionary or string | Key Value dictionary to add custom responses from analysis |
tid |
string | Transaction ID in the provider. This is the transaction identifier that the provider assigns |
code (optional) |
string | Error code returned from provider. Will be logged in transaction interactions log |
message (optional) |
string | Error message returned from provider. Will be logged in transaction interactions log |
REQUEST EXAMPLES AND THEIR RESPONSES
curl --location --request GET '{{protocol}}://{{accountName}}.{{domain}}/api/pub/antifraud-provider/transactions/{{transactionId}}' \
--header 'Content-Type: application/json' \
--header 'X-PROVIDER-API-AppKey: ProviderAppKey' \
--header 'X-PROVIDER-API-AppToken: ProviderAppToken' \
--data-raw '{
"reference": "v32478982vtx-01",
"transactionId": "D3AA1FC8372E430E8236649DB5EBD08E",
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
"paymentMethod": "Visa",
"merchantName": "mystore",
"card": {
"number": "507860187000012798",
"holder": "John Doe",
"expiration": {
"month": "06",
"year": "2025"
},
"csc": "021"
},
"value": 32,
"installments": 3,
"deviceFingerprint": "12ade389087fe",
"miniCart": {
"buyer": {
"id": "c1245228-1c68-11e6-94ac-0afa86a846a5",
"firstName": "John",
"lastName": "Doe",
"document": "012.345.678-90",
"documentType": "CPF",
"email": "[email protected]",
"phone": "+55 (21) 98765-4321"
},
"shippingAddress": {
"country": "BRA",
"street": "Rua Praia de Botafogo",
"number": "518",
"complement": "2o. andar",
"neighborhood": "Botafogo",
"postalCode": "22250-040",
"city": "Rio de Janeiro",
"state": "RJ"
},
"billingAddress": {
"country": "BRA",
"street": "Rua Praia de Botafogo",
"number": "518",
"complement": "2o. andar",
"neighborhood": "Botafogo",
"postalCode": "22250-040",
"city": "Rio de Janeiro",
"state": "RJ"
},
"items": [
{
"id": "132981",
"name": "Some useful product",
"price": 2134.90,
"quantity": 2,
"discount": 5.00
},
{
"id": "123242",
"name": "Some useless product",
"price": 21.98,
"quantity": 1,
"discount": 1.00
}
],
"shippingValue": 11.44,
"taxValue": 10.01
},
"url": "https://mystore.ecommerce.com/orders/direct/link/v32478982",
"callbackUrl": "https://requestb.in/19ee59c1",
"returnUrl": "https://mystore.ecommerce.com/orders/direct/link/v32478982"
}'
{
"id": "BF900B7CB15147F98D91208989100A05",
"tid": "3146f46162f042f483cd3979ba4e8317",
"status": "approved",
"fraudRiskPercentage": 5.01,
"analysisType": "authomatic",
"responses": {
"foo": "anyFoo",
"custom": "customAnyValue"
}
}