Skip to main content
POST
/
risk
/
risksession
/
v2
Initialize a risk session
curl --request POST \
  --url https://payapi-sandbox.ingo.money/risk/risksession/v2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "request": {
    "participant_id": "12345",
    "timestamp": "1721337425"
  }
}
'
import requests

url = "https://payapi-sandbox.ingo.money/risk/risksession/v2"

payload = { "request": {
"participant_id": "12345",
"timestamp": "1721337425"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({request: {participant_id: '12345', timestamp: '1721337425'}})
};

fetch('https://payapi-sandbox.ingo.money/risk/risksession/v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://payapi-sandbox.ingo.money/risk/risksession/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request' => [
'participant_id' => '12345',
'timestamp' => '1721337425'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://payapi-sandbox.ingo.money/risk/risksession/v2"

payload := strings.NewReader("{\n \"request\": {\n \"participant_id\": \"12345\",\n \"timestamp\": \"1721337425\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://payapi-sandbox.ingo.money/risk/risksession/v2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"participant_id\": \"12345\",\n \"timestamp\": \"1721337425\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://payapi-sandbox.ingo.money/risk/risksession/v2")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"participant_id\": \"12345\",\n \"timestamp\": \"1721337425\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "request": {
    "participant_id": "12345",
    "timestamp": "1721413825"
  },
  "response": {
    "status": "100",
    "message": "Success",
    "duration": "0.30398297309875"
  },
  "session": {
    "risk_session_token": "1e97dde1-f10f-4caf-8726-da6fc207ecb8"
  }
}
{
"request": {
"participant_id": "12345",
"timestamp": "1721413825"
},
"response": {
"status": "800",
"message": "Unknown Client"
}
}

Body

application/json
request
object
required

General information associated with the API request.

Response

Risk session initialized successfully

request
object
response
object
session
object

Identifiers to be embedded in client-side web/mobile code in support of device fingerprinting and behavioral data collection.