> 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/preparation/req-res.md).

# 요청·응답

### 요청 본문 <a href="#undefined" id="undefined"></a>

결제선생 API를 호출할 때는 Json 형식을 사용해주세요. Charset의 경우에는 국제 표준 인코딩 방식인 UTF-8만 지원합니다.

| key          | value            | description |
| ------------ | ---------------- | ----------- |
| Content-Type | application/json | 요청 데이터 타입   |
| charset      | UTF-8            | 언어 설정       |

### 응답 본문 <a href="#undefined-1" id="undefined-1"></a>

API 요청시 페이민트의 서버가 클라이언트 서버에게 전달하는 데이터 양식입니다. 모든 API 응답, 요청 본문은 JSON 형식입니다.

**API v2 객체**

```json
{
  "code": "0000", //응답 코드
  "msg": "Success", //응답 메세지
  "data": { //응답 데이터 객체
  }
}
```

**API v1 객체**

```json
{
  "code": "0000", //응답 코드
  "message": "Success", //응답 메세지
  "apikey": "partner-api-key",
  "member": "partner-merchant-1",
  "merchant": "partner-user-1",
  //api별 데이터 추가
}
```

**응답 HTTP 상태 코드**

| HTTP 상태 코드           | 설명                                                                               |
| -------------------- | -------------------------------------------------------------------------------- |
| `200 - OK`           | 요청이 성공적으로 처리되었습니다.                                                               |
| `400 - Bad Request`  | 요청을 처리할 수 없습니다. 필수 파라미터를 보내지 않았거나, 파라미터 포맷이 잘못되었을 때 돌아오는 응답입니다. 요청 파라미터를 확인해주세요. |
| `404 - Not Found`    | 요청한 리소스가 존재하지 않습니다. 요청한 API 주소를 다시 한번 확인해보세요.                                    |
| `500 - Server Error` | 결제선생 서버에서 에러가 발생했습니다.                                                            |


---

# 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/preparation/req-res.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.
