> 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/api-en/back-office-api-reference/settlement-bo-api/pg-approval-reconciliation.md).

# PG Approval Reconciliation

## Retrieve PG Approval Comparison List

> \## Function Description\
> \* Retrieves the list of PG approval comparisons.\
> \---\
> \## Detailed Description\
> \* Retrieves the PG approval comparison list matching the conditions passed from the screen.\
> \* Retrieves the comparison result of the comparison list.\
> \* PG Approval Comparison Result Reason (AC005)\
> &#x20; \* Amount Match (10): EC payment amount and PG transaction amount match\
> &#x20; \* Amount Mismatch (20): Both EC payment amount and PG transaction amount exist + EC payment amount and PG transaction amount do not match\
> &#x20; \* PG Company Missing (30): PG company data does not exist\
> &#x20; \* BO System Missing (40): EC data does not exist\
> &#x20; \* Other (99): All other cases\
> \---\
> \## Code Reference\
> \* \`\`\`EC/PG Type Code\`\`\` : 10: Retrieve EC results, 20: Retrieve PG company results\
> \---\
> \## Revision History\
> \* Release v1.04\_231120: Initial development of PG approval comparison\
> \* Release v2.00\_240613: Improved period search condition<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":"Retrieve PG Approval Comparison List Request DTO","properties":{"siteNo":{"type":"string","description":"Site No."},"startDate":{"type":"string","format":"date","description":"Search Start Date"},"endDate":{"type":"string","format":"date","description":"Search End Date"},"ordNo":{"type":"string","description":"Order No."},"payGbCd":{"type":"string","description":"Payment Classification Code (OM012)"},"pgGbCd":{"type":"string","description":"PG Classification Code (OM030)"},"payWayCd":{"type":"string","description":"Payment Method Code (OM013)"},"compareResult":{"type":"string","description":"Comparison Result"},"mersNo":{"type":"string","description":"Merchant Number"},"termlId":{"type":"string","description":"Terminal ID"},"trdNo":{"type":"string","description":"Transaction Number"},"ecPgGbCd":{"type":"string","description":"EC/PG Type Code"},"mersEtcGbCdList":{"type":"array","description":"Merchant Additional Classification Code (OM052) List","items":{"type":"string"}}}},"RealGridListResponsePgAprvCoprResponse":{"type":"object","properties":{"totalCount":{"type":"integer","format":"int32"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PgAprvCoprResponse"}}}},"PgAprvCoprResponse":{"type":"object","description":"Retrieve PG Approval Comparison Response DTO","properties":{"trdDt":{"type":"string","description":"Transaction Date"},"pgGbNm":{"type":"string","description":"PG Classification Code Name (OM030)"},"mersEtcGbNm":{"type":"string","description":"Merchant Other Classification Code Name (OM052)"},"termlId":{"type":"string","description":"Terminal ID"},"ordNo":{"type":"string","description":"Order No."},"trdNo":{"type":"string","description":"Transaction Number"},"payWayNm":{"type":"string","description":"Payment Method Name (OM013)"},"payGbCd":{"type":"string","description":"Payment Classification Code (OM012)"},"payGbNm":{"type":"string","description":"Payment Classification Code Name (OM012)"},"payNo":{"type":"string","description":"Payment Number"},"payAmt":{"type":"number","description":"Payment Amount"},"trdAmt":{"type":"number","description":"Transaction Amount"},"trdStatNm":{"type":"string","description":"Transaction Status Name"},"diffAmt":{"type":"integer","format":"int64","description":"Difference Amount"},"compareResult":{"type":"string","description":"PG Approval Comparison Result Reason Code Name (AC005)"},"aprvDscdCausConts":{"type":"string","description":"Approval Mismatch Reason"},"totalCount":{"type":"integer","format":"int32","description":"Total Count"}}},"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 Approval Reconciliation"],"summary":"Retrieve PG Approval Comparison List","description":"## Function Description\n* Retrieves the list of PG approval comparisons.\n---\n## Detailed Description\n* Retrieves the PG approval comparison list matching the conditions passed from the screen.\n* Retrieves the comparison result of the comparison list.\n* PG Approval Comparison Result Reason (AC005)\n  * Amount Match (10): EC payment amount and PG transaction amount match\n  * Amount Mismatch (20): Both EC payment amount and PG transaction amount exist + EC payment amount and PG transaction amount do not match\n  * PG Company Missing (30): PG company data does not exist\n  * BO System Missing (40): EC data does not exist\n  * Other (99): All other cases\n---\n## Code Reference\n* ```EC/PG Type Code``` : 10: Retrieve EC results, 20: Retrieve PG company results\n---\n## Revision History\n* Release v1.04_231120: Initial development of PG approval comparison\n* Release v2.00_240613: Improved period search condition\n","operationId":"getPgApprovalCompareList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RealGridListResponsePgAprvCoprResponse"}}}},"900":{"description":"Business processing error details","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
````

## Save PG Approval Comparison Mismatch Reason

> \## Function Description\
> \* Saves the mismatch reason for a PG approval comparison.\
> \---\
> \## Detailed Description\
> \* Order No., Transaction No., Payment Type Code, and Approval Mismatch Reason Content are required.\
> \* If the comparison amount difference is 0 (amounts match), a mismatch reason cannot be registered.\
> \* Only a single record can be registered at a time.\
> \---\
> \## Revision History\
> \* Release v1.04\_231120: Initial development of PG approval comparison<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":"Save PG Approval Comparison Mismatch Reason Request DTO","properties":{"ordNo":{"type":"string","description":"Order No."},"trdNo":{"type":"string","description":"Transaction Number"},"payGbCd":{"type":"string","description":"Payment Classification Code (OM012)"},"aprvDscdCausConts":{"type":"string","description":"Approval Mismatch Reason"}}},"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 Approval Reconciliation"],"summary":"Save PG Approval Comparison Mismatch Reason","description":"## Function Description\n* Saves the mismatch reason for a PG approval comparison.\n---\n## Detailed Description\n* Order No., Transaction No., Payment Type Code, and Approval Mismatch Reason Content are required.\n* If the comparison amount difference is 0 (amounts match), a mismatch reason cannot be registered.\n* Only a single record can be registered at a time.\n---\n## Revision History\n* Release v1.04_231120: Initial development of PG approval comparison\n","operationId":"savePgApprovalCompareDscdCaus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprDscdCausRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"900":{"description":"Business processing error details","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## Receive PG Approval Information

> \## Function Description\
> \* Receives and saves PG approval information for the selected date and PG type code.\
> \---\
> \## Detailed Description\
> \* Receives the PG company's approval comparison list information for the given PG type code and search start/end date/time.\
> \* Saves the approval list information retrieved for PG approval comparison.\
> \* Saves the approval/cancellation cases approved by the PG company and compares them with the EC system's payment history.\
> \* Cases where the deposit confirmation status is Y cannot be received.\
> \---\
> \## Revision History\
> \* Release v1.04\_231120: Initial development of PG approval comparison<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 Approval/Settlement Information Receipt Request DTO","properties":{"startDate":{"type":"string","format":"date","description":"Search Start Date"},"endDate":{"type":"string","format":"date","description":"Search End Date"},"pgGbCd":{"type":"string","description":"PG Classification Code (OM030)"},"siteNo":{"type":"string","description":"Site No."}}},"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 Approval Reconciliation"],"summary":"Receive PG Approval Information","description":"## Function Description\n* Receives and saves PG approval information for the selected date and PG type code.\n---\n## Detailed Description\n* Receives the PG company's approval comparison list information for the given PG type code and search start/end date/time.\n* Saves the approval list information retrieved for PG approval comparison.\n* Saves the approval/cancellation cases approved by the PG company and compares them with the EC system's payment history.\n* Cases where the deposit confirmation status is Y cannot be received.\n---\n## Revision History\n* Release v1.04_231120: Initial development of PG approval comparison\n","operationId":"savePgApprovalList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgCompareReceiveRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"900":{"description":"Business processing error details","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## Retrieve PG Approval Comparison Summary

> \## Function Description\
> \* Retrieves the summary content of PG approval comparison.\
> \---\
> \## Detailed Description\
> \* Retrieves the PG approval comparison summary content matching the conditions passed from the screen.\
> \* Retrieves the BO system approval/cancellation cases, PG company approval/cancellation cases, and the sum of the difference count and difference amount between the two approval/cancellation cases for the search date.\
> \---\
> \## Revision History\
> \* Release v1.04\_231120: Initial development of PG approval comparison<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":"Retrieve PG Approval Comparison List Request DTO","properties":{"siteNo":{"type":"string","description":"Site No."},"startDate":{"type":"string","format":"date","description":"Search Start Date"},"endDate":{"type":"string","format":"date","description":"Search End Date"},"ordNo":{"type":"string","description":"Order No."},"payGbCd":{"type":"string","description":"Payment Classification Code (OM012)"},"pgGbCd":{"type":"string","description":"PG Classification Code (OM030)"},"payWayCd":{"type":"string","description":"Payment Method Code (OM013)"},"compareResult":{"type":"string","description":"Comparison Result"},"mersNo":{"type":"string","description":"Merchant Number"},"termlId":{"type":"string","description":"Terminal ID"},"trdNo":{"type":"string","description":"Transaction Number"},"ecPgGbCd":{"type":"string","description":"EC/PG Type Code"},"mersEtcGbCdList":{"type":"array","description":"Merchant Additional Classification Code (OM052) List","items":{"type":"string"}}}},"PgAprvCoprSummaryResponse":{"type":"object","description":"PG Approval Reconciliation Summary Inquiry Response DTO","properties":{"payAprvCnclCnt":{"type":"integer","format":"int64","description":"EC Approval/Cancellation Count"},"payAprvCnclAmt":{"type":"integer","format":"int64","description":"EC Approval/Cancellation Amount"},"pgAprvCnclCnt":{"type":"integer","format":"int64","description":"PG Approval/Cancellation Count"},"pgAprvCnclAmt":{"type":"integer","format":"int64","description":"PG Approval/Cancellation Amount"},"diffAprvCnclCnt":{"type":"integer","format":"int64","description":"EC-PG Approval/Cancellation Count Difference"},"diffAprvCnclAmt":{"type":"integer","format":"int64","description":"EC-PG Approval/Cancellation Amount Difference"},"startDate":{"type":"string","format":"date","description":"Search Start Date"},"endDate":{"type":"string","format":"date","description":"Search End Date"},"payGbCd":{"type":"string","description":"Payment Classification Code (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 Approval Reconciliation"],"summary":"Retrieve PG Approval Comparison Summary","description":"## Function Description\n* Retrieves the summary content of PG approval comparison.\n---\n## Detailed Description\n* Retrieves the PG approval comparison summary content matching the conditions passed from the screen.\n* Retrieves the BO system approval/cancellation cases, PG company approval/cancellation cases, and the sum of the difference count and difference amount between the two approval/cancellation cases for the search date.\n---\n## Revision History\n* Release v1.04_231120: Initial development of PG approval comparison\n","operationId":"getPgApprovalCompareSummary","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgAprvCoprRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PgAprvCoprSummaryResponse"}}}}},"900":{"description":"Business processing error details","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```
