# ONE Billing Lab Guide

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

#### 📌 ONE Billing Lab is a development tool that helps developers check the integration status of in-app payment libraries for each ONE store service country.

* Payment tests can be run by logging in as a user from the desired country without separately installing the ONE store app for each service country.
* Payment flow can tested through ONE Billing Lab's response simulator feature, even without integration with the actual ONE store payment system.

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

## **Feature Overview** <a href="#onebillinglab-featureoverview" id="onebillinglab-featureoverview"></a>

**✅ Integrated Test Environment**

* All ONE store environments, including South Korea, Singapore, Taiwan, and the United States, can be tested using a single ONE Billing Lab app.
* An integrated test environment is provided for developers who previously had difficulty testing due to different package names for each store.

**✅ Response Simulator**

* In-app purchase scenarios can be tested without going through the actual payment process.
* It is used to verify payment response behavior in development and QA environments.

**✅ Testing Various Payment Scenarios**

* Various payment-related features, such as subscription management, use authentication, and biometric authentication, can be tested.
  * The subscription management menu is available only when logged in with an account registered in South Korea or the United States.

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

## **How to Test** <a href="#onebillinglab-howtotest" id="onebillinglab-howtotest"></a>

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

### 1. Install ONE Billing Lab <a href="#onebillinglab-1.installonebillinglab" id="onebillinglab-1.installonebillinglab"></a>

* Download and install ONE Billing Lab from the ONE store app or GitHub.
  * [Install from the ONE store app](https://onesto.re/0001002700)
  * [Install from GitHub](https://github.com/ONE-store/one_billing_lab)

### 2. Create and Log In with a ONE store Account <a href="#onebillinglab-2.createandloginwithaonestoreaccount" id="onebillinglab-2.createandloginwithaonestoreaccount"></a>

* After launching ONE Billing Lab, select the country to be tested, then create or log in with a ONE store account.
  * A ONE Billing Lab member account is identical to a regular ONE store account.
* If you already have a ONE store account, you can immediately move on to Step 3.
* If you don't have an account, membership registration can be completed easily within ONE Billing Lab.

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

### 3. Register a Test ID <a href="#onebillinglab-3.registeratestid" id="onebillinglab-3.registeratestid"></a>

* Register the ONE store account as a payment test ID for the app to be tested in the ONE store Developer Center.
* Payment environment can be selected during registration.
  * Sandbox
  * Commercial
* Note:  [Register test ID](https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/test?fallback=true#testpurchasesandsecurity.-registertestid) in the ONE store Developer Center

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

### 4. App Integration Settings <a href="#onebillinglab-4.appintegrationsettings" id="onebillinglab-4.appintegrationsettings"></a>

* Configure the `AndroidManifest.xml` file of the developer's app that will be used for integration testing.
  * Set the developer option for store selection (the `android:value`  of `onestore:dev_option`) to `onestore_03`

<pre class="language-xml"><code class="lang-xml"><strong>&#x3C;manifest>
</strong>    &#x3C;application>
<strong>        &#x3C;meta-data android:name="onestore:dev_option" android:value="onestore_03" />
</strong>    &#x3C;/application>
&#x3C;/manifest>
</code></pre>

* Note: [Setting Developer Options for Store Selection](https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/sdk#setting-developer-options-for-store-selection)

### 5. Run Payment Tests <a href="#onebillinglab-5.runpaymenttests" id="onebillinglab-5.runpaymenttests"></a>

* Run the developer’s app and attempt a payment.
* The payment screen is displayed based on the country of the logged-in ONE store account and the payment environment configured in the Developer Center.
* Example\
  : United States member + production payment environment → actual payment screen and payment methods are displayed, and real payments are possible.

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

{% hint style="danger" %}
To run a commercial test, you must register the Binary in ONE store Developer Center.
{% endhint %}

| Conditions            | Commercial test (uploadKey) | Commercial test (store signingKey) | Sandbox test |                                              |
| --------------------- | --------------------------- | ---------------------------------- | ------------ | -------------------------------------------- |
| Binary not registered | ✖ Not allowed               | ✖ Not allowed                      | ✔ Allowed    | Only Sandbox available                       |
| Binary registered     | ✔ Allowed                   | ✔ Allowed                          | ✔ Allowed    | All allowed if signature verification passes |

### 6. Check Test History and Cancel Payments

* Test history can be checked in the ONE store Developer Center.
* Payment cancellations can also be processed directly if necessary.<br>


---

# 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/eng/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.
