# PG정산대사

## PG정산대사 목록 조회

> \## 기능설명\
> \* PG정산대사 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 화면에서 넘어온 조건에 맞는 PG 정산대사 내용을 조회합니다.\
> \* 조회 날짜에 맞는 EC 시스템 승인/취소 건, PG 사 승인/취소 건의 금액 정보와 두 승인/취소 건에 대한 입금예정액, 입금금액 차이의 합을 조회합니다.\
> \---\
> \## 코드정리\
> \* \`\`\`조회날짜기준(searchDateType)\`\`\` : aprvDt: 승인일자 기준 조회, dptDt: 입금일자 기준 조회\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG정산대사 최초 개발<br>

````json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PgAdjCoprRequest":{"type":"object","description":"PG정산대사 목록 조회 요청 DTO","properties":{"siteNo":{"type":"string","description":"사이트번호"},"searchDateType":{"type":"string","description":"조회날짜기준타입"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"trdNo":{"type":"string","description":"거래번호"},"dptCfmYn":{"type":"string","description":"입금확정여부"},"payWayCd":{"type":"string","description":"결제수단코드(OM013)"},"ordNo":{"type":"string","description":"주문번호"},"termlId":{"type":"string","description":"터미널ID"},"payStatCd":{"type":"string","description":"결제구분"}}},"RealGridListResponsePgAdjCoprResponse":{"type":"object","properties":{"totalCount":{"type":"integer","format":"int32"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PgAdjCoprResponse"}}}},"PgAdjCoprResponse":{"type":"object","description":"PG정산대사 조회 응답 DTO","properties":{"infLogSeq":{"type":"string","description":"인터페이스로그순번"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"pgGbNm":{"type":"string","description":"PG구분명(OM030)"},"mersEtcGbNm":{"type":"string","description":"가맹점기타구분코드명(OM052)"},"ordNo":{"type":"string","description":"주문번호"},"payStatus":{"type":"string","description":"결제상태명"},"payWayNm":{"type":"string","description":"결제수단명"},"aprvCnclDt":{"type":"string","description":"승인/취소일자"},"payAmt":{"type":"number","description":"결제금액"},"expectedFee":{"type":"integer","format":"int64","description":"예정수수료"},"expectedDepositAmt":{"type":"integer","format":"int64","description":"입금예정금액"},"approveAmt":{"type":"integer","format":"int64","description":"PG승인금액"},"paymentFee":{"type":"integer","format":"int64","description":"PG결제수수료"},"depositAmt":{"type":"integer","format":"int64","description":"입금금액"},"dptDt":{"type":"string","description":"입금일자"},"etcAdjAmt":{"type":"number","description":"기타조정금액"},"depositAmtDiff":{"type":"integer","format":"int64","description":"입금금액차"},"adjAjstCausConts":{"type":"string","description":"정산조정사유내용"},"dptCfmYn":{"type":"string","description":"입금확정여부"},"dptCfmDtm":{"type":"string","format":"date-time","description":"입금확정일시"},"trdNo":{"type":"string","description":"거래번호"},"termlId":{"type":"string","description":"터미널ID"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"totalCount":{"type":"integer","format":"int32","description":"전체건수"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v2/adjust/pgAdjust/getPgAdjustCompareList":{"post":{"tags":["PG정산대사"],"summary":"PG정산대사 목록 조회","description":"## 기능설명\n* PG정산대사 목록을 조회합니다.\n---\n## 상세설명\n* 화면에서 넘어온 조건에 맞는 PG 정산대사 내용을 조회합니다.\n* 조회 날짜에 맞는 EC 시스템 승인/취소 건, PG 사 승인/취소 건의 금액 정보와 두 승인/취소 건에 대한 입금예정액, 입금금액 차이의 합을 조회합니다.\n---\n## 코드정리\n* ```조회날짜기준(searchDateType)``` : aprvDt: 승인일자 기준 조회, dptDt: 입금일자 기준 조회\n---\n## 수정번호\n* Release v1.04_231120: PG정산대사 최초 개발\n","operationId":"getPgAdjustCompareList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAdjCoprRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RealGridListResponsePgAdjCoprResponse"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
````

## PG정산대사 조정사유 저장

> \## 기능설명\
> \* PG정산대사에 대한 조정 사유를 저장합니다.\
> \---\
> \## 상세설명\
> \* 주문번호, 거래번호, 결제구분코드, 정산조정사유내용, 기타정산금액은 필수입니다.\
> \* 입금금액 차이가 0일 시(금액이 일치할 시) 조정 사유를 등록할 수 없습니다.\
> \* 단 건만 등록 가능합니다.\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG정산대사 최초 개발<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PgAjstCoprAjstCausRequest":{"type":"object","description":"PG 정산대사 조정 사유 등록 요청 DTO","properties":{"ordNo":{"type":"string","description":"주문번호"},"trdNo":{"type":"string","description":"거래번호"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"etcAdjAmt":{"type":"number","description":"기타정산금액"},"adjAjstCausConts":{"type":"string","description":"정산조정사유내용"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/adjust/pgAdjust/savePgAdjustCompareAjstCaus":{"post":{"tags":["PG정산대사"],"summary":"PG정산대사 조정사유 저장","description":"## 기능설명\n* PG정산대사에 대한 조정 사유를 저장합니다.\n---\n## 상세설명\n* 주문번호, 거래번호, 결제구분코드, 정산조정사유내용, 기타정산금액은 필수입니다.\n* 입금금액 차이가 0일 시(금액이 일치할 시) 조정 사유를 등록할 수 없습니다.\n* 단 건만 등록 가능합니다.\n---\n## 수정번호\n* Release v1.04_231120: PG정산대사 최초 개발\n","operationId":"savePgAdjustCompareAjstCaus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAjstCoprAjstCausRequest"}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## PG정산정보 수신

> \## 기능설명\
> \* 선택한 날짜, PG구분코드에 대한 PG정산정보를 수신해 저장합니다.\
> \---\
> \## 상세설명\
> \* PG구분코드, 조회 시작/종료일시에 해당하는 PG 사의 정산대사목록 정보를 수신합니다.\
> \* PG 정산대사를 위해 조회한 정산목록 정보를 저장합니다.\
> \* 입금확정여부가 Y인 건은 수신할 수 없습니다.\
> \* 수신한 데이터는 PG정산대사 화면에서 볼 수 있습니다.\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG정산대사 최초 개발<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PgCompareReceiveRequest":{"type":"object","description":"PG 승인/정산 정보수신 요청 DTO","properties":{"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"siteNo":{"type":"string","description":"사이트번호"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/adjust/pgAdjust/receivePgAdjustList":{"post":{"tags":["PG정산대사"],"summary":"PG정산정보 수신","description":"## 기능설명\n* 선택한 날짜, PG구분코드에 대한 PG정산정보를 수신해 저장합니다.\n---\n## 상세설명\n* PG구분코드, 조회 시작/종료일시에 해당하는 PG 사의 정산대사목록 정보를 수신합니다.\n* PG 정산대사를 위해 조회한 정산목록 정보를 저장합니다.\n* 입금확정여부가 Y인 건은 수신할 수 없습니다.\n* 수신한 데이터는 PG정산대사 화면에서 볼 수 있습니다.\n---\n## 수정번호\n* Release v1.04_231120: PG정산대사 최초 개발\n","operationId":"savePgApprovalList_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgCompareReceiveRequest"}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## PG정산대사 입금확정/입금확정 취소 처리

> \## 기능설명\
> \* PG정산대사에 대한 입금확정/입금확정 취소를 처리합니다.\
> \---\
> \## 상세설명\
> \* 인터페이스로그순번, 입금확정여부는 필수입니다.\
> \* 입금확정 시 필수 체크 항목\
> &#x20; \* 기존 데이터 입금확정 미처리상태 (N)\
> &#x20; \* 기존 데이터 입금확정일시 null\
> &#x20; \* EC데이터, PG데이터 입금금액차이 0\
> \* 입금확정 취소 시 필수 체크 항목\
> &#x20; \* 기존 데이터 입금확정 처리상태 (Y)\
> &#x20; \* 기존 데이터 입금확정일시 not null\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG정산대사 최초 개발<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PgAjstDptCfmAndCnclRequest":{"type":"object","description":"PG 정산대사 입금 확정 및 확정취소 요청 DTO","properties":{"infLogSeq":{"type":"string","description":"인터페이스로그순번"},"dptCfmYn":{"type":"string","description":"입금확정여부"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/adjust/pgAdjust/processDepositConfirmAndCancel":{"post":{"tags":["PG정산대사"],"summary":"PG정산대사 입금확정/입금확정 취소 처리","description":"## 기능설명\n* PG정산대사에 대한 입금확정/입금확정 취소를 처리합니다.\n---\n## 상세설명\n* 인터페이스로그순번, 입금확정여부는 필수입니다.\n* 입금확정 시 필수 체크 항목\n  * 기존 데이터 입금확정 미처리상태 (N)\n  * 기존 데이터 입금확정일시 null\n  * EC데이터, PG데이터 입금금액차이 0\n* 입금확정 취소 시 필수 체크 항목\n  * 기존 데이터 입금확정 처리상태 (Y)\n  * 기존 데이터 입금확정일시 not null\n---\n## 수정번호\n* Release v1.04_231120: PG정산대사 최초 개발\n","operationId":"processDepositConfirmAndCancel","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PgAjstDptCfmAndCnclRequest"}}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## PG정산대사 요약 조회

> \## 기능설명\
> \* PG정산대사에 대한 요약내용을 조회합니다.\
> \---\
> \## 상세설명\
> \* 화면에서 넘어온 조건에 맞는 PG 정산대사 요약 내용을 조회합니다.\
> \* 조회 날짜에 맞는 EC 시스템 승인/취소 건, PG 사 승인/취소 건의 금액 정보와 두 승인/취소 건에 대한 입금예정액, 입금금액 차이의 합을 조회합니다.\
> \* EC 시스템 데이터 기준\
> &#x20; \* 결제금액: 실결제금액\
> &#x20; \* 예정수수료: 결제 데이터의 가맹점 정보에 의해 계산된 수수료\
> &#x20; \* 입금예정액: 결제금액 - 예정수수료\
> \* PG 데이터 기준\
> &#x20; \* 승인금액: PG 거래금액\
> &#x20; \* 결제수수료: PG 데이터 결제수수료 + PG 데이터 부가세\
> &#x20; \* 입금금액: PG 데이터 입금금액 (승인금액-결제수수료)\
> \* 입금금액차이: 입금예정액 - 입금금액\
> \---\
> \## 코드정리\
> \* \`\`\`조회날짜기준(searchDateType)\`\`\` : aprvDt: 승인일자 기준 조회, dptDt: 입금일자 기준 조회\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG정산대사 최초 개발<br>

````json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PgAdjCoprRequest":{"type":"object","description":"PG정산대사 목록 조회 요청 DTO","properties":{"siteNo":{"type":"string","description":"사이트번호"},"searchDateType":{"type":"string","description":"조회날짜기준타입"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"trdNo":{"type":"string","description":"거래번호"},"dptCfmYn":{"type":"string","description":"입금확정여부"},"payWayCd":{"type":"string","description":"결제수단코드(OM013)"},"ordNo":{"type":"string","description":"주문번호"},"termlId":{"type":"string","description":"터미널ID"},"payStatCd":{"type":"string","description":"결제구분"}}},"PgAdjCoprSummaryResponse":{"type":"object","description":"PG승인대사 요약 조회 응답 DTO","properties":{"payAmt":{"type":"number","description":"결제금액"},"expectedFee":{"type":"integer","format":"int64","description":"예정수수료"},"expectedDepositAmt":{"type":"integer","format":"int64","description":"입금예정금액"},"approveAmt":{"type":"integer","format":"int64","description":"승인금액"},"paymentFee":{"type":"integer","format":"int64","description":"결제수수료"},"depositAmt":{"type":"integer","format":"int64","description":"입금금액"},"etcAdjAmt":{"type":"number","description":"기타조정금액"},"depositAmtDiff":{"type":"integer","format":"int64","description":"입금금액차이"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/adjust/pgAdjust/getPgAdjustCompareSummary":{"post":{"tags":["PG정산대사"],"summary":"PG정산대사 요약 조회","description":"## 기능설명\n* PG정산대사에 대한 요약내용을 조회합니다.\n---\n## 상세설명\n* 화면에서 넘어온 조건에 맞는 PG 정산대사 요약 내용을 조회합니다.\n* 조회 날짜에 맞는 EC 시스템 승인/취소 건, PG 사 승인/취소 건의 금액 정보와 두 승인/취소 건에 대한 입금예정액, 입금금액 차이의 합을 조회합니다.\n* EC 시스템 데이터 기준\n  * 결제금액: 실결제금액\n  * 예정수수료: 결제 데이터의 가맹점 정보에 의해 계산된 수수료\n  * 입금예정액: 결제금액 - 예정수수료\n* PG 데이터 기준\n  * 승인금액: PG 거래금액\n  * 결제수수료: PG 데이터 결제수수료 + PG 데이터 부가세\n  * 입금금액: PG 데이터 입금금액 (승인금액-결제수수료)\n* 입금금액차이: 입금예정액 - 입금금액\n---\n## 코드정리\n* ```조회날짜기준(searchDateType)``` : aprvDt: 승인일자 기준 조회, dptDt: 입금일자 기준 조회\n---\n## 수정번호\n* Release v1.04_231120: PG정산대사 최초 개발\n","operationId":"getPgAdjustCompareSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAdjCoprRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PgAdjCoprSummaryResponse"}}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tech.x2bee.com/api/back-office-api/settlement-bo-api/pg-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
