> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.idenfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Monitoring API Quickstart

> Six steps to integrate the Transaction Monitoring API: create a test key, send a transaction, add a rule, catch an alert, subscribe a webhook and go live.

Each step is something you do in the Transaction Monitoring dashboard or with one request. By the end you will have sent a transaction, seen a rule catch it, and had a webhook tell your system about it.

**1. Create a test API key**

In the Transaction Monitoring dashboard, open **Developer → API keys** and create a **test** key. Everything sent with a test key is test data and never reaches live monitoring, so you can integrate without affecting your compliance team's queue.

Give the key the **Ingest Transactions** and **View Transactions** permissions for this walkthrough. See [API keys in the dashboard](https://documentation.idenfy.com/guides/dashboard/transaction-monitoring/api-keys.md) for the full permission list.

> [!NOTE]
>
> A new account starts in **sandbox mode**: a banner at the top of the dashboard says so, and every key you create there is a test key. Live keys become available once iDenfy has switched your account to live monitoring.

**2. Send your first transaction**

```bash cURL theme={"system"}
curl -X POST https://ivs-tx-monitoring.idenfy.com/api/v1/ingest/ \
  -H "X-API-Key: $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "BANK_PAYMENT",
    "externalId": "pay-10001",
    "amount": "250.00",
    "currency": "EUR",
    "direction": "OUTBOUND",
    "subject": { "id": "cust-42", "name": "Jane Doe", "country": "LT" },
    "counterparty": { "id": "acct-77", "name": "ACME Ltd", "country": "DE", "type": "COMPANY" }
  }'
```

```python Python theme={"system"}
import os, requests

response = requests.post(
    "https://ivs-tx-monitoring.idenfy.com/api/v1/ingest/",
    headers={"X-API-Key": os.environ["TM_API_KEY"]},
    json={
        "type": "BANK_PAYMENT",
        "externalId": "pay-10001",
        "amount": "250.00",
        "currency": "EUR",
        "direction": "OUTBOUND",
        "subject": {"id": "cust-42", "name": "Jane Doe", "country": "LT"},
        "counterparty": {"id": "acct-77", "name": "ACME Ltd", "country": "DE", "type": "COMPANY"},
    },
    timeout=30,
)
print(response.status_code, response.json())
```

```javascript Node.js theme={"system"}
const response = await fetch("https://ivs-tx-monitoring.idenfy.com/api/v1/ingest/", {
  method: "POST",
  headers: { "X-API-Key": process.env.TM_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    type: "BANK_PAYMENT",
    externalId: "pay-10001",
    amount: "250.00",
    currency: "EUR",
    direction: "OUTBOUND",
    subject: { id: "cust-42", name: "Jane Doe", country: "LT" },
    counterparty: { id: "acct-77", name: "ACME Ltd", country: "DE", type: "COMPANY" },
  }),
});
console.log(response.status, await response.json());
```

```php PHP theme={"system"}
$ch = curl_init("https://ivs-tx-monitoring.idenfy.com/api/v1/ingest/");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("TM_API_KEY"), "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode([
        "type" => "BANK_PAYMENT",
        "externalId" => "pay-10001",
        "amount" => "250.00",
        "currency" => "EUR",
        "direction" => "OUTBOUND",
        "subject" => ["id" => "cust-42", "name" => "Jane Doe", "country" => "LT"],
        "counterparty" => ["id" => "acct-77", "name" => "ACME Ltd", "country" => "DE", "type" => "COMPANY"],
    ]),
]);
echo curl_exec($ch);
```

The response is `202 Accepted` with the outcome already decided:

```json theme={"system"}
{ "transactionId": "5b0f6c2e-8d0a-4f7e-9a51-1f3c2d7e9b10", "status": "PASSED" }
```

Keep `transactionId`: every later read and every webhook about this transaction uses it.

**3. Create a rule**

Until at least one rule is active, every transaction comes back `PASSED`. This is the step whose absence makes a working integration look broken. Create a rule under **Rules** in the dashboard (the rule library has ready-made AML scenarios), or with `POST /api/v1/rules/`. See [Rules in the dashboard](https://documentation.idenfy.com/guides/dashboard/transaction-monitoring/rules.md).

**4. Send a transaction that matches, and find the alert**

Send a transaction the rule catches, for example one above its amount threshold. It comes back `FLAGGED` or `BLOCKED`, depending on the rule, and an alert opens under **Alerts** with a severity and a review deadline.

**5. Subscribe a webhook**

Under **Developer → Webhooks** (shown to users with the Integrations permission), add an HTTPS endpoint you control and subscribe it to `transaction.processed`, `transaction.status_changed` and the alert events. Use **Send test** to check your endpoint verifies the signature. See [Webhooks](https://documentation.idenfy.com/transaction-monitoring/webhooks.md).

**6. Go live**

Once your account is out of sandbox mode, create a **live** key and switch your integration to it. A live key is shown only once, when you create it, so store it in your secret manager straight away. Each live transaction is billed; see [Limits and expectations](https://documentation.idenfy.com/transaction-monitoring/limits-and-expectations.md).

> [!NOTE]
>
> Test data you sent while integrating stays out of live alert queues, SLAs, notifications and reports, so there is nothing to clean up before going live.


## Related topics

- [Transaction Monitoring API](https://documentation.idenfy.com/transaction-monitoring/overview.md)
- [Transaction Monitoring API: Sending Transactions](https://documentation.idenfy.com/transaction-monitoring/ingest.md)
- [Transaction Monitoring API Authentication](https://documentation.idenfy.com/transaction-monitoring/authentication.md)
- [Transaction Monitoring API Errors](https://documentation.idenfy.com/transaction-monitoring/errors.md)
- [Transaction Monitoring API Webhooks](https://documentation.idenfy.com/transaction-monitoring/webhooks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.