Optimize Manage / Investigate Direct

If you are using Optimize Investigate and 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 create a new case in Optimize Investigate 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 create a case in Optimize Investigate 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 of the overall decision given by the rules engine. A notification URL can be supplied which we 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.

The response will contain a direct link to the transaction in Optimize Investigate and if specified in the request will also contains a link to the task created in the Manage queue.

API
API Examples
Publish fraud event

POST /acceptor/rest/fraudManagement/{instId}/fraudEvents
{
  "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"
  } ]
}
API Endpoint
endpoint: /acceptor/rest/fraudManagement/{instId}/fraudEvents
method: POST
summary: Publish fraud event

parameters:

Name
Data Type
Description
instId
The installation id
request body:
{
transaction {
transactionId string
Mandatory
The transaction id of an existing Optimize Direct transaction.
createTask boolean
Indicates if a task should be created on the Manage queue. If this field is omitted then our system will decide whether or not a task should be created based on the decision given by the rules engine.
}
notification {
url string
The URL that a notification will be sent to in the event of a task being actioned in the Manage queue.
}
}
response:
{
transaction {
transactionId string
The transaction id of an existing Optimize Direct transaction.
createTask boolean
Indicates if you requested for a task to be created on the Manage queue.
}
notification {
url string
The notification URL that was supplied in the request.
}
outcome { Information about the overall outcome of the request.
reasonMessage string
A message indicating the overall outcome of the request. This is where we’ll provide detailed reasons for any errors.
status string
Possible Values: SUCCESS, FAILED
The overall outcome of the request.
reasonCode string
A code indicating the overall outcome of the request. Refer to Errors for more information.
}
link [
{
rel string
Identifies the relationship to the requested resource.
href string
Direct link to the resource.
}
]
}

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).

API
API Examples
Notification

POST http://www.example.com/processNotification

{
   "transactionId":"12471709833",
   "action":"ACCEPT"
}
API Endpoint
endpoint: merchant defined notification URL
method: POST
summary: Receive a notification request
notification request:

}

{
transactionId string
The transaction id associated with the task that was updated.
action string
Indicates the action that was performed on the Manage queue task
Possible Values: ACCEPT, REJECT

Complete task endpoint

You can notify us that a task has bean 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.

API
API Examples
Complete task - update status to accepted

POST /acceptor/rest/fraudManagement/{instId}/tasks/{transactionId}/complete

{
  "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"
  } ]
}

API Endpoint
endpoint: /acceptor/rest/fraudManagement/{instId}/tasks/{transactionId}/complete
method: POST
summary: Complete a task

parameters:

Name
Data Type
Description
instId
The installation id
transactionId
The transaction id associated with the task
request body:

}

{
status string
Mandatory
The terminal status to update the task to.
Possible Values: ACCEPTED, REJECTED, FLUSHED
comment string
An optional comment explaining why the action was taken. Maximum length: 255.
response:

}

{
task {
transactionId string
The transaction id associated with the task.
status string
The new status of the task.
Possible Values: ACCEPTED, REJECTED, FLUSHED
}
outcome { Information about the overall outcome of the request.
reasonMessage string
A message indicating the overall outcome of the request. This is where we’ll provide detailed reasons for any errors.
status string
Possible Values: SUCCESS, FAILED
The overall outcome of the request.
reasonCode string
A code indicating the overall outcome of the request. Refer to Errors for more information.
link [
{
rel string
Identifies the relationship to the requested resource.
href string
Direct link to the resource.
}
]
}

Retrieve task endpoint

An endpoint is provided for retrieving details of an existing task in the Manage queue.

API
API Examples
Retrieve a task

GET /acceptor/rest/fraudManagement/{instId}/tasks/{transactionId}

HTTP/1.1 201
{
  "task" : {
    "transactionId" : "12471709826",
    "status" : "NEW"
  },
  "link" : [ {
    "rel" : "self",
    "href" : "http://secure.mite.pay360.com/acceptor/rest/fraudManagement/111111/tasks/12471709826"
  } ]
}

API Endpoint
endpoint: /acceptor/rest/fraudManagement/{instId}/tasks/{transactionId}
method: GET
summary: Retrieve a task

parameters:

Name
Data Type
Description
instId
The installation id
transactionId
The transaction id associated with the task
response:

}

{
task {
transactionId string
The transaction id associated with the task.
status string
The new status of the task.
Possible Values: ACCEPTED, REJECTED, FLUSHED
link [
{
rel string
Identifies the relationship to the requested resource.
href string
Direct link to the resource.
}
]
}