사기 신고 웹훅
결제 처리자가 완료된 결제에 대해 사기를 보고하면, Aghanim은 게임에 알리기 위해 fraud.reported webhook을(를) 전송합니다. 이 이벤트는 카드 네트워크 또는 발급사가 결제를 사기로 소급하여 표시할 때, 최초 청구 후 며칠 또는 몇 주 뒤에 도착합니다.
이 웹훅은 Game → Webhooks에서 선택할 수 있는 사기 신고됨 이벤트를 통해 활성화됩니다.
요구 사항
Aghanim의 사기 신고됨 웹훅을 사용하려면 웹훅 서버를 다음과 같이 구 성해야 합니다:
- POST 웹훅 요청을 수락하는 HTTPS 엔드포인트.
- Aghanim이 생성하고 서명한 이벤트를 수신합니다.
- 웹훅 페이로드에 포함된
idempotency_key를 처리하여 중복 웹훅 처리를 방지합니다. - 사기 이벤트가 성공적으로 처리되면 2xx 상태 코드로 응답하고, 거부 또는 오류가 발생하면 4xx 또는 5xx로 응답합니다.
구성
fraud.reported웹훅 처리를 위한 함수를 개발합니다.- 엔드포인트를 사용 가능하게 설정하세요.
- Fraud reported 이벤트 유형을 선택하여 Aghanim 계정 내에서 엔드포인트를 등록합니다 → Game → Webhooks → New Webhook.
대안으로, 웹후크 생성 API 방법을 사용하여 Aghanim 내에서 엔드포인트를 등록할 수 있습니다.
요청 스키마
아래는 예시입니다 fraud.reported 웹훅 요청:
- HTTP
- cURL
POST /your/webhook/uri HTTP/1.1
Content-Type: application/json
Host: your-webhook-endpoint.com
User-Agent: Aghanim/0.1.0
X-Aghanim-Signature: 2e45ed4dede5e09506717490655d2f78e96d4261040ef48cc623a780bda38812
X-Aghanim-Signature-Timestamp: 1725548450
{
"event_type": "fraud.reported",
"event_data": {
"id": "frd_aBcDeFgHiJkLmNoPqRs",
"player_id": "2D2R-OP3C",
"order_id": "ord_eCacpFwavzi",
"payment_id": "pmt_eFgYpxryeKXpLKfmZstI",
"fraud_type": "card_stolen",
"amount": 9499,
"currency": "USD",
"payment_method": "cards",
"reported_at": 1725547595
},
"event_time": 1725548450,
"event_id": "whevt_eCacGbJVbvToOgzjXUgOCitkQE",
"idempotency_key": "idmpt_aXRlb...JkX2VFS",
"request_id": "d1593e9c-c291-4004-8846-6679c2e5810b",
"sandbox": false,
"trigger": null,
"transaction_id": "whtx_eCacGbJVbvT",
"context": null,
"game_id": "gm_exTAyxPsVwh"
}
curl "https://your-webhook-endpoint.com/your/webhook/uri" \
-X POST \
-H "Content-Type: application/json" \
-H "User-Agent: Aghanim/0.1.0" \
-H "X-Aghanim-Signature: 2e45ed4dede5e09506717490655d2f78e96d4261040ef48cc623a780bda38812" \
-H "X-Aghanim-Signature-Timestamp: 1725548450" \
-d '{
"event_type": "fraud.reported",
"event_data": {
"id": "frd_aBcDeFgHiJkLmNoPqRs",
"player_id": "2D2R-OP3C",
"order_id": "ord_eCacpFwavzi",
"payment_id": "pmt_eFgYpxryeKXpLKfmZstI",
"fraud_type": "card_stolen",
"amount": 9499,
"currency": "USD",
"payment_method": "cards",
"reported_at": 1725547595
},
"event_time": 1725548450,
"event_id": "whevt_eCacGbJVbvToOgzjXUgOCitkQE",
"idempotency_key": "idmpt_aXRlb...JkX2VFS",
"request_id": "d1593e9c-c291-4004-8846-6679c2e5810b",
"sandbox": false,
"trigger": null,
"transaction_id": "whtx_eCacGbJVbvT",
"context": null,
"game_id": "gm_exTAyxPsVwh"
}'
이벤트 스키마
| Key | 유형 | 설명 |
|---|---|---|
event_id | string | Aghanim에 의해 생성된 고유 이벤트 ID. |
game_id | string | Aghanim 시스템에서의 귀하의 게임 ID. |
event_type | string | 이벤트의 유형, fraud.reported 이럴 경우. |
event_time | number | 유닉스 에포크 시간으로 된 이벤트 날짜. |
event_data | EventData | 이벤트 특정 데이터가 포함되어 있으며, 상속된 객체에 대한 가능한 키가 포함됩니다. |
idempotency_key | string | 웹훅 작업이 재시도되어도 한 번만 실행되도록 보장합니다. |
request_id | string|null | 이벤트가 API 요청에 의해 트리거된 경우, 요청 ID가 포함됩니다. |
sandbox | boolean | 이 이벤트가 샌드박스 게임 환경에서 전송되었는지를 표시합니다. |
trigger | string|null | The trigger that caused the event to be sent. |
transaction_id | string | Aghanim이 생성한 거래 ID입니다. 이 ID는 동일한 거래 내에서 발생한 여러 이벤트에서 동일할 수 있습니다. |
context | object|null | 이벤트에 대한 컨텍스트 정보. |
EventData 스키마
| 필드 | 유형 | 설명 |
|---|---|---|
id | 문자열 | 사기 보고서의 고유 식별자 |
player_id | 문자열 | 결제를 수행한 플레이어 |
order_id | 문자열 | 결제와 연결된 주문 |
payment_id | 문자열 | 플래그 처리된 결제 |
fraud_type | enum | 정규화된 사기 카테고리 (card_lost, card_stolen, unauthorized_card_use, counterfeit_card, fraudulent_application, other) |
amount | number | 소액 화폐 단위로 표시된 결제 금액 |
currency | 문자열 | 결제 통화 |
payment_method | 문자열 | 사용된 결제 수단(cards, apple_pay, google_pay 등) |
reported_at | integer | 결제 처리자가 사기를 보고한 시점의 Unix 타임스탬프 |
권장 처리 방법
- 선제적 환불을 고려하세요: 사기 보고서는 공식 차지백 이전에 도착합니다. Refund API를 통해 사전에 환불하면 차지백 수수료를 피할 수 있습니다.
- 플레이어에 플래그를 지정하세요: 플레이어별로 사기 보고서를 추적합니다. 동일한 플레이어에 대해
fraud.reported이벤트가 여러 번 발생하면 계정 손상 또는 악용을 나타낼 수 있습니다. - 환불 시 아이템 회수: 환불하는 경우 Item Remove를 통해 지급된 아이템도 회수하세요.
도움이 필요하세요?
통합팀에 문의하십시오 [email protected]