# ONE Billing Lab 가이드

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2F2JAVtbyiyQsgbEfHtqZi%2Fimage.png?alt=media&#x26;token=1a2ef26f-0720-438b-8faf-89182fe54626" alt=""><figcaption></figcaption></figure>

#### 📌 **ONE Billing Lab**은 개발자가 **원스토어 서비스 국가별 인앱 결제 라이브러리 통합 상태를 손 쉽게 확인**할 수 있도록 지원하는 개발 도구입니다.

* 각 서비스 국가용 ONE store 앱을 별도로 설치하지 않아도, 원하는 국가의 회원으로 로그인 후 결제 테스트를 진행할 수 있습니다.
* 실제 원스토어 결제 시스템을 연동하지 않아도, ONE Billing Lab의 응답 시뮬레이터 기능을 통해 결제 흐름을 테스트할 수 있습니다.

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2FcR0gFMt8RrOPB0xxzABJ%2Fimage.png?alt=media&#x26;token=4c0825f7-be17-4750-b07d-b5d6fdef2056" alt=""><figcaption></figcaption></figure>

## **기능 소개** <a href="#id-onebillinglab" id="id-onebillinglab"></a>

✅ **통합 테스트 환경**

* &#x20;대한민국, 싱가포르, 대만, 미국 등 모든 원스토어 환경에서 ONE Billing Lab 앱 하나로 테스트할 수 있습니다.
* 각 스토어별로 패키지명이 달라 테스트에 어려움을 겪었던 개발사들을 위해 통합된 테스트 환경을 제공합니다.

✅ **응답 시뮬레이터**

* 실제 결제 과정을 거치지 않고 인앱 결제 시나리오를 테스트할수 있습니다.\
  개발 및 QA 환경에서 결제 응답 동작 검증 시 활용됩니다.

✅ **다양한 결제 시나리오 테스트**

* 정기결제 관리, 사용자 인증, 생체 인증 등 다양한 결제 관련 기능을 테스트할 수 있습니다.\
  정기결제 관리 메뉴는 대한민국과 미국 회원으로 로그인 시에만 노출됩니다.&#x20;

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2FQAmDRHf7OMXQZAoYqVzn%2Fimage.png?alt=media&#x26;token=c7e3cac3-64c0-4ca5-a787-fa9a81dffa27" alt=""><figcaption></figcaption></figure>

## **테스트 방법** <a href="#id-onebillinglab" id="id-onebillinglab"></a>

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2F6Wvo8xcgr9lkZX38jL0o%2Fimage.png?alt=media&#x26;token=30eb8a93-a6f6-4de0-85e1-d3a914f5f60b" alt=""><figcaption></figcaption></figure>

### **1. ONE Billing Lab 설치** <a href="#id-onebillinglab-1.onebillinglab" id="id-onebillinglab-1.onebillinglab"></a>

* ONE store 앱 또는 GitHub에서 ONE Billing Lab을 다운로드하여 설치합니다.
  * [ONE store 앱에서 설치하기](https://onesto.re/0001002700)
  * [GitHub에서 설치하기](https://github.com/ONE-store/one_billing_lab)

### **2. 원스토어 계정 생성 및 로그인** <a href="#id-onebillinglab-2" id="id-onebillinglab-2"></a>

* ONE Billing Lab을 실행한 후, 테스트할 국가를 선택하고, 원스토어 계정을 생성 또는 로그인합니다.
  * ONE Billing Lab의 회원은 기존 원스토어 회원과 동일합니다.
* 기존에 원스토어 계정이 있다면 3단계로 바로 진행 가능합니다.
* 계정이 없는 경우, ONE Billing Lab에서 간단히 회원 가입할 수 있습니다.

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2Fd7A8pX3FXTfNMD7EwQt6%2Fimage.png?alt=media&#x26;token=694a7cbb-66af-47fd-9820-dbdde8343225" alt=""><figcaption></figcaption></figure>

### **3. 테스트 ID 등록** <a href="#id-onebillinglab-3.-id" id="id-onebillinglab-3.-id"></a>

* 원스토어 개발자센터에서 테스트할 앱에 원스토어 계정을 결제 테스트 ID로 등록합니다.
* 등록 시 결제 환경을 선택할 수 있습니다.
  * Sandbox
  * 상용결제
* 참고: 원스토어 개발자센터에서 [결제 테스트 ID 등록하기](https://onestore-dev.gitbook.io/dev/tools/billing/v21/test)

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2FfupDMKUND6j5ZmcoPwa7%2Fimage.png?alt=media&#x26;token=f72b6d15-4ee9-4255-976d-0c65d1ccb298" alt=""><figcaption></figcaption></figure>

### 4. 앱 연동 설정 <a href="#id-onebillinglab-4" id="id-onebillinglab-4"></a>

* 연동 테스트할 개발자의 앱의 `AndroidManifest.xml` 파일 설정을 합니다.

  * 스토어 지정을 위한 개발자 옵션(`onestore:dev_option`의 `android:value` 값)을 onestore\_03으로 설정합니다. &#x20;

  <pre class="language-xml"><code class="lang-xml">&#x3C;manifest>
      &#x3C;application>
  <strong>        &#x3C;meta-data android:name="onestore:dev_option" android:value="onestore_03" />
  </strong>    &#x3C;/application>
  &#x3C;/manifest>
  </code></pre>
* 참고: [스토어 지정을 위한 개발자 옵션 설정](https://onestore-dev.gitbook.io/dev/tools/billing/v21/sdk#undefined-3)

### **5. 결제 테스트 진행** <a href="#id-onebillinglab-5" id="id-onebillinglab-5"></a>

* 개발자의 앱을 실행하고 결제를 시도합니다.
* 결제 화면은 로그인한 원스토어 계정의 국가와 **개발자센터에서 설정한 결제 환경을** 기준으로 노출됩니다.
* 예시: 미국 회원 + 상용결제 환경 → 실제 결제 화면과 결제수단 노출, 실제 결제 가능

<figure><img src="https://1837360763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fot0z57AnnXZ02C5qyePV%2Fuploads%2Fjv31lQ0an0RuqBRWi3nE%2Fimage.png?alt=media&#x26;token=3aff2b3b-3244-4e36-8ec4-1d3c899fd6e4" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
상용 결제 테스트를 위해선 테스트할 바이너리를 원스토어 개발자센터에 등록이 필요합니다.
{% endhint %}

<table data-full-width="false"><thead><tr><th>조건</th><th>상용 결제 (uploadKey)</th><th>상용 결제 (store signingKey)</th><th>샌드박스 결제</th><th>비고</th></tr></thead><tbody><tr><td><strong>바이너리 미등록</strong></td><td>✖ 불가</td><td>✖ 불가</td><td>✔ 가능</td><td>샌드박스만 사용 가능</td></tr><tr><td><strong>바이너리 등록</strong></td><td>✔ 가능</td><td>✔ 가능</td><td>✔ 가능</td><td>서명 검증 통과 시 모두 허용</td></tr></tbody></table>

### **6. 테스트 내역 확인 및 결제 취소**

* 원스토어 개발자센터에서 테스트 내역을 확인할 수 있습니다.
* 필요 시 결제 취소도 직접 처리 가능합니다.


---

# 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://onestore-dev.gitbook.io/dev/tools/one-billing-lab.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.
