{
"success": true,
"data": {
"score": 82,
"risk_level": "high",
"recommendation": "review",
"rules": [
{
"id": "PF10003",
"description": "Customer IP Address is probably VPN/Proxy/Bot/Hosting/Cloud."
},
{
"id": "PF10004",
"description": "Customer Email Address is probably invalid or spam."
},
{
"id": "PF10001",
"description": "High purchase rate, according to `customer_ip`."
},
{
"id": "PF10002",
"description": "High purchase rate, according to `customer_id`."
},
{
"id": "PF10013",
"description": "Customer device might not be a real device (according to `customer_useragent`)."
},
{
"id": "PF10014",
"description": "Customer device is registered as a high-risk device (according to `customer_useragent`)."
}
],
"rules_checked": 21,
"rules_detected": 6,
"velocity": {
"ip_24h_count": 4,
"ip_7d_count": 12,
"email_24h_count": 1,
"email_7d_count": 2,
"phone_24h_count": 0,
"phone_7d_count": 3
},
"custom_rules_applied": { "total": 0, "rules": [] }
},
"execution_ms": 5
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Payment fraud detection
curl --request POST \
--url https://v2.greipapi.com/score/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"format": "<string>",
"mode": "<string>",
"source": "<string>"
}
'import requests
url = "https://v2.greipapi.com/score/payments"
payload = {
"data": {},
"format": "<string>",
"mode": "<string>",
"source": "<string>"
}
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({data: {}, format: '<string>', mode: '<string>', source: '<string>'})
};
fetch('https://v2.greipapi.com/score/payments', 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://v2.greipapi.com/score/payments",
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([
'data' => [
],
'format' => '<string>',
'mode' => '<string>',
'source' => '<string>'
]),
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://v2.greipapi.com/score/payments"
payload := strings.NewReader("{\n \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\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://v2.greipapi.com/score/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/score/payments")
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 \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"score": 82,
"risk_level": "high",
"recommendation": "review",
"rules": [
{
"id": "PF10003",
"description": "Customer IP Address is probably VPN/Proxy/Bot/Hosting/Cloud."
},
{
"id": "PF10004",
"description": "Customer Email Address is probably invalid or spam."
},
{
"id": "PF10001",
"description": "High purchase rate, according to `customer_ip`."
},
{
"id": "PF10002",
"description": "High purchase rate, according to `customer_id`."
},
{
"id": "PF10013",
"description": "Customer device might not be a real device (according to `customer_useragent`)."
},
{
"id": "PF10014",
"description": "Customer device is registered as a high-risk device (according to `customer_useragent`)."
}
],
"rules_checked": 21,
"rules_detected": 6,
"velocity": {
"ip_24h_count": 4,
"ip_7d_count": 12,
"email_24h_count": 1,
"email_7d_count": 2,
"phone_24h_count": 0,
"phone_7d_count": 3
},
"custom_rules_applied": { "total": 0, "rules": [] }
},
"execution_ms": 5
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Risk Scoring
Payment Fraud Detection
Prevent financial losses and protect your business by deploying AI-powered modules that analyze transaction patterns in real-time.
This method helps identify and block suspicious activities, mitigating the risk of fraudulent payments and ensuring a secure experience for both you and your customers.
{
"success": true,
"data": {
"score": 82,
"risk_level": "high",
"recommendation": "review",
"rules": [
{
"id": "PF10003",
"description": "Customer IP Address is probably VPN/Proxy/Bot/Hosting/Cloud."
},
{
"id": "PF10004",
"description": "Customer Email Address is probably invalid or spam."
},
{
"id": "PF10001",
"description": "High purchase rate, according to `customer_ip`."
},
{
"id": "PF10002",
"description": "High purchase rate, according to `customer_id`."
},
{
"id": "PF10013",
"description": "Customer device might not be a real device (according to `customer_useragent`)."
},
{
"id": "PF10014",
"description": "Customer device is registered as a high-risk device (according to `customer_useragent`)."
}
],
"rules_checked": 21,
"rules_detected": 6,
"velocity": {
"ip_24h_count": 4,
"ip_7d_count": 12,
"email_24h_count": 1,
"email_7d_count": 2,
"phone_24h_count": 0,
"phone_7d_count": 3
},
"custom_rules_applied": { "total": 0, "rules": [] }
},
"execution_ms": 5
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
POST
/
score
/
payments
Payment fraud detection
curl --request POST \
--url https://v2.greipapi.com/score/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"format": "<string>",
"mode": "<string>",
"source": "<string>"
}
'import requests
url = "https://v2.greipapi.com/score/payments"
payload = {
"data": {},
"format": "<string>",
"mode": "<string>",
"source": "<string>"
}
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({data: {}, format: '<string>', mode: '<string>', source: '<string>'})
};
fetch('https://v2.greipapi.com/score/payments', 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://v2.greipapi.com/score/payments",
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([
'data' => [
],
'format' => '<string>',
'mode' => '<string>',
'source' => '<string>'
]),
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://v2.greipapi.com/score/payments"
payload := strings.NewReader("{\n \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\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://v2.greipapi.com/score/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/score/payments")
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 \"data\": {},\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"score": 82,
"risk_level": "high",
"recommendation": "review",
"rules": [
{
"id": "PF10003",
"description": "Customer IP Address is probably VPN/Proxy/Bot/Hosting/Cloud."
},
{
"id": "PF10004",
"description": "Customer Email Address is probably invalid or spam."
},
{
"id": "PF10001",
"description": "High purchase rate, according to `customer_ip`."
},
{
"id": "PF10002",
"description": "High purchase rate, according to `customer_id`."
},
{
"id": "PF10013",
"description": "Customer device might not be a real device (according to `customer_useragent`)."
},
{
"id": "PF10014",
"description": "Customer device is registered as a high-risk device (according to `customer_useragent`)."
}
],
"rules_checked": 21,
"rules_detected": 6,
"velocity": {
"ip_24h_count": 4,
"ip_7d_count": 12,
"email_24h_count": 1,
"email_7d_count": 2,
"phone_24h_count": 0,
"phone_7d_count": 3
},
"custom_rules_applied": { "total": 0, "rules": [] }
},
"execution_ms": 5
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Authentication
Include your API key in theAuthorization header:
Authorization: Bearer <api_key>
POST /score/payments. The same request is supported at POST /score/payment.
JSON body
object
required
Hide properties
Hide properties
string
The action your customer try to implement.Accepts:
purchase, deposit, or withdrawal.string
The domain name of the website the customer trying to purchase from.Sample value:
domain.comstring
The name of the website the customer trying to purchase from.Sample value:
Nike Store, Californiastring|integer
If your a service provider with âsub-websitesâ (like Shopify), then provide a unique identification code indicating the website the customer trying to purchase from.Sample values:
12330098, 01as-aowq-029jd, or abcdefg.string|integer|number
The identification code of the shipment.
string|integer|number
The identification code of the transaction in your system.
string|number|float
The total amount of the transaction.
string
The currency in which the customer pay with.Sample value:
GBPstring|integer|number
boolean
Set this to true if the customer is purchasing a digital product.
string
The promo code used by the customer to complete the checkout.
string|integer
The identification number of the customer in your system.
string
The first name of the customer.
string
The last name of the customer (Family Name).
string
The Place of Birth of the customer.
string
The IP address of the customer.
string
The
ISO 3166-1 alpha-2 code format of the country where the customer live. Learn morestring
The name of the region where the customer live.
string
The name of the city where the customer live.
string|integer|number
The name of the zip code of customer location.
string
The âaddress line 1â of the customer.
string
The âaddress line 2â of the customer.
integer|float
The customer latitude on the map (GPS Coordinates).
integer|float
The customer longitude on the map (GPS Coordinates).
string|integer|number
The device identification code of the customer.
string|integer|number
The phone number of the customer (international format).
integer
The registration date of the customer (UNIX Timestamp).
string|integer|float
If you offer a Wallet feature in your website, then pass the user balance to this pararmeter.
string
The customerâs date of birth.Sample value: â1985-12-27`
string
The email address of the customer.
boolean
Set this to true if the customer has 2FA enabled in his/her account.
string
Pass the User Agent of the customer to this parameter.
string
The shipping country code of the customer (in
ISO 3166-1 alpha-2 format).string
The shipping region name of the customer.
string
The shipping city name of the customer.
string|number|integer
The zip code of the customerâs shipping address.
string
The shipping âaddress 1â of the customer.
string
The shipping âaddress 2â of the customer.
integer|number|float
The latitude of the customerâs shipping address (GPS Coordinates).
integer|number|float
The longitude of the customerâs shipping address (GPS Coordinates).
string
The billing country code of the customer (in
ISO 3166-1 alpha-2 format).string
The billing region name of the customer.
string
The billing city name of the customer.
string|number|integer
The zip code of the customerâs billing address.
string
The billing âaddress 1â of the customer.
string
The billing âaddress 2â of the customer.
integer|float
The latitude of the customerâs billing address (GPS Coordinates).
integer|float
The longitude of the customerâs billing address (GPS Coordinates).
string
The payment method used to complete this transaction.Accepted values:
cards, cards_mada, applepay, stcpay, bank, crypto, wallet, or cod.string
The name on the card (Cardholder Name).
string|number|integer
The card number (min: 6 digits).
string
The expiry date of the customer debit/credit card.Sample value: 29/05
boolean
Set this to true if the customer passed the CVV/CSV verification process.
string
default:"JSON"
The format command is used to get a response in a specific format.Expected values:
JSON, XML, CSV, or NewlineFor more information please refer to Response format.string
default:"live"
The mode command is used in the development stage to simulate the integration process before releasing it to the production environment.Expected values:
live, or test.For more information please refer to Development environment.string
Optional label for your own analytics or support correlation (for example a product or channel name).
Response properties
boolean
required
true when the request succeeded; false on error.object
required
Hide properties
Hide properties
float
A risk-score from 0 to 100 indicating how risky this transaction is
(
10.5 means itâs 10.5% risky to pass this transaction).string
required
Overall risk band (
low, medium, or high).string
required
Suggested action (
accept, review, or reject) derived from the risk assessment.array
required
integer
required
Total rules checked against the transaction.
integer
required
Total rules detected in the transaction.
object
Present when
customer_id is set in the payment data object or when request user_id is provided. Counts recent scored payment requests for the same merchant scope (website domain and/or merchant id).Hide properties
Hide properties
integer
Scored payment requests sharing
customer_ip in the last 24 hours.integer
Scored payment requests sharing
customer_ip in the last 7 days.integer
Scored payment requests sharing
customer_email in the last 24 hours.integer
Scored payment requests sharing
customer_email in the last 7 days.integer
Scored payment requests sharing
customer_phone and the same country code (customer_country, billing_country, or shipping_country) in the last 24 hours.integer
Scored payment requests sharing
customer_phone and the same country code in the last 7 days.object
The custom rules applied to this request, learn
more.
Hide properties
Hide properties
integer
required
The total number of custom rules applied to this request.
object
required
The custom rules applied to this request, learn
more.
integer
required
Time taken to process the request (milliseconds).
Was this page helpful?