# API : (Step 2) QR 코드 요청하기

## 결제용 QR 코드 요청 ( POST 호출 - JSON 리턴 )

### POST 호출 주소 : <https://wara-kr.miguyouxi.com/api/gateway.html>

| **인자명**        | **인자내용**                                                                                                  | **예>**        | **필요여부** |
| -------------- | --------------------------------------------------------------------------------------------------------- | ------------- | -------- |
| **appid**      | **상점관리페이지에서 확인 가능한 상점 ID**                                                                                | **110012315** | 필요       |
| **data**       | **체크섬으로 사용될 암호화된 문자열**                                                                                    | -             | 필요       |
| **-**          | **data문자열 생성은 아래의 모든 인자명과 값을 key=Value형태로“&”와 함께 연결후,** **BASE64encode로 암호화 진행하여, 결과값을** **data의 값으로 사용** | -             | -        |
| out\_trade\_no | 가맹점 서버 자체관리용 주문번호. 절대 중복 불가，최대길이：32                                                                       | 2016112200211 | 필요       |
| channel        | 결제요청수단 : alipay또는wechat, 그 외는 모두  warapay                                                                 | alipay        | 필요       |
| money          | 결제금액（최대 소수점 두자리포함）                                                                                        | 10.23         | 필요       |
| currency       | 결제화폐. 한화로 결제이므로 KER                                                                                       | KER           | 필요       |
| version        | 연결방식 버전 ( 현재 2.0 )                                                                                        | 2.0           | 필요       |
| time           | 요청시간 timestamp                                                                                            | -             | 필요       |

### JSON 결과 회신&#x20;

| **결과 Key**    | **JSON** **결과 값에 대한 설명**                                                    |
| ------------- | --------------------------------------------------------------------------- |
| **code**      | **0 :** **성공，기타문제 : 에러코드값 참조**                                              |
| **data**      | **성공시 아래의** **Array형식. 실패시 Null 또는 빈스트링**                                   |
| **-**         | **성공시Array내용**                                                              |
| **trade\_no** | **중요 : waraPay 주문결과번호，Step 7, Step 7-2 의 결제결과 영수검증시 사용**                    |
| money         | 결제금액(요청했던 금액과 동일)                                                           |
| channel       | 결제요청수단                                                                      |
| rmb           | 중국 위안화로 실시간 환율로 전환된 금액. 실제 중국 고객이 결제시 볼 수 있는 금액                             |
| qrcode        | QR코드용 문자열，상점 웹사이트 결제창에서 이를 실제 QR코드로 변환하여 표시가능. 링크로 직접 연결하여 웹상에서 결제하게 처리도 가능 |
| qrimage       | 직접 생성된 QR 코드 이미지의 URL. 이를 직접 표시하여도 무방함                                      |

```
```


---

# Agent Instructions: 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://warapay.gitbook.io/warapay/developer/api-step-2-qr.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.
