> For the complete documentation index, see [llms.txt](https://developers.payssam.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.payssam.kr/api/api-v2/acceptance.md).

# 수납 및 결제취소

## 청구서 결제 취소

> &#x20;   결제가 완료된 청구서의 결제 상태를 승인 -> 승인취소 처리 합니다.\
> &#x20;   결제가 완료되지 않은 청구서는 사용할 수 없습니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"tags":[],"servers":[{"url":null,"description":"Generated server url"}],"paths":{"/bill/cancel":{"post":{"tags":["청구서 ERP 연동 (취소/조회)"],"summary":"청구서 결제 취소","description":"    결제가 완료된 청구서의 결제 상태를 승인 -> 승인취소 처리 합니다.\n    결제가 완료되지 않은 청구서는 사용할 수 없습니다.\n","operationId":"billCancel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillCancelPortRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseBillCancelPortResponse"}}}}}}}},"components":{"schemas":{"BillCancelPortRequest":{"type":"object","properties":{"apiKey":{"type":"string","description":"파트너 연동을 위한 고유키","maxLength":32,"minLength":0},"member":{"type":"string","description":"파트너 사용자 코드","maxLength":60,"minLength":0},"merchant":{"type":"string","description":"파트너 매장 코드","maxLength":60,"minLength":0},"bill":{"$ref":"#/components/schemas/CancelBillInfo"}},"required":["apiKey","member","merchant"]},"CancelBillInfo":{"type":"object","properties":{"billId":{"type":"string","description":"청구서 ID","maxLength":20,"minLength":1},"price":{"type":"string","description":"결제 금액","minLength":1},"cancelReason":{"type":"string","description":"취소사유","maxLength":20,"minLength":0},"hash":{"type":"string","description":"    통신 암호 키\n    {phone} 값이 설정된 경우 {bill_id} + \",\" + {phone} + \",\" + {price} 값으로 Hash 생성\n    {phone} 값이 설정되어 있지 않은 경우 {bill_id} + \",\" + {price} 값으로 Hash 생성\n","minLength":1}},"required":["billId","hash","price"]},"BaseResponseBillCancelPortResponse":{"type":"object","description":"공통 API 응답 포맷 (api.spec: code/message/data)","properties":{"code":{"type":"string","description":"응답 코드"},"message":{"type":"string","description":"응답 메시지"},"data":{"$ref":"#/components/schemas/BillCancelPortResponse","description":"응답 데이터"}}},"BillCancelPortResponse":{"type":"object","description":"청구서 결제 취소 응답","properties":{"apiKey":{"type":"string","description":"파트너 연동을 위한 고유키"},"member":{"type":"string","description":"파트너 매장 코드"},"merchant":{"type":"string","description":"파트너 사용자 코드"},"billId":{"type":"string","description":"청구서 ID"},"hash":{"type":"string","description":"요청 시 전달된 해시값"},"apprNum":{"type":"string","description":"취소 승인 거래번호"},"apprOriginNum":{"type":"string","description":"원거래 승인번호"},"apprCancelDt":{"type":"string","description":"취소 일시 (YYYYMMDDhhmmss)"}}}}}}
```

## 청구서 단건 조회

> &#x20;   발송된 청구서에 대한 결제 상태를 조회합니다.\
> \
> &#x20;   appr\_state : F(결제완료), W(미결제), C(취소), D(파기)\
> &#x20;   각 상태는 다음과 같이 변경될 수 있습니다.\
> &#x20;   1\. W(미결제) -> F(결제완료) -> C(취소)\
> &#x20;   2\. W(미결제) -> D(파기)<br>

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"tags":[],"servers":[{"url":null,"description":"Generated server url"}],"paths":{"/bill/read":{"post":{"tags":["청구서 ERP 연동 (취소/조회)"],"summary":"청구서 단건 조회","description":"    발송된 청구서에 대한 결제 상태를 조회합니다.\n\n    appr_state : F(결제완료), W(미결제), C(취소), D(파기)\n    각 상태는 다음과 같이 변경될 수 있습니다.\n    1. W(미결제) -> F(결제완료) -> C(취소)\n    2. W(미결제) -> D(파기)\n","operationId":"billRead","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadPortRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseBillReadPortResponse"}}}}}}}},"components":{"schemas":{"BillReadPortRequest":{"type":"object","properties":{"apiKey":{"type":"string","description":"파트너 연동을 위한 고유키","maxLength":32,"minLength":0},"member":{"type":"string","description":"파트너 사용자 코드","maxLength":60,"minLength":0},"merchant":{"type":"string","description":"파트너 매장 코드","maxLength":60,"minLength":0},"bill":{"$ref":"#/components/schemas/ReadBillInfo"}},"required":["apiKey","member","merchant"]},"ReadBillInfo":{"type":"object","properties":{"billId":{"type":"string","description":"청구서 ID","maxLength":20,"minLength":1}},"required":["billId"]},"BaseResponseBillReadPortResponse":{"type":"object","description":"공통 API 응답 포맷 (api.spec: code/message/data)","properties":{"code":{"type":"string","description":"응답 코드"},"message":{"type":"string","description":"응답 메시지"},"data":{"$ref":"#/components/schemas/BillReadPortResponse","description":"응답 데이터"}}},"BillReadPortResponse":{"type":"object","description":"원장 단건 조회 응답 — v1 SyncVO.Approval 과 동일한 필드 구성","properties":{"apiKey":{"type":"string","description":"파트너 연동을 위한 고유키"},"billId":{"type":"string","description":"청구서 ID"},"apprPayType":{"type":"string","description":"결제수단 코드 (간편결제 0 등)"},"apprCardType":{"type":"string","description":"카드 종류 (신용/체크/정보없음 등)"},"apprDt":{"type":"string","description":"승인 일시 (YYYYMMDDhhmmss)"},"apprOriginDt":{"type":"string","description":"원거래 승인 일시"},"apprPrice":{"type":"string","description":"승인 금액"},"apprIssuer":{"type":"string","description":"카드명 또는 은행명"},"apprIssuerCd":{"type":"string","description":"발행사 코드 또는 은행 코드"},"apprIssuerNum":{"type":"string","description":"카드번호 또는 계좌번호"},"apprAcquirerCd":{"type":"string","description":"매입사 코드"},"apprAcquirerNm":{"type":"string","description":"매입사명"},"apprNum":{"type":"string","description":"승인/취소 거래번호"},"apprOriginNum":{"type":"string","description":"원거래 승인번호"},"apprResCd":{"type":"string","description":"응답 코드"},"apprMonthly":{"type":"string","description":"할부 개월수 (0: 일시불)"},"apprState":{"type":"string","description":"승인 상태 (F:승인, W:대기, C:취소, D:파기)"},"apprCashNum":{"type":"string","description":"현금영수증 승인번호"},"apprCashTrader":{"type":"string","description":"현금영수증 발급 구분"},"apprCashIssuanceNumber":{"type":"string","description":"현금영수증 발급 요청 번호"},"apprCardMerchantNum":{"type":"string","description":"신용카드 가맹점 정보 (헬스케어 스펙)"},"catId":{"type":"string","description":"단말기 번호 (헬스케어 스펙)"},"dscTxNum":{"type":"string","description":"거래 고유번호 (헬스케어 스펙)"},"cardType":{"type":"string","description":"페이민트 공통 카드 타입 (영남대/KOCES 전용)"},"apprSign":{"type":"string","description":"전자서명 데이터 (헬스케어 스펙, Base64)"},"udItem":{"$ref":"#/components/schemas/JsonNode","description":"사용자 정의 항목 (원장 저장 시 전달된 JSON)"}}},"JsonNode":{}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developers.payssam.kr/api/api-v2/acceptance.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.
