# Counterparty Trust Check: ALLOW/REVIEW/DENY before you pay (`probelane/counterparty-trust-check`) Actor

Before an agent pays an invoice, accepts new bank details, onboards a vendor or emails a new counterparty: one call returns ALLOW / REVIEW / DENY, a 0-100 score, reasons, next actions, and what changed since your last check.

- **URL**: https://apify.com/probelane/counterparty-trust-check.md
- **Developed by:** [Probelane](https://apify.com/probelane) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 trust verdicts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Counterparty Trust Check

**One call, one verdict: should your agent trust this domain?**

Use it before an AI agent (or a workflow) pays an invoice, sends money or data, signs up, accepts a webhook, or emails a new counterparty. Input a domain, URL or email address; get back `ALLOW`, `REVIEW` or `DENY` with a 0–100 score, plain-language reasons and the raw public evidence.

### When an agent should pick this tool

- A payment request, invoice or wallet address arrives from an unfamiliar domain.
- A new vendor, supplier or API provider must be onboarded.
- An inbound email asks for money, credentials or a change of bank details (check the sender's domain).
- A link or checkout page must be judged before entering details.

### Input

```json
{"domains": ["stripe.com", "billing@new-vendor.xyz"]}
```

### Output (one dataset item per domain)

```json
{"domain":"nsfas.org.za","verdict":"ALLOW","score":80,
 "flags":["no DMARC: email from this domain can be spoofed"],
 "evidence":{"resolves":true,"mx":["nsfas-org-za.mail.protection.outlook.com"],"spf":"v=spf1 ...","dmarc":{"record":null},"domain_age_days":null,"tls":{"valid":true}},
 "checked_utc":"2026-10-07T14:40:00+00:00"}
```

### Built for repeat use in agent workflows

Every verdict carries:

- `recheck_after_utc` — when this counterparty should be checked again (24 h for DENY/REVIEW, 72 h for young domains, 7 days otherwise).
- `changed_since_last_check` + `changes` — compared with your own previous check of the same domain (DMARC policy, MX, SPF, TLS issuer, score, verdict). A counterparty whose mail setup changes right before a payment request is the classic invoice-fraud pattern.
- `next_actions` — machine tokens such as `do_not_pay_or_send_data`, `require_out_of_band_confirmation_before_payment`, `verify_payment_or_bank_detail_requests_by_second_channel`.
- `history` — your last 20 verdicts for that domain.

History is kept in a named key-value store in **your own** Apify account (`counterparty-trust-history`), readable and exportable any time. Turn it off with `"rememberHistory": false`.

Recommended pattern: call before every payment, onboarding or bank-detail change; schedule a re-check of your active vendor list at `recheck_after_utc`.

### Signals

Domain existence (NXDOMAIN → DENY), domain age via RDAP (<30 days heavily penalised), valid TLS certificate, MX present, SPF, DMARC policy (missing / p=none means email from the domain can be spoofed), registry hold status.

### Pricing

Pay per event: **$0.01 per verdict** (one event per unique domain). No platform usage charges. Typical latency 1–3 s per domain. Payable by AI agents with USDC via x402 where eligible.

### Limits

Public signals only; a verdict is a risk signal, not a guarantee. Some ccTLDs (e.g. .co.za) do not publish registration dates over RDAP; this is flagged, not hidden.

# Actor input Schema

## `domains` (type: `array`):

Domains, URLs or email addresses to check (e.g. stripe.com, https://vendor.io/pay, billing@vendor.io). One verdict is returned and charged per domain.

## `denyBelow` (type: `integer`):

Score below which the verdict is DENY.

## `allowAtOrAbove` (type: `integer`):

Score at or above which the verdict is ALLOW. Between the thresholds the verdict is REVIEW.

## `rememberHistory` (type: `boolean`):

Keeps each domain's last verdict in a named key-value store in YOUR account ('counterparty-trust-history') so later checks report what changed (DMARC, MX, TLS, score). Readable and exportable by you at any time.

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "example-unknown-vendor.xyz"
  ],
  "denyBelow": 45,
  "allowAtOrAbove": 75,
  "rememberHistory": true
}
```

# Actor output Schema

## `verdicts` (type: `string`):

No description

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "stripe.com",
        "example-unknown-vendor.xyz"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("probelane/counterparty-trust-check").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "stripe.com",
        "example-unknown-vendor.xyz",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("probelane/counterparty-trust-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "stripe.com",
    "example-unknown-vendor.xyz"
  ]
}' |
apify call probelane/counterparty-trust-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,probelane/counterparty-trust-check"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Lpa7bcBaQogaDeiGy/builds/NJ87g5daCNRAxjVu8/openapi.json
