---
title: "API Specification"
site: "Game8 Store – Developer Center"
lang: "en"
category: "Technology & API"
canonical: "https://developers.store.game8.jp/en/api-v5/"
---

# API Specification

📝 This is a reference translation. In case of any discrepancy, the Japanese version prevails.

Game8 Store API

## API List

### Publisher APIs

Game8 Store calls these APIs.

| API Name | Endpoint | Method | Required | Description |
| --- | --- | --- | --- | --- |
| **Purchase Eligibility Check** / Purchase Eligibility Check | `/check` | `GET` | 1 image | Required |
| **Checks if a user is eligible to purchase a specified item** Register Purchase | `/register` | `POST` | 1 image | Grants in-game items after purchase completion |
| **Retrieve Player Information** | `/user_info` | `GET` | 1 image | Retrieves the player's name and level based on their in-game ID. |
| Inventory Check | `/stock` | `GET` | Recommended | Checks the stock status of a specified item |

#### APIs Provided by Game8 Store

Publishers send requests to these APIs.

| API Name | Endpoint | Method | Required | Description |
| --- | --- | --- | --- | --- |
| **Order Verify** / Order Verify | `/orders/verify` | `GET` | Optional | `/register` paid_transaction_id |

## 1. Common Specifications

| Field | Details |
| --- | --- |
| Host | Game8-provided APIs: `<Determined by the Game8>`<br>Publisher-provided APIs:`<Determined by the publisher>` |
| Protocol | HTTPS |
| Character Encoding | UTF-8 |

### 1.1. Request Specifications

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | Bearer `<ACCESS_TOKEN>` | Authentication information |
| Content-Type | application/json | Content type |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

> The access token must be a randomly generated string of 16 to 36 alphanumeric characters, including both uppercase and lowercase letters, issued for each game.
>
> Game8, Inc. will generate and provide the access token. However, if you prefer to generate it yourself, please contact us.

### 1.2. Response Specifications

#### Common Response Headers

| Key | Value |
| --- | --- |
| Content-Type | application/json |

#### Common Response Body

| Key | Value | Details |
| --- | --- | --- |
| request_id | `string` | A unique request ID. Used for tracking requests during troubleshooting. |
| timestamp | `string (ISO8601)` | Response timestamp |
| result_code | `string` | Result code |
| message | `string` | Message |

