# Webhook - 결제 캡처 완료 ## 1. Webhook Overview ### Purpose [context] 승인(Authorization)된 결제 건에 대해 실제 매입(Capture) 처리가 성공적으로 완료되었을 때 EBP 시스템에서 상점으로 전송하는 Webhook 이벤트입니다.
이 이벤트를 통해 상점은 결제 대금이 최종적으로 확보되었음을 확인하고 후속 처리를 진행할 수 있습니다. [/context] > **참고**: Webhook 수신을 위해 URL 등록이 필요합니다. (문의: [ebp-server@lge.com](mailto:ebp-server@lge.com)) ### Details [table:key-value] | 항목 | 값 | | :--- | :--- | | **Webhook Name** | 결제 캡처 완료 | | **Event Type** | `PAYMENT_CAPTURED` | | **HTTP Method** | [badge:POST,blue,lg] | | **Region** | [badge:Global,green-subtle,lg] | [/table] @@include:webhook-authentication.md@@ ## 3. Data Schema ### 3.1. Payload Data Schema | depth | Field | Details & Description | | :--- | :--- |:--------------------------------------------------------------------------------------------------------------------| | -1 | eventType | [type:string] [req:Yes] [desc:이벤트 유형] [eg:PAYMENT_CAPTURED] | | -1 | eventTime | [type:string] [req:Yes] [desc:이벤트 발생 시각[tooltip:UTC, ISO-8601]] [eg:2025-12-30T07:19:28Z] | | -1 | data | [type:object] [req:Yes] [desc:캡처 상세 데이터] | | 0 | orderNo | [type:string] [req:Yes] [desc:EBP 주문 번호] [eg:ORD_7202603277730794] | | 0 | paymentStatus | [type:string] [req:Yes] [desc:결제 상태 코드] [eg:CAPTURED, FAIL] | | 0 | capturedAmount | [type:string] [req:Yes] [desc:최종 캡처(매입) 금액] [eg:1250000] | | 0 | currencyCode | [type:string] [req:Yes] [desc:통화 코드. ISO 4217] [eg:KRW] | | 0 | exponent | [type:number] [req:Yes] [desc:통화 소수점 자리수] [eg:0] | | 0 | resultCode | [type:string] [req:Yes] [desc:EBP 결과 코드 ('0': 성공)] [eg:0] | | 0 | resultMessage | [type:string] [req:Optional] [desc:결과 메시지] [eg:SUCCESS] | | 0 | capturedAt | [type:string] [req:Yes] [desc:EBP 캡처 완료 일시[tooltip:UTC, ISO-8601]] [eg:2025-12-30T07:19:28Z] | | 0 | pgProvider | [type:string] [req:Yes] [desc:결제 PG사 코드] [eg:WORLDPAY, CHECKOUT] | ## 3.2. Payload 예시 ### HTTP Request ```http POST /your-webhook-endpoint HTTP/1.1 Content-Type: application/json x-webhook-signature: 25f0e... (HMAC-SHA256 Hex String) x-webhook-signature-timestamp: 1735543168 (Unix Epoch Seconds) { "eventType": "PAYMENT_CAPTURED", "eventTime": "2025-12-30T07:19:28Z", "data": { "orderNo": "ORD_7202603277730794", "paymentStatus": "CAPTURED", "capturedAmount": "1250000", "currencyCode": "KRW", "resultCode": "0", "resultMessage": "SUCCESS", "capturedAt": "2025-12-30T07:19:28Z", "pgProvider": "WORLDPAY" } } ```