> 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/development/payment.md).

# 수납 및 결제취소

## 수납 시 승인동기화

고객이 청구서를 통해 결제를 완료하면, 페이민트가 파트너사의 `callbackURL`로 승인 결과를 전달합니다. 이 과정을 "승인동기화"라고 합니다.

{% hint style="info" icon="file-lines" %}
[수납 및 결제취소](/api/api-v1/acceptance.md#post-callbackurl)
{% endhint %}

<figure><img src="/files/Te2PtiJeIGCdJ8VFtRE4" alt=""><figcaption></figcaption></figure>

#### **핵심 포인트**

* 호출 방향이 **페이민트 → 파트너사**입니다. 파트너사는 이 데이터를 수신할 REST API를 미리 구현해두어야 합니다.
* 결제 실패 및 취소 건은 파트너사로 결과를 전달하지 않습니다. 결제 성공 건만 결과를 전달합니다.
* 파트너사는 승인 결과를 수신한 후 반드시 아래의 형태와 값을 동일하게 세팅하여 정상 응답을 반환해야 합니다. \
  이 응답 데이터가 일치하지 않으면 검수가 완료되지 않습니다.

```json
//response coee
{
    "code": "0000", 
    "msg": "성공하였습니다."
}
```

#### **수신 데이터에서 확인할 주요 필드**

<table><thead><tr><th width="171.09375">파라미터</th><th>설명</th></tr></thead><tbody><tr><td><code>appr_state</code></td><td>결제 상태 : F:결제완료, W:미결제, C:취소, D:파기</td></tr><tr><td><code>appr_pay_type</code></td><td>결제수단 : CARD_VAN, KEYIN, OFFLINE_CARD, OFFLINE_CASH</td></tr><tr><td><code>appr_num</code></td><td>승인번호 : 결제 취소 시 원거래 승인번호로 필요합니다.</td></tr><tr><td><code>appr_dt</code></td><td>승인일시 : YYYYMMDDHHMMSS</td></tr></tbody></table>

{% hint style="warning" %}

#### 주의사항

* 결제 실패, 결제 취소 시 상태값을 전달되지 않습니다.
* 연동검수 시 승인동기화에 대한 정상 수신 응답 `0000`을 반환 받아야 검수가 완료됩니다.
* 승인동기화 데이터는 파트너사가 자체적으로 저장·관리해야 합니다.
* 현금영수증 결제인 경우 appr\_cash\_num, appr\_cash\_trader, appr\_cash\_issuance\_number 필드가 함께 전달됩니다.
  {% endhint %}

## 결제 취소

이미 결제가 완료된 건에 대한 결제를 취소 처리합니다.

{% hint style="info" icon="file-lines" %}
[수납 및 결제취소](/api/api-v2/acceptance.md#post-bill-cancel)
{% endhint %}

<figure><img src="/files/Jv6bPOSd2C2UBLjAS7Os" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

#### 주의사항

* 취소 시 `bill_id`는 원래 발송 요청 시 사용한 값과 동일해야 합니다.
* `hash`는 `{bill_id} + "," + {price}` 로 생성합니다. (발송 요청과 달리 phone이 포함되지 않습니다.)
* 이미 취소된 건을 다시 취소하면 `9970` 에러가 반환됩니다.
* 취소 응답에는 `appr_num`(취소 거래번호), `appr_origin_num`(원거래 승인번호), `appr_cancel_dt`(취소일시)가 포함됩니다.
* 매니저사이트/매니저앱에서 직접 결제 취소 및 청구서가 파기된 경우 API를 통해 `callback`이 전달되지 않습니다.
  {% endhint %}

## 결제 상태 조회

승인동기화 콜백을 놓쳤거나, 현재 청구서의 결제 상태를 확인하고 싶을 때 사용합니다.

{% hint style="info" icon="file-lines" %}
[수납 및 결제취소](/api/api-v2/acceptance.md#post-bill-read)
{% endhint %}

#### **사용 시나리오**

* 콜백 수신 실패 시 결제 여부 확인
* 고객 문의 대응 시 현재 상태 조회
* 취소/파기 처리 전 상태 사전 확인


---

# 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/development/payment.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.
