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

# 거래 모니터링 빠른 시작: 10분 설정 가이드

> Didit의 거래 모니터링으로 첫 거래를 제출하고, 규칙 실행과 webhook 연동을 10분 안에 확인하세요. 월 1,000건 무료 제공, 이후 건당 $0.001.

Transaction Monitoring을 10분 이내에 설정합니다. 테스트 거래를 제출하고 점수를 확인한 뒤, 사전 설정 규칙을 활성화하고 다시 제출하여 규칙이 발동하는지 확인하고, webhook이 도착하는지도 검증합니다.

## 사전 준비 사항

* 거래 모니터링이 활성화된 Didit 애플리케이션(*Settings → Transaction Monitoring → Enable*).
* API 키.
* 인터넷에서 접근 가능한 webhook endpoint.

## 단계

**1. 기준 거래 제출**

```bash theme={null}
curl -X POST https://verification.didit.me/v3/transactions/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "baseline-0001",
    "transaction_category": "finance",
    "transaction_details": {
      "direction": "outbound",
      "amount": "500.00",
      "currency": "EUR"
    },
    "subject": { "entity_type": "person", "vendor_data": "user-42", "full_name": "Jane Doe" },
    "counterparty": { "entity_type": "company", "full_name": "Acme Supplier" }
  }'
```

응답에 포함되는 항목:

* `status`: 발동된 규칙이 없으면 `APPROVED`, 하나 이상 발동되면 `IN_REVIEW` 또는 `DECLINED`.
* `score`: 정수 0–100+.
* `rule_runs`: 이 거래를 평가한 모든 규칙의 배열.

**2. 사전 설정 규칙 활성화**

Business Console에서 *Transactions → Rules → Library*로 이동합니다. 사전 설정 규칙을 선택합니다(예: **Structuring (outbound)**). 이 규칙은 동일한 사용자가 30일 이내에 €10,000 미만의 아웃바운드 이체를 20+건 보내면 발동합니다. 규칙을 활성화하고 저장합니다.

**3. 규칙을 발동시키는 거래 제출**

동일한 사용자에 대해 각각 €10,000 미만인 거래 20건을 빠르게 제출합니다:

```bash theme={null}
for i in $(seq 1 20); do
  curl -X POST https://verification.didit.me/v3/transactions/ \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{
      \"transaction_id\": \"struct-$i\",
      \"transaction_category\": \"finance\",
      \"transaction_details\": {
        \"direction\": \"outbound\",
        \"amount\": \"9500.00\",
        \"currency\": \"EUR\"
      },
      \"subject\": { \"entity_type\": \"person\", \"vendor_data\": \"user-42\", \"full_name\": \"Jane Doe\" },
      \"counterparty\": { \"entity_type\": \"company\", \"full_name\": \"Shell Co $i\" }
    }"
done
```

20번째 제출 시 Structuring 규칙이 발동합니다. 거래는 `status: IN_REVIEW`를 반환하며, `score`는 해당 규칙의 `score_delta`를 반영합니다.

**4. 거래 webhook 구독**

```bash theme={null}
curl -X POST https://verification.didit.me/v3/webhook/destinations/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "TM events",
    "url": "https://yourapp.com/webhooks/didit-tm",
    "subscribed_events": ["transaction.created", "transaction.status.updated"]
  }'
```

응답에는 `secret_shared_key`가 포함됩니다. 즉시 저장하여 `.env`에 `DIDIT_WEBHOOK_SECRET`으로 설정합니다:

```bash theme={null}
DIDIT_WEBHOOK_SECRET=whsec_...   # signing secret returned from webhook registration
```

그다음 신뢰하기 전에 들어오는 모든 webhook의 `X-Signature-V2` HMAC을 검증합니다(정규화된 본문에 대해 HMAC-SHA256을 다시 계산하고, 상수 시간 비교를 수행하며, 오래된 타임스탬프는 거부합니다). 페이로드와 전체 검증 코드는 [TM webhooks](https://docs.didit.me/ko/transaction-monitoring/webhooks.md)를 참조하십시오.

이후의 모든 거래는 실시간으로 endpoint에 전송됩니다.

**5. 콘솔에서 확인**

콘솔에서 *Transactions*로 이동합니다:

* 목록 보기: 최근 거래, 필터, 일괄 작업.
* 거래 상세: 규칙 실행 내역, IP 정보 보강, 당사자 세부 정보, 네트워크 그래프(암호화폐의 경우), 연결된 알림 및 케이스.

**6. API로 거래 조회**

```bash theme={null}
curl https://verification.didit.me/v3/transactions/{transaction_id}/ \
  -H "x-api-key: YOUR_API_KEY"
```

전체 [응답 스키마](https://docs.didit.me/ko/transaction-monitoring/response-schema.md)를 반환합니다. 여기에는 점수, 일치한 규칙, 당사자 보강 정보, AML 스크리닝 등 그 밖에 더 많은 정보가 포함됩니다.

## 설정한 내용

* **실시간 점수 산정**: 모든 거래는 활성화된 모든 규칙을 거칩니다.
* **AML 스크리닝**: 거래 상대방은 제재 및 부정적 언론 보도에 대해 자동으로 스크리닝됩니다.
* **IP 정보 보강**: 모든 거래에 IP 국가, ASN, VPN/Tor 플래그가 추가됩니다.
* **webhook**: 모든 거래에 대해 실시간으로 알림을 받습니다.
* **감사 추적**: 규칙 실행, 알림, 상태 전환을 모두 콘솔에서 조회할 수 있습니다.

## 다음 단계로 진행할 작업

> [card] [연동 가이드](https://docs.didit.me/ko/transaction-monitoring/integration-guide.md)
>
> 전체 아키텍처와 패턴.

> [card] [규칙 심층 분석](https://docs.didit.me/ko/transaction-monitoring/rules.md)
>
> 규칙의 작동 방식, 조건, 집계, 작업.

> [card] [위험 점수 산정](https://docs.didit.me/ko/transaction-monitoring/risk-scoring.md)
>
> 점수가 상태로 결합되는 방식.

> [card] [거래 payload](https://docs.didit.me/ko/transaction-monitoring/transactions.md)
>
> 전체 거래 제출 스키마.

> [card] [상태](https://docs.didit.me/ko/transaction-monitoring/statuses.md)
>
> 거래, 알림, 케이스 상태.

> [card] [케이스](https://docs.didit.me/ko/transaction-monitoring/cases.md)
>
> 조사 및 해결.


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