> For the complete documentation index, see [llms.txt](https://docs-merchant.hitpoints.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-merchant.hitpoints.com/api-parameter-vs-code.md).

# API parameters and error code

## API Request Headers

| Parameters   | Required | Description                                                         |
| ------------ | -------- | ------------------------------------------------------------------- |
| APPID        | Yes      | Developer APPID                                                     |
| Sign         | Yes      | The signature calculated based on request body parameters           |
| Date-GMT     | Yes      | The current time for signature，Format：Tue, 27 Aug 2019 01:47:54 GMT |
| Content-Type | Yes      | application/x-www-form-urlencoded                                   |

## Response Headers

* Http status : 200&#x20;
  * Http status is always 200
  * The code and message in response body describe the request is success or not, generally, code = 200 means success
* Response Content-Type: application/json
* Sign : The signature from HitPoints signed for the data field of the response body. If there is no `data` field, there will be no `Sign` in response headers.
* Date-GMT: The signature time from HitPoints

> Above all, to validate HitPoints response signature, you need to get the data field from response body and get the `Sign` and `Date-GMT` from response headers.

## Response Body

```javascript
{"code":200,"message":"ok","data":{}}
```

### Field Description

| Field   | Required | Description                                        |
| ------- | -------- | -------------------------------------------------- |
| code    | Yes      | API response code, generally `200` means `success` |
| message | Yes      | API response code description                      |
| data    | Optional | if the API has response data output                |

### API response code description

|  value |                                      message                                      |
| :----: | :-------------------------------------------------------------------------------: |
|    0   |                                        fail                                       |
|   200  |                                         ok                                        |
| 400100 |                   bad request parameter, parameter validate fail                  |
| 400101 |                 the post raw data is invalid, openssl decrypt fail                |
| 400102 |                              bad request data format                              |
| 400103 |                                  data no changes                                  |
| 400104 |                       merchant reference\_id already exists                       |
| 400105 | payment token is forbidden because of invalid owner or missing top-up information |
| 400106 |                            the payment token is expired                           |
| 400107 |                      invalid data sign for request parameters                     |
| 400108 |                  invalid rsa public key, fail to read public key                  |
| 400109 |                             missing request sign date                             |
| 400110 |                             sign GMT date format error                            |
| 400111 |                             request sign date expired                             |
| 400112 |                           duplicate request is forbidden                          |
| 400113 |                              user balance not enough                              |
| 400114 |       user balance account currency error or not match with the transaction       |
| 400115 |                              payment token is invalid                             |
| 400116 |                          the HitPoints pin key is invalid                         |
| 400117 |                              fail for unsold pin key                              |
| 400118 |                        the reload payment has been canceled                       |
| 400119 |           the payment token is already used, please check payment status          |
| 400120 |                 the payment token status is not allowed to operate                |
| 400121 |       the pin is inactive, please contact the seller of the your pin product      |
| 400122 |                           the pin key is already expired                          |
| 400123 |                                  the PIN is void                                  |
| 400124 |                             the PIN amount is invalid                             |
| 400125 |              the PIN currency donot match with the reload information             |
| 400126 |               the PIN amount donot match with the reload information              |
| 400127 |              this category of PINs are not supported by the merchant              |
| 400128 |                            the out trade id is repeated                           |
| 400129 |                        the requested pin product not exists                       |
| 400130 |                   the pin fetch quantity out of the upper limit                   |
| 400131 |                    the PIN product is closed, cannot be fetched                   |
| 400132 |                  pin category error or pin category was disabled                  |
| 400133 |              this category of PINs are not supported by the reseller              |
| 401100 |                                 login status error                                |
| 401101 |                              client login IP changed                              |
| 401102 |                     your IP is blocked or not in IP white list                    |
| 401103 |                      missing data sign for request parameters                     |
| 401104 |                                   missing appid                                   |
| 401105 |                           appid is invalid or not exist                           |
| 403100 |                         no permission to access the source                        |
| 403101 |                         user account is currently disabled                        |
| 403102 |                         trying to access unauthorized data                        |
| 404100 |                                   data not found                                  |
| 500100 |                               server internal error                               |
| 500101 |                           service currently unavailable                           |
| 500102 |                               call api server error                               |
| 500103 |                              server private key error                             |
| 500104 |                               server signature error                              |
| 510100 |                             operate user balance fail                             |
| 510101 |                             operate order status fail                             |
| 510102 |                pin stock not enough, please contact HitPoints admin               |
| 510103 |                  the merchant has not set up the currency account                 |
| 510104 |                        the developer account was not found                        |
| 510105 |                         the developer account was disabled                        |
| 510106 |                  the reseller has not set up the currency account                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs-merchant.hitpoints.com/api-parameter-vs-code.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.
