# 筹备全球分发

### 用词 <a href="#yong-ci" id="yong-ci"></a>

* 国内ONE store：在韩国提供服务的ONE store
* 全球ONE store：在其他国家/地区国家提供服务的ONE store

### ONE store服务构架

* 开发者只需在ONE store开发者中心注册一次商品，就可以在韩国和全球出售商品。
  * 在现有的韩国ONE store注册并出售商品的开发者，只需选择全球分发即可。
  * ONE store开发者中心通过 Re-Packaging开发者注册的App，为全球服务生成APK，并将其分发给全球ONE store用户。
* ONE store客户端和服务器分为韩国和全球。

  * 在App调用IAP SDK API时，将自动联动于与服务国家/地区相匹配的One Store客户端/服务器。
  * 开发公司服务器中调用IAP Server API时，须传送市场分类代码（x-market-code）。

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

#### ONE store Installer Infomation & 市场分类代码 <a href="#id" id="id"></a>

<table><thead><tr><th width="167.33333333333331">分类</th><th width="362">Installer Package Name</th><th>市场分类代码</th></tr></thead><tbody><tr><td>韩国</td><td><ul><li>com.skt.skaf.A000Z00040</li><li>com.kt.olleh.storefront</li><li>com.lguplus.appstore</li></ul></td><td>MKT_ONE</td></tr><tr><td>全球</td><td><ul><li>com.onestorecorp.gaa.storeapp</li><li>com.dti.folderlauncher</li></ul></td><td>MKT_GLB</td></tr></tbody></table>

### SDK <a href="#j96wnt4u8tpp" id="j96wnt4u8tpp"></a>

**SDK 版本**

* 要进行全球分发，需适用ONE store In-App支付 SDK V19（API V6）以上的版本。
* 如果使用SDK V17，需要升级SDK。
* 如果使用SDK V16，应新注册已适用SDK V21以上版本的App。

{% hint style="warning" %}
属于适用了检测App健全性网络安全解决方案的App时，需要适用修改了和网络安全解决方案不兼容问题的SDK. &#x20;

* [SDK V21.01 guides](/dev/chi/tools/billing/v21/sdk.md)
  {% endhint %}

#### 联动ONE store客户端

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

#### **联动商城**

* 在韩国服务的ONE store和在其他国家/地区服务的ONE store的App是不是一体。
* 在韩国服务的App是韩国国内的ONE store，其他国家/地区服务的App必须联动于全球ONE store。
* 以往在ONE store中服务的V19以上App，可以直接在ONE store上进行全球分发，从而会自动联动于全球ONE store。

#### **市场分类代码**

* 如果向了解用户下载的市场分类代码的信息（国内ONE store或全球ONE store），则必须获取市场分类代码。
* 获取的市场分类代码，必须在使用服务器API时，需要确认正在使用的商城后发送到header中。
* 市场分类代码获取方法：
  * [SDK V21 Guide​](/dev/chi/tools/billing/v21/references/interfaces/storeinfolistener.md)

### 服务器API <a href="#lano6quwcxhd" id="lano6quwcxhd"></a>

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

####

#### **域名**

* 全球服务域名不同于仅在韩国服务时的域名。
* 为了服务于全球，需要更改域名。
  * 仅在韩国服务时：[ ](https://apis.onestore.co.kr/)​[https://apis.onestore.co.kr](https://apis.onestore.co.kr/)​
  * 服务于除韩国以外的国家/地区时：[https://iap-apis.onestore.net](https://iap-apis.onestore.net/)​

#### **市场分类代码**

* Request header中已新增市场分类代码（x-market-code）。
* 如果在全球范围内提供服务，则必须在header中添加市场分类代码。
* 如果没有市场分类代码，会议韩国服务（默认值）来调用。

<示例>

{% code overflow="wrap" %}

```
curl --location '{global domain}/v7/apps/com.sample/purchases/inapp/products/{productId}/{purchaseToken}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}' \
--header 'x-market-code: {marketCode}' \
```

{% endcode %}

| 市场分类代码   | 服务国家/地区 |
| -------- | ------- |
| MKT\_ONE | 韩国      |
| MKT\_GLB | 除韩国外    |

#### PNS

* PNS的国内ONE store和全球ONE store的消息推送地址不同。
* 因此，使用防火墙时，需要对每个推送地址，进行两次防火墙特殊处理。

### 外部支付 <a href="#sj47hdt4vcvw" id="sj47hdt4vcvw"></a>

#### 服务器API <a href="#vo0jistmosx4" id="vo0jistmosx4"></a>

* 外部支付API版本已更改为V6。
* 如果在除韩国外的国家/地区提供服务，则需要更改域名。
  * 仅在韩国服务时：<https://apis.onestore.co.kr>
  * 服务于韩国以外的国家/地区时：[https://iap-apis.onestore.net](https://iap-apis.onestore.net/)
* 在外部支付购买明细传输API的Request Body中，新增了国家/地区信息和货币代码。
* 传输外部支付交易明细时，必须用已支付的货币和金额进行传输。
* 外部支付购买记录传输API已更新。（send3rdPartyPurchase-p1 ）
* 传输在美国产生的外部支付交易记录时，必须以send3rdPartyPurchase-p1 格式传输交易记录。
* 因现有格式不修改无法在美国以外国家/地区使用，预计2025年6月 deprecated，请适用新格式。

#### 结算

* 注册ONE store开发者中心时，必须根据已注册的国为准，汇款服务使用费。
  * 如果会员国是韩国，要用韩币汇款。\
    （但美国销售部分，需以美元汇至当地服务提供商指定的专用账户。）
  * 如果会员国是其他国家/地区，需用USD汇款。\
    （但美国销售部分，需以美元汇至当地服务提供商指定的专用账户。）
* 服务使用费结算时的汇率，是销售月下一个月的1日的汇率。（以首尔外汇中介告示为准，如果1日是节假日时，则以前一工作日的汇率作为基准）。

#### 商品 <a href="#id-8lfn5bq1c1b2" id="id-8lfn5bq1c1b2"></a>

* 新加坡和台湾不提供订阅产品。
* 即使之前已注册订阅产品，该产品也不会在新加坡和台湾发布。
* 分发国家/地区及当地价格设置、多语言设置请参考\
  <https://onestore-dev.gitbook.io/dev/v/eng/docs/apps>


---

# 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/chi/glb.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.
