> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/api/back-office-api/settlement-bo-api/pg.md).

# PG승인대사

## PG승인대사 목록 조회

> \## 기능설명\
> \* PG승인대사에 대한 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 화면에서 넘어온 조건에 맞는 PG 승인대사 목록을 조회합니다.\
> \* 승인대사 목록의 대사결과를 조회합니다.\
> \* PG승인대사결과사유(AC005)\
> &#x20; \* 금액일치(10) : EC 결제금액, PG 거래금액 일치\
> &#x20; \* 금액불일치(20) : EC 결제금액, PG 거래금액이 모두 존재 + EC 결제금액, PG 거래금액 불일치\
> &#x20; \* PG사누락(30) : PG사 데이터 미존재\
> &#x20; \* BO시스템누락(40) : EC 데이터 미존재\
> &#x20; \* 기타(99) : 그 외\
> \---\
> \## 코드정리\
> \* \`\`\`EC/PG구분코드\`\`\` : 10: EC 결과 조회, 20: PG사 결과 조회\
> \---\
> \## 수정번호\
> \* Release v1.04\_231120: PG승인대사 최초 개발\
> \* Release v2.00\_240613: 기간 검색 조건 개선<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":{"PgAprvCoprRequest":{"type":"object","description":"PG승인대사 목록 조회 요청 DTO","properties":{"siteNo":{"type":"string","description":"사이트번호"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"ordNo":{"type":"string","description":"주문번호"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"payWayCd":{"type":"string","description":"결제수단코드(OM013)"},"compareResult":{"type":"string","description":"대사결과"},"mersNo":{"type":"string","description":"가맹점번호"},"termlId":{"type":"string","description":"터미널ID"},"trdNo":{"type":"string","description":"거래번호"},"ecPgGbCd":{"type":"string","description":"EC/PG구분코드"},"mersEtcGbCdList":{"type":"array","description":"가맹점기타구분코드(OM052) 리스트","items":{"type":"string"}}}},"RealGridListResponsePgAprvCoprResponse":{"type":"object","properties":{"totalCount":{"type":"integer","format":"int32"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PgAprvCoprResponse"}}}},"PgAprvCoprResponse":{"type":"object","description":"PG승인대사 조회 응답 DTO","properties":{"trdDt":{"type":"string","description":"거래일자"},"pgGbNm":{"type":"string","description":"PG구분코드명(OM030)"},"mersEtcGbNm":{"type":"string","description":"가맹점기타구분코드명(OM052)"},"termlId":{"type":"string","description":"터미널ID"},"ordNo":{"type":"string","description":"주문번호"},"trdNo":{"type":"string","description":"거래번호"},"payWayNm":{"type":"string","description":"결제수단명(OM013)"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"payGbNm":{"type":"string","description":"결제구분코드명(OM012)"},"payNo":{"type":"string","description":"결제번호"},"payAmt":{"type":"number","description":"결제금액"},"trdAmt":{"type":"number","description":"거래금액"},"trdStatNm":{"type":"string","description":"거래상태명"},"diffAmt":{"type":"integer","format":"int64","description":"차액"},"compareResult":{"type":"string","description":"PG승인대사결과사유코드명(AC005)"},"aprvDscdCausConts":{"type":"string","description":"승인불일치사유내용"},"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/pgApproval/getPgApprovalCompareList":{"post":{"tags":["PG승인대사"],"summary":"PG승인대사 목록 조회","description":"## 기능설명\n* PG승인대사에 대한 목록을 조회합니다.\n---\n## 상세설명\n* 화면에서 넘어온 조건에 맞는 PG 승인대사 목록을 조회합니다.\n* 승인대사 목록의 대사결과를 조회합니다.\n* PG승인대사결과사유(AC005)\n  * 금액일치(10) : EC 결제금액, PG 거래금액 일치\n  * 금액불일치(20) : EC 결제금액, PG 거래금액이 모두 존재 + EC 결제금액, PG 거래금액 불일치\n  * PG사누락(30) : PG사 데이터 미존재\n  * BO시스템누락(40) : EC 데이터 미존재\n  * 기타(99) : 그 외\n---\n## 코드정리\n* ```EC/PG구분코드``` : 10: EC 결과 조회, 20: PG사 결과 조회\n---\n## 수정번호\n* Release v1.04_231120: PG승인대사 최초 개발\n* Release v2.00_240613: 기간 검색 조건 개선\n","operationId":"getPgApprovalCompareList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RealGridListResponsePgAprvCoprResponse"}}}},"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":{"PgAprvCoprDscdCausRequest":{"type":"object","description":"PG승인대사 불일치사유 저장 요청 DTO","properties":{"ordNo":{"type":"string","description":"주문번호"},"trdNo":{"type":"string","description":"거래번호"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"aprvDscdCausConts":{"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/pgApproval/savePgApprovalCompareDscdCaus":{"post":{"tags":["PG승인대사"],"summary":"PG승인대사 불일치사유 저장","description":"## 기능설명\n* PG승인대사에 대한 불일치 사유를 저장합니다.\n---\n## 상세설명\n* 주문번호, 거래번호, 결제구분코드, 승인불일치사유내용은 필수입니다.\n* 대사금액 차이가 0일 시(금액이 일치할 시) 불일치 사유를 등록할 수 없습니다.\n* 단 건만 등록 가능합니다.\n---\n## 수정번호\n* Release v1.04_231120: PG승인대사 최초 개발\n","operationId":"savePgApprovalCompareDscdCaus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprDscdCausRequest"}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## PG승인정보 수신

> \## 기능설명\
> \* 선택한 날짜, PG구분코드에 대한 PG승인정보를 수신해 저장합니다.\
> \---\
> \## 상세설명\
> \* PG구분코드, 조회 시작/종료일시에 해당하는 PG 사의 승인대사목록 정보를 수신합니다.\
> \* PG 승인대사를 위해 조회한 승인목록 정보를 저장합니다.\
> \* PG 사에서 승인된 승인/취소 건을 저장해 EC 시스템의 결제 내역과 비교합니다.\
> \* 입금확정여부가 Y인 건은 수신할 수 없습니다.\
> \---\
> \## 수정번호\
> \* 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/pgApproval/receivePgApprovalList":{"post":{"tags":["PG승인대사"],"summary":"PG승인정보 수신","description":"## 기능설명\n* 선택한 날짜, PG구분코드에 대한 PG승인정보를 수신해 저장합니다.\n---\n## 상세설명\n* PG구분코드, 조회 시작/종료일시에 해당하는 PG 사의 승인대사목록 정보를 수신합니다.\n* PG 승인대사를 위해 조회한 승인목록 정보를 저장합니다.\n* PG 사에서 승인된 승인/취소 건을 저장해 EC 시스템의 결제 내역과 비교합니다.\n* 입금확정여부가 Y인 건은 수신할 수 없습니다.\n---\n## 수정번호\n* Release v1.04_231120: PG승인대사 최초 개발\n","operationId":"savePgApprovalList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgCompareReceiveRequest"}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## PG승인대사 요약 조회

> \## 기능설명\
> \* PG승인대사에 대한 요약내용을 조회합니다.\
> \---\
> \## 상세설명\
> \* 화면에서 넘어온 조건에 맞는 PG 승인대사 요약 내용을 조회합니다.\
> \* 조회 날짜에 해당하는 BO 시스템 승인/취소 건, 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":{"PgAprvCoprRequest":{"type":"object","description":"PG승인대사 목록 조회 요청 DTO","properties":{"siteNo":{"type":"string","description":"사이트번호"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"ordNo":{"type":"string","description":"주문번호"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"},"pgGbCd":{"type":"string","description":"PG구분코드(OM030)"},"payWayCd":{"type":"string","description":"결제수단코드(OM013)"},"compareResult":{"type":"string","description":"대사결과"},"mersNo":{"type":"string","description":"가맹점번호"},"termlId":{"type":"string","description":"터미널ID"},"trdNo":{"type":"string","description":"거래번호"},"ecPgGbCd":{"type":"string","description":"EC/PG구분코드"},"mersEtcGbCdList":{"type":"array","description":"가맹점기타구분코드(OM052) 리스트","items":{"type":"string"}}}},"PgAprvCoprSummaryResponse":{"type":"object","description":"PG승인대사 요약 조회 응답 DTO","properties":{"payAprvCnclCnt":{"type":"integer","format":"int64","description":"EC 승인/취소 건수"},"payAprvCnclAmt":{"type":"integer","format":"int64","description":"EC 승인/취소 금액"},"pgAprvCnclCnt":{"type":"integer","format":"int64","description":"PG 승인/취소 건수"},"pgAprvCnclAmt":{"type":"integer","format":"int64","description":"PG 승인/취소 금액"},"diffAprvCnclCnt":{"type":"integer","format":"int64","description":"EC-PG 승인/취소 건수 차"},"diffAprvCnclAmt":{"type":"integer","format":"int64","description":"EC-PG 승인/취소 금액 차"},"startDate":{"type":"string","format":"date","description":"조회시작일자"},"endDate":{"type":"string","format":"date","description":"조회종료일자"},"payGbCd":{"type":"string","description":"결제구분코드(OM012)"}}},"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/pgApproval/getPgApprovalCompareSummary":{"post":{"tags":["PG승인대사"],"summary":"PG승인대사 요약 조회","description":"## 기능설명\n* PG승인대사에 대한 요약내용을 조회합니다.\n---\n## 상세설명\n* 화면에서 넘어온 조건에 맞는 PG 승인대사 요약 내용을 조회합니다.\n* 조회 날짜에 해당하는 BO 시스템 승인/취소 건, PG 사 승인/취소 건, 두 승인/취소 건에 대한 차이 건 수 및 차액의 합을 조회합니다.\n---\n## 수정번호\n* Release v1.04_231120: PG승인대사 최초 개발\n","operationId":"getPgApprovalCompareSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PgAprvCoprSummaryResponse"}}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```
