Get Transaction

GET /v1/transactions/{id}

Get a transaction by id.

Path parameters

  • id string Required

    transaction id

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id string Required

        Transaction id

      • score integer

        Quality score of the transaction. Can be null if the transaction is not completed. The value is between 0 and 100, where 0 is no fraud and 100 is definitely fraud.

      • Probability [0, 1] that this item is a duplicate. A value of 1 means that the user has completed this item in the past

      • data object Required
        Hide data attributes Show data attributes object
        • channel string

          Optional channel the user is coming from.

        • Optional sub-channel the user is coming from. Unique per channel.

        • Optional source of the project.

        • Optional sub-source of the project. Unique per project_source.

        • user_id string Required

          Unique identifier of the user. Unique per channel & sub_channel.

        • project_type string Required

          The kind of project the user is joining.

          Values are survey, offer, or custom.

        • project_id string Required

          Unique identifier of the project. Unique per project_type, project_source & project_sub_source.

        • Optional country you are expecting the user to be in.

        • Optional custom tags to be associated with the transaction. Included in transaction lookup API calls.

          Hide custom_tags attributes Show custom_tags attributes object
        • redirect_url string Required

          URL to redirect the user to after they complete the transaction. {tx_id} will be replaced with the actual transaction id.

        • Optional reference id of a previously created transaction. If provided, all other fields will be ignored, except for redirect_url and custom_tags, which will be merged/overridden instead. Useful when a user is sent multiple times for a project (e.g. before & after a survey).

        • Optional survey source. Cannot be empty when ext_survey_id is not empty. if ext_survey_id and ext_survey_source are set, the partner opts in to deduplicate the transaction against all other partners' transactions that have these set Only available when type is survey

          Values are lucid, purespectrum, cint, or prodege.

        • Optional survey_id. Cannot be empty when ext_survey_source is not empty. if ext_survey_id and ext_survey_source are set, the partner opts in to deduplicate the transaction against all other partners' transactions that have these set Only available when type is survey

        • Optional url to an image. This is used to customize the loader while the user is redirected. If this is not set a default loader is used.

        • Optional expected ip of the user. If set it must be a valid IPv4 or Ipv6 address

        • Optional expected User Agent. If set it must be between 1 and 255 characters.

      • state_transitions array[object]

        Each entry in the array represents a transition of state for a transaction.

        Hide state_transitions attributes Show state_transitions attributes object
        • Values are quota, qualification, or quality.

        • state string Required

          Values are completed, terminated, or reconciled.

        • ts string(date-time) Required
      • created_at string(date-time) Required

        Date and time when the transaction was created.

      • completed_at string(date-time)

        Date and time when the transaction was completed. If you receive a redirect but this is null, the user likely skipped the transaction or tempered with the frontend. Furthermore, it is recommended to compare the complete time with the time the user was redirected to your site. If the difference is too big, this could indicate a fraud attempt.

GET /v1/transactions/{id}
curl \
 -X GET https://api.fraud.ink/v1/transactions/{id}
Response examples (200)
{
  "data": {
    "id": "string",
    "score": 42,
    "duplication_potential": 42.0,
    "data": {
      "channel": "string",
      "sub_channel": "string",
      "project_source": "string",
      "project_sub_source": "string",
      "user_id": "string",
      "project_type": "survey",
      "project_id": "string",
      "targeted_country": "string",
      "custom_tags": {
        "key": "string"
      },
      "redirect_url": "string",
      "tx_ref_id": "string",
      "ext_survey_source": "lucid",
      "ext_survey_id": "string",
      "brand_image_url": "string",
      "expected_ip": "string",
      "expected_user_agent": "string"
    },
    "state_transitions": [
      {
        "termination_reason": "quota",
        "state": "completed",
        "ts": "2024-05-04T09:42:00+00:00"
      }
    ],
    "created_at": "2024-05-04T09:42:00+00:00",
    "completed_at": "2024-05-04T09:42:00+00:00"
  }
}