POST /v1/transactions

Create a transaction for a user on a project. A user can have multiple transactions on the same project. The user must be redirected to the returned redirect_url to complete the transaction. After the user completes the transaction, they will be redirected to the redirect_url provided in the request.

application/json

Body Required

  • channel string

    Optional channel the user is coming from.

  • sub_channel string

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

  • project_source string

    Optional source of the project.

  • project_sub_source string

    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.

  • targeted_country string

    Optional country you are expecting the user to be in.

  • custom_tags object

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

    Hide custom_tags attribute Show custom_tags attribute object
    • * string Additional properties
  • 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.

  • tx_ref_id string

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

  • ext_survey_source string

    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.

  • ext_survey_id string

    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

  • brand_image_url string

    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.

  • expected_ip string

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

  • expected_user_agent string

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

  • user_demographic object
    Hide user_demographic attributes Show user_demographic attributes object
    • age integer

      Non negative number describing the age of the user.

    • gender string

      Gender of the user.

      Values are male, female, or other.

    • annual_household_income_usd integer

      Non negative number describing the annual household income of the user in USD.

Responses

  • 200 application/json

    OK

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

        the redirect url that the users need to open. Users should not attempt to extract or modify any information from this URL, as it is meant solely for redirection purposes.

POST /v1/transactions
curl \
 --request POST 'https://api.fraud.ink/v1/transactions' \
 --header "X-Api-Token: $API_KEY" \
 --header "Content-Type: application/json" \
 --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":{"additionalProperty1":"string","additionalProperty2":"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","user_demographic":{"age":42,"gender":"male","annual_household_income_usd":42}}'
Request examples
{
  "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": {
    "additionalProperty1": "string",
    "additionalProperty2": "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",
  "user_demographic": {
    "age": 42,
    "gender": "male",
    "annual_household_income_usd": 42
  }
}
Response examples (200)
{
  "data": {
    "id": "string",
    "redirect_url": "string"
  }
}