> [If an error from the](https://developers.store.game8.jp/en/api-v5/#337bef2a-13a2-8102-b2d0-c0c36f98ad7e) error code list

### Configuring the X-Signature

To verify whether a request is legitimate, a game-specific shared secret key is used to sign the request, which is then included in the request header for validation.

#### Signature Generation Process

1. Calculate the digest based on the query string for GET requests and the request body for POST requests. The digest is calculated using HMAC-SHA256 with the shared secret key.

> Examples of messages used for digest calculation
>
> For GET: game=game123&user=user456&...
>
> For POST: {"game":"game123","user":"user456",...}

1. Encode the computed digest in Base64 and set it in the request header as

#### Signature Verification Process

1. Calculate the digest based on the query string for GET requests and the request body for POST requests. The digest is calculated using HMAC-SHA256 with the shared secret key.

> Examples of messages used for digest calculation
>
> For GET: game=game123&user=user456&...
>
> For POST: {"game":"game123","user":"user456",...}

1. Encode the computed digest in Base64 and compare it with the
  1. If they match, process the request as legitimate.
  2. If they do not match, return an error as an invalid request.

#### How to Obtain the Secret Key

Game8, Inc. will generate and share the private key with you.

## 2. Publisher APIs

### 2.1. Purchase Eligibility Check (GET /check)`1 image`

#### Overview

Checks whether an in-game item can be purchased, considering factors such as age restrictions and purchase limits.
To prevent purchase failures due to time lag in payment processing for limited-quantity items, a

> When conducting gift campaigns, for items priced at 0 yen, you may be requested to allow item purchases without age verification.

#### Request Specifications

| Field | Details |
| --- | --- |
| Method | GET |
| Endpoint | `/check` |
| Protocol | HTTPS |
| Content type | application/json |

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | Bearer `<ACCESS_TOKEN>` | Authentication information |
| Content-Type | application/json | Content type |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

#### Query Parameter

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| game | string | ✅ | A unique game ID issued within Game8 Store |
| user | string | ✅ | Unique in-game user ID issued within the game |
| transaction_id | string | ✅ | Identifier that uniquely identifies a transaction |
| item | string | ✅ | Unique ID of the item to be purchased within the game （[？](https://developers.store.game8.jp/en/faq/#acc-faq-523efe3d)） |
| item_category | string | ✅ | Type of item to be purchased<br>`paid` : Paid products (regular purchasable items)<br>`free` : Free products (items priced at 0 JPY, such as gifts and campaign giveaways) |
| price | integer | ✅ | Standard price of the item (tax included, JPY). List price before any discounts. |
| selling_price | integer | ✅ | Selling price after publisher-borne discounts (tax included, JPY). Equals price if no discount is applied. |
| billing_amount | integer | ✅ | Final billing amount after deducting points, coupons, and other adjustments from the selling price (tax included, JPY). Equals selling_price if none are applied. |

#### Request Example

```json
GET /check HTTP/1.1
Host: <Optional (set by the publisher)>
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
X-Signature: <SIGNED_DATA>
Query Parameter:
  ?game=game123&user=user456&transaction_id=txn_123456&item=item789&item_category=paid&price=500
```

#### Response Specifications

#### Response Body

| Key | Type | Description |
| --- | --- | --- |
| request_id | string | Unique request ID |
| timestamp | string (ISO8601) | Response timestamp |
| result_code | string | Result code |
| message | string | Message |
| purchasable | string | Purchase status:`available`<br>Purchase not allowed:`unavailable`<br>Under maintenance:`maintenance` |
| age_category | string | User's age category. Examples include `under_18` / `adult` / `under_17` / `under_17` / `over_17` are examples; you can set other values as needed. |
| account_limit | Object \| null | Account purchase limit. Null if no purchase limit applies. |
| stock | Object \| null | Stock information. Null if unlimited stock. |
| requested_price | integer | Requested item price (tax included, JPY) |

#### Structure of account_limit

| Key | Type | Description |
| --- | --- | --- |
| total | integer | Purchase limit amount (JPY) |
| remaining | integer | Remaining purchase allowance (JPY) |
| reset_at | string (ISO8601) \| null | Scheduled date/time when the purchase limit resets. Null if not scheduled. |

#### stock Structure

| Key | Type | Description |
| --- | --- | --- |
| total | integer | Total stock quantity |
| remaining | integer | Remaining stock quantity |
| restock_interval | string | Restock interval:`daily`<br>Per week:`weekly`<br>Per month: `monthly`<br>null if the restock date is undetermined |
| restock_at | string (ISO8601) \| null | Scheduled date/time for the next restock (if applicable). Null if not scheduled or unlimited. |

#### Response Example (Purchasable)

```json
{
  "request_id": "abc123",
  "timestamp": "2025-02-04T12:34:56Z",
  "result_code": "PUB0000",
  "message": "Purchase allowed",
  "purchasable": "available",
  "age_category": "under_15",
  "account_limit": {
    "total": 10000,
    "remaining": 9000,
    "reset_at": "2025-03-01T00:00:00Z"
  },
  "stock": {
    "total": 10,
    "remaining": 9,
    "restock_interval": "daily",
    "restock_at": "2025-02-05T00:00:00Z"
  },
  "requested_price": 500
}
```

#### Response Example (Not Purchasable - Age Verification Not Submitted)

```json
{
  "request_id": "abc124",
  "timestamp": "2025-02-04T12:35:00Z",
  "result_code": "PUB2006",
  "message": "Purchase is not allowed because age verification has not been completed.",
  "purchasable": "unavailable",
  "age_category": "unset",
  "account_limit": null,
  "stock": null,
  "requested_price": 500
}
```

#### Response Example (Not Purchasable - Purchase Limit Exceeded)

```json
{
  "request_id": "abc125",
  "timestamp": "2025-02-04T12:36:00Z",
  "result_code": "PUB2005",
  "message": "The purchase limit has been reached.",
  "purchasable": "unavailable",
  "age_category": "under_18",
  "account_limit": {
    "total": 10000,
    "remaining": 0,
    "reset_at": "2025-03-01T00:00:00Z"
  },
  "stock": {
    "total": 10,
    "remaining": 9,
    "restock_interval": "daily",
    "restock_at": "2025-02-05T00:00:00Z"
  },
  "requested_price": 500
}
```

#### Response Example (Not Purchasable - Item Not Available for Sale)

```json
{
  "request_id": "abc125",
  "timestamp": "2025-02-04T12:36:00Z",
  "result_code": "PUB2007",
  "message": "The target item is not available for sale.",
  "purchasable": "unavailable",
  "age_category": "under_18",
  "account_limit": {
    "total": 10000,
    "remaining": 9000,
    "reset_at": "2025-03-01T00:00:00Z"
  },
  "stock": {
    "total": 10,
    "remaining": 9,
    "restock_interval": "daily",
    "restock_at": "2025-02-05T00:00:00Z"
  },
  "requested_price": 500
}
```

#### Response Example (Not Purchasable - Under Maintenance)

```json
{
  "request_id": "abc125",
  "timestamp": "2025-02-04T12:36:00Z",
  "result_code": "PUB6000",
  "message": "The service is currently under maintenance.",
  "purchasable": "maintenance",
  "age_category": "under_18",
  "account_limit": {
    "total": 10000,
    "remaining": 9000,
    "reset_at": "2025-03-01T00:00:00Z"
  },
  "stock": {
    "total": 10,
    "remaining": 9,
    "restock_interval": "daily",
    "restock_at": "2025-02-05T00:00:00Z"
  },
  "requested_price": 500
}
```

### 2.2. Register Purchase (POST /register)`1 image`

#### Overview

Processes the addition of in-game items after purchase completion.

> We recommend implementing the following processes before registering purchase records:
>
> - Only accept requests that include a transaction_id that has passed through the item purchase eligibility check API
> - Verify that the purchase does not violate any purchase limitations

> When conducting gift campaigns, for items priced at 0 yen, you may be requested to allow item purchases without age verification.

#### Request Specifications

| Field | Details |
| --- | --- |
| Method | POST |
| Endpoint | `/register` |
| Protocol | HTTPS |
| Content type | application/json |

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | Bearer `<ACCESS_TOKEN>` | Authentication information |
| Content-Type | application/json | Content type |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

#### Request Body

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| game | string | ✅ | A unique game ID issued within Game8 Store |
| user | string | ✅ | Unique in-game user ID issued within the game |
| item | string | ✅ | Unique ID of the item to be purchased within the game （[？](https://developers.store.game8.jp/en/faq/#acc-faq-523efe3d)） |
| transaction_id | string | ✅ | Identifier that uniquely identifies a transaction |
| item_category | string | ✅ | Type of item to be purchased<br>`paid` : Paid products (regular purchasable items)<br>`free` : Free products (items priced at 0 JPY, such as gifts and campaign giveaways) |
| item_name | string | ✅ | Name of the purchased item (e.g., "100 Gem Pack") |
| price | integer | ✅ | Standard price of the item (tax included, JPY). List price before any discounts. |
| selling_price | integer | ✅ | Selling price after publisher-borne discounts (tax included, JPY). Equals price if no discount is applied. |
| billing_amount | integer | ✅ | Final billing amount after deducting points, coupons, and other adjustments from the selling price (tax included, JPY). Equals selling_price if none are applied. |
| purchased_at | string (ISO8601) | ✅ | Purchase date/time. |
| ref | string \| null | ✅ | The referrer domain name (e.g. game8.jp). null if the referrer is unknown. |
| payment_method | string \| null | ✅ | The payment method. Card for credit card payments, otherwise the payment service name (e.g. メルペイ, PayPal). null when no payment service is involved, such as a full-point payment. |
| contents | array | ✅ | List of contents included in the item |

#### Data structure of the

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| string | string | ✅ | `item` as a prefix with a suffix (e.g.,`pack001-1`） |
| content_name | string | ✅ | Name of the content within the item (e.g., "Gem") |
| quantity | integer | ✅ | Quantity of the content within the item (e.g., 1000) |

#### Request Example

```json
POST /register HTTP/1.1
Host: <Optional (set by the publisher)>
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
X-Signature: <SIGNED_DATA>

{
  "game": "game123",
  "user": "user456",
  "transaction_id": "txn789",
  "item": "pack001",
  "item_category": "paid",
  "item_name": "1,000 Gems",
  "price": 5000,
  "selling_price": 5000,
  "billing_amount": 5000,
  "purchased_at": "2025-02-04T12:36:00Z",
  "ref": "game8.jp",
  "payment_method": "Card",
  "contents": [
    {
      "content_id": "pack001-1",
      "content_name": "Gems",
      "quantity": 1000
    },
    {
      "content_id": "pack001-2",
      "content_name": "Bonus gold coins",
      "quantity": 100
    }
  ]
}
```

#### Response Specifications

#### Response Body

| Key | Type | Description |
| --- | --- | --- |
| request_id | string | Unique request ID |
| timestamp | string (ISO8601) | Response timestamp |
| result_code | string | Result code |
| message | string | Message |
| item_granted | boolean | Whether the in-game item was granted (`true` / `false`) |

#### Response Example (Success)

```json
{
  "request_id": "def456",
  "timestamp": "2025-02-04T12:36:00Z",
  "result_code": "PUB0000",
  "message": "The purchase record has been registered.",
  "item_granted": true
}
```

#### Response Example (Failure - Unknown User)

```json
{
  "request_id": "def458",
  "timestamp": "2025-02-04T12:38:00Z",
  "result_code": "PUB3002",
  "message": "The specified user does not exist.",
  "item_granted": false
}
```

#### Response Example (Failure - Already Registered Transaction ID)

```json
{
  "request_id": "def458",
  "timestamp": "2025-02-04T12:38:00Z",
  "result_code": "PUB3004",
  "message": "The specified TransactionID has already been registered.",
  "item_granted": false
}
```

### 2.3. Retrieve Player Information (GET /user_info)`1 image`

#### Overview

Retrieves player name and level based on the game ID entered by the user. Displaying this information on the purchase confirmation screen allows users to verify the accuracy of their entered ID and confirm proper connectivity with the game.

#### Request Specifications

| Field | Details |
| --- | --- |
| Method | GET |
| Endpoint | `/user_info` |
| Protocol | HTTPS |
| Content type | `application/json` |

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | `Bearer <ACCESS_TOKEN>` | Authentication information |
| Content-Type | `application/json` | Content type |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

#### Query Parameter

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| game | string | ✅ | A unique game ID issued within Game8 Store |
| user | string | ✅ | Unique in-game user ID issued within the game |

#### Request Example

```json
GET /user_info HTTP/1.1
Host: <Optional (set by the publisher)>
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
X-Signature: <SIGNED_DATA>
Query Parameter:
  ?game=game123&user=Player5678
```

#### Response Specifications

#### Response Body

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| request_id | string | ✅ | Unique request ID |
| timestamp | string (ISO8601) | ✅ | Response timestamp |
| result_code | string | ✅ | Result code |
| message | string | ✅ | Message |
| user_name | string | ✅ | Player name (can be masked) |
| user_level | integer | ✅ | Player level or rank. Returns |

> Since this API can retrieve other players' names using the entered in-game ID, consider masking player names as needed.

#### user_namemasking example

| Player Name | Masked |
| --- | --- |
| aa | *a |
| aaa | *aa |
| aaaa | **aa |
| aaaaa | ***aa |

#### Response Example (Success)

```json
{
  "request_id": "abc123",
  "timestamp": "2025-03-12T14:30:00Z",
  "result_code": "PUB0000",
  "message": "Retrieved successfully",
  "user_name": "****rX",
  "user_level": 45
}
```

#### Response Example (Failure - Player ID Not Found)

```json
{
  "request_id": "abc124",
  "timestamp": "2025-03-12T14:31:00Z",
  "result_code": "PUB2004",
  "message": "Player ID not found."
}
```

#### Response Example (Failure - Account Banned or Inactive)

```json
{
  "request_id": "abc124",
  "timestamp": "2025-03-12T14:31:00Z",
  "result_code": "PUB2008",
  "message": "Purchase not allowed due to account suspension."
}
```

#### Response Example (Failure - Server Maintenance)

```json
{
  "request_id": "abc125",
  "timestamp": "2025-03-12T14:32:00Z",
  "result_code": "PUB6000",
  "message": "The service is currently under maintenance."
}
```

### 2.4. Inventory Check(GET /stock)`Recommended`

#### Overview

Checks the stock status of a specified item and returns the remaining purchasable quantity.
Used for displaying stock status to users for limited-quantity or campaign items, and for pre-purchase flow validation.

#### Request Specifications

| Field | Details |
| --- | --- |
| Method | GET |
| Endpoint | `/stock` |
| Protocol | HTTPS |
| Content type | `application/json` |

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | `Bearer <ACCESS_TOKEN>` | Authentication information |
| Content-Type | `application/json` | Content type |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

#### Query Parameter

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| game | string | ✅ | A unique game ID issued within Game8 Store |
| user | string | ✅ | Unique in-game user ID issued within the game |
| transaction_id | string | ✅ | Identifier that uniquely identifies a transaction |
| items | string | ✅ | Unique ID of the item to be purchased within the game （[？](https://developers.store.game8.jp/en/faq/#acc-faq-523efe3d)）<br>Multiple values can be specified, separated by commas |

#### Request Example

```json
GET /stock HTTP/1.1
Host: <Optional (set by the publisher)>
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
X-Signature: <SIGNED_DATA>
Query Parameter:
	?game=game123&user=user456&transaction_id=txn_123456&items=item789,item012
```

#### Response Specifications

#### Response Body

| Key | Type | Description |
| --- | --- | --- |
| request_id | string | Unique request ID |
| timestamp | string (ISO8601) | Response timestamp |
| result_code | string | Result code |
| message | string | Message |
| stock | Object[] | Stock information |

#### stock Structure

| Key | Type | Description |
| --- | --- | --- |
| item | string | Unique ID of the item to be purchased within the game （[？](https://developers.store.game8.jp/en/faq/#acc-faq-523efe3d)） |
| total | integer | Total stock quantity. Returns |
| remaining | integer | Remaining stock quantity. Returns |
| restock_at | string (ISO8601) \| null | Scheduled date/time for the next restock (if applicable). Null if not scheduled or unlimited. |

#### Response Example (In Stock)

```json
{
	"request_id": "abc123",
	"timestamp": "2025-02-04T12:34:56Z",
	"result_code": "PUB0000",
	"message": "Success",
	"stock": [
	  {
		  "item": "item789",
		  "total": 10,
		  "remaining": 8,
		  "restock_at": null
	  }
	]
}
```

#### Response Example (Out of Stock)

```json
{
	"request_id": "abc124",
	"timestamp": "2025-02-04T12:35:00Z",
	"result_code": "PUB2009",
	"message": "Item purchase limit reached",
	"stock": [
	  {
		  "item": "item789",
		  "total": 10,
		  "remaining": 0,
		  "restock_at": null
	  }
	]
}
```

#### Response Example (Unlimited Stock)

```json
{
	"request_id": "abc124",
	"timestamp": "2025-02-04T12:36:00Z",
	"result_code": "PUB0000",
	"message": "Success",
	"stock": [
	  {
	    "item": "item789",
		  "total": -1,
		  "remaining": -1,
		  "restock_at": null
	  }
	]
}
```

## 3. Game8 Store APIs

### Order Verify (GET /orders/verify)`Optional to Use`

#### Overview

`/register` The status of orders notified via the API can be`/register` API.
`/register` transaction_id `transaction_id` /register `/register` paid_transaction_id
Intended use cases:

- `/register` notification
- Re-querying when a previous API call has failed

This enables a**notification (/register) + verification (/orders/verify)**double-confirmation pattern.

This API is always running on the Game8 Store side, and no prior application is required. You do not need to provide an endpoint on your side — to use this API, you only implement the call to it. Even if it is not integrated into your payment flow, you can check the payment status of an order by sending a request (use is optional).

#### Request Specifications

| Field | Details |
| --- | --- |
| Method | GET |
| Endpoint | `/api/public/marketplace/publishers/{publisher_slug}/games/{game_slug}/orders/verify` |
| Protocol | HTTPS |
| Content type | application/json |

> `{publisher_slug}` is the publisher identifier, and`{game_slug}` is the game identifier. These will be provided by Game8, Inc.

#### Request Headers

| Key | Value | Details |
| --- | --- | --- |
| Authorization | Bearer `<ACCESS_TOKEN>` | Authentication information |
| X-Signature | `<SIGNED_DATA>` | Signature for verification |

> The signature is generated in the same way as described in "1.3. Configuring the X-Signature". Since this is a GET request, the query string is used as the data to be signed.

#### Query Parameter

| Key | Type | 1 image | Description |
| --- | --- | --- | --- |
| /register | string | ✅ | `/register` transaction_id `transaction_id` API. Only alphanumeric characters, hyphens, and underscores are allowed. |

#### Request Example

```
GET /api/public/marketplace/publishers/example-publisher/games/example-game/orders/verify HTTP/1.1
Host: <Game8specified by>
Authorization: Bearer <ACCESS_TOKEN>
X-Signature: <SIGNED_DATA>
Query Parameter:
  ?paid_transaction_id=txn_123456
```

#### Response Specifications

#### Response Body (Success)

| Key | Type | Description |
| --- | --- | --- |
| request_id | string | Unique request ID |
| timestamp | string (ISO8601) | Response timestamp |
| result_code | string | Result code |
| message | string | Message |
| /register | string | Transaction ID of the order |
| status | string | Order status (see below) |
| item_id | string | Publisher-side item ID |
| price | integer | Standard price of the item (tax included, JPY). List price before any discounts. |
| selling_price | integer | Selling price after publisher-borne discounts (tax included, JPY). Equals price if no discount is applied. |
| billing_amount | integer | Final billing amount after deducting points, coupons, and other adjustments from the selling price (tax included, JPY). Equals selling_price if none are applied. |
| purchased_at | string (ISO8601) \| null | Purchase date/time. Null when status is`pending`), the value is null |

#### Status Values

| Value | Description |
| --- | --- |
| `pending` | Payment in progress |
| `payment_confirmed` | Payment confirmed (payment has been completed but item granting has not yet finished) |
| `completed` | Completed (item granted) |
| `cancelled` | Cancelled |

#### Response Example (Success - Completed Order)

```json
{
  "request_id": "abc123",
  "timestamp": "2025-04-01T12:00:00+09:00",
  "result_code": "PUB0000",
  "message": "Success",
  "paid_transaction_id": "txn_123456",
  "status": "completed",
  "item_id": "item789",
  "price": 1000,
  "selling_price": 900,
  "billing_amount": 800,
  "purchased_at": "2025-04-01T12:00:00+09:00"
}
```

#### Response Example (Success - Pending Order)

```json
{
  "request_id": "abc124",
  "timestamp": "2025-04-01T12:00:01+09:00",
  "result_code": "PUB0000",
  "message": "Success",
  "paid_transaction_id": "txn_123456",
  "status": "pending",
  "item_id": "item789",
  "price": 1000,
  "selling_price": 1000,
  "billing_amount": 1000,
  "purchased_at": null
}
```

#### Error Response

When an error occurs, only the common response body fields are returned:

```json
{
  "request_id": "<RequestID>",
  "timestamp": "<Timestamp>",
  "result_code": "<Error Code>",
  "message": "<Error message>"
}
```

| HTTP Status | result_code | Message | Description |
| --- | --- | --- | --- |
| 400 | `PUB2001` | Required parameters are missing / Invalid parameters | `/register` is missing, has an invalid format, or path identifiers are invalid |
| 401 | `PUB1002` | Authentication or signature verification failed | Invalid access token or signature |
| 403 | `PUB1003` | Cannot access orders from other publishers or games | Attempting to query another publisher's order |
| 404 | `PUB3001` | The specified order was not found | No matching order exists |
| 429 | - | Rate limit exceeded. Please try again later. | Rate limit exceeded (60 requests/min). Response body uses `{"error": "..."}` format |
| 500 | `PUB4000` | An unexpected error occurred | Internal server error |
| 503 | `PUB4001` | Service unavailable | Temporary network failure. Please retry after a short interval |

#### Response Example (Error - Authentication Failed)

```json
{
  "request_id": "abc125",
  "timestamp": "2025-04-01T12:00:02+09:00",
  "result_code": "PUB1002",
  "message": "Authentication or signature verification failed"
}
```

#### Response Example (Error - Order Not Found)

```json
{
  "request_id": "abc126",
  "timestamp": "2025-04-01T12:00:03+09:00",
  "result_code": "PUB3001",
  "message": "The specified order was not found"
}
```

## 4. Error Handling

### 4.1. Error Code List

| Error Code | Description | Solution |
| --- | --- | --- |
| `PUB0000` | Success | - |
| `PUB1000` | Invalid request format | Check the request structure and required parameters, and send in the correct format. |
| `PUB1001` | Missing authentication credentials | `Authorization` header must be set to a valid `Bearer <ACCESS_TOKEN>` value. |
| `PUB1002` | Invalid access token | Check the token's validity and reissue it if necessary. |
| `PUB1003` | Insufficient access permissions | Verify that the API endpoint has the necessary permissions. |
| `PUB1004` | Signature mismatch | Ensure that the secret key used for the signature is correct. |
| `PUB1005` | Processed requests | Do not send a duplicate `request_id` value. |
| `PUB2001` | Missing required parameters | Check the required parameters and correct the request. |
| `PUB2002` | Invalid parameter type | Example: If `price` is sent as a `string` value, correct it to an integer. |
| `PUB2003` | Invalid parameter value | Ensure no unauthorized or out-of-range values are sent. |
| `PUB2004` | Data not found | Verify that the specified `game` or `user` exists. |
| `PUB2005` | Age-based purchase limit reached | `account_limit.remaining` shows the remaining amount; check that the limit has not been exceeded. |
| `PUB2006` | Age verification not completed | Prompt the user to complete age verification within the game. |
| `PUB2007` | Item no longer available for sale | Contact the sales or development team for store adjustments. |
| `PUB2008` | Account suspended, purchase unavailable | - |
| `PUB2009` | Item purchase limit reached | Check the purchase history to ensure the limit has not been exceeded. |
| `PUB2010` | Temporarily unable to purchase because the previous transaction is incomplete | Incomplete transactions are automatically canceled on the Game8 Store side after a certain period, returning the item to a purchasable state. Prompt the user to try purchasing again later. |
| `PUB3001` | Invalid transaction ID | `transaction_id` may be incorrect; check the value you sent. |
| `PUB3002` | Specified user not found | `user` may be incorrect; check the value you sent. |
| `PUB3003` | Specified item not found | `item` may be incorrect; check it and specify a valid item. |
| `PUB3004` | Already registered transaction ID | `transaction_id` may be incorrect; check the value you sent. |
| `PUB4000` | Internal server error | A server-side issue may have occurred; retry after some time. |
| `PUB4001` | Temporary system failure | Retry (recommended: retry after 5 seconds). |
| `PUB5000` | Unknown error | Check the detailed error message and contact the development team. |
| `PUB6000` | Under maintenance | The service is temporarily unavailable; retry after some time. |

### 4.2. Recommended Error Handling Flow

1. **`result_code`****Check**
  - `PUB0000`(Success), proceed as normal.
  - Otherwise, determine the type of error.
2. **Determine if the error can be fixed on the client side**
  - `PUB1000` series and `PUB2000` series errors can typically be resolved by correcting the request.
  - `PUB3000` series errors require data consistency verification.
3. **Check if the error is retryable**
  - `PUB4000`, `PUB4001` are likely temporary errors, so retrying after a few seconds is recommended.
4. **Log and report errors**
  - For unknown errors (`PUB5000`), keep a log and report it to the development team.

### 4.3. Retry Policy

| Error Code | Retry Interval | Max Retries | Notes |
| --- | --- | --- | --- |
| `PUB4000` | After 5 seconds | 3 times | Internal server errors may be resolved quickly. |
| `PUB4001` | After 10 seconds | 5 times | Longer interval recommended due to temporary system failures. |
| `PUB5000` | None | 0 times | Unknown errors should be reported immediately. |

Use this error handling list as a reference to implement proper error management in your system.
