Optimize Direct Manage
If you are using Optimize Manage with Optimize Direct then you can manage your fraud using our fraud management API endpoints. This page details the services that are available.
Auto publishing of fraud events
If your account is configured to automatically publish fraud events then all Optimize Direct transactions will publish a fraud event, and if the overall decision given by the rules engine is defer then a task will also be created in the Manage queue. If you are not configured to automatically publish a fraud event then you can do this manually using an API endpoint. You may also wish to use the publish endpoint to add tasks to the Manage queue that did not have an overall decision of defer, even if you are configured to auto publish.
Publish fraud event endpoint
The publish fraud event endpoint will publish the fraud event and optionally also create a task in the Manage queue. The createTask flag will indicate whether or not a task should be created; the omission of this flag will mean that we will decide whether to create a task based on the overall decision given by the rules engine. A notification URL can be supplied which will be used to send an asynchronous notification when an action is performed on the task in the Manage queue. See the section below for details of the merchant notification.
Where a task is created in the Manage queue, the response contains a direct link to it.
Publish fraud event
POST /acceptor/rest/fraudManagement/{installationId}/fraudEvents{
"transaction" : {
"transactionId" : "12471709826",
"createTask" : true
},
"notification" : {
"url" : "http://www.example.com/processNotification"
}
}curl -X POST "{targetEnvironmentPath}/acceptor/rest/fraudManagement/{installationId}/fraudEvents" \
-u "{apiUser}:{apiPassword}" \
-H "Content-Type: application/json" \
-d '{
"transaction" : {
"transactionId" : "12471709826",
"createTask" : true
},
"notification" : {
"url" : "http://www.example.com/processNotification"
}
}'HTTP/1.1 202
{
"transaction" : {
"transactionId" : "12471709826"
},
"notification" : {
"url" : "http://www.example.com/processNotification"
},
"outcome" : {
"status" : "SUCCESS",
"reasonCode" : "S100",
"reasonMessage" : "Processed"
},
"link" : [ {
"rel" : "task",
"href" : "http://secure.mite.pay360.com/acceptor/rest/fraudManagement/111111/tasks/12471709826"
} ]
}Merchant notification
When an action is performed on a task in the Manage queue we will send a notification to the configured notification URL. This will notify you of the task that has been updated, identified by the transaction id, and will also include the action that was performed on the task.
You can specify where you would like the notification to be sent on each publish fraud event request, or you can tell us where you would like them to be sent for all transactions by setting a default URL in the account configuration.
The URL must use a host name which can be resolved using a public DNS (excluding *.pay360.com), or a public routable IP address (nothing in RFC 1918). We support connecting to merchants on ports 80 or 8080 (for HTTP) and 443 or 8443 (for HTTPS).
Notification
Endpoint
POST http://www.example.com/processNotification
Request body
{
"transactionId":"12471709833",
"action":"ACCEPT"
}
cURL
curl -X POST "http://www.example.com/processNotification" \
-u "{apiUser}:{apiPassword}" \
-H "Content-Type: application/json" \
-d '{
"transactionId":"12471709833",
"action":"ACCEPT"
}'
Complete task endpoint
You can notify us that a task has been handled externally from our system and that its status should be updated to a terminal state by using the complete task endpoint. This will simply update the status of the task; no notifications will be sent.
Complete task - update status to accepted
POST /acceptor/rest/fraudManagement/{installationId}/tasks/{transactionId}/complete{
"status" : "ACCEPTED",
"comment" : "comment"
}curl -X POST "{targetEnvironmentPath}/acceptor/rest/fraudManagement/{installationId}/tasks/{transactionId}/complete" \
-u "{apiUser}:{apiPassword}" \
-H "Content-Type: application/json" \
-d '{
"status" : "ACCEPTED",
"comment" : "comment"
}'HTTP/1.1 201
{
"task" : {
"transactionId" : "12471709826",
"status" : "ACCEPTED"
},
"outcome" : {
"status" : "SUCCESS",
"reasonCode" : "S100",
"reasonMessage" : "Processed"
},
"link" : [ {
"rel" : "self",
"href" : "http://secure.mite.pay360.com/acceptor/rest/fraudManagement/111111/tasks/12471709826"
} ]
}Retrieve task endpoint
An endpoint is provided for retrieving details of an existing task in the Manage queue.
Retrieve a task
GET /acceptor/rest/fraudManagement/{installationId}/tasks/{transactionId}curl -X GET "{targetEnvironmentPath}/acceptor/rest/fraudManagement/{installationId}/tasks/{transactionId}" \
-u "{apiUser}:{apiPassword}" \
-H "Accept: application/json"HTTP/1.1 201
{
"task" : {
"transactionId" : "12471709826",
"status" : "NEW"
},
"link" : [ {
"rel" : "self",
"href" : "http://secure.mite.pay360.com/acceptor/rest/fraudManagement/111111/tasks/12471709826"
} ]
}