> ## Documentation Index
> Fetch the complete documentation index at: https://developer.cregis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Payment order

> This endpoint enables you to retrieve a payment

### API URL

POST /api/v2/order/info

### Request

#### Request Parameters

| Name       | Type           | Required | Description      |
| ---------- | -------------- | -------- | ---------------- |
| pid        | integer(int64) | Y        | Project id       |
| nonce      | string         | Y        | 6 random string  |
| timestamp  | integer(int64) | Y        | Timestamp        |
| sign       | string         | Y        | Signature        |
| cregis\_id | string         | Y        | Cregis unique id |

###### Request Example

```json theme={null}
{
    "cregis_id": "po20240703132452000",
    "pid": 1382528827416576,
    "nonce": "hwlkk6",
    "timestamp": 1688004243314,
    "sign": "d6eef2de79e39f434a38efb910213ba6"
}
```

### Response

#### Response Result

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| code | string | Return code    |
| msg  | string | Return message |
| data | object | Return data    |

#### Response `data` Object

| Name               | Type           | Description                                                                                                                                                                                                                                                                        |
| ------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cregis\_id         | string         | Cregis unique id                                                                                                                                                                                                                                                                   |
| order\_id          | string         | used by the merchant to assign their own internal order ID to a payment                                                                                                                                                                                                            |
| order\_amount      | string         | Order amount                                                                                                                                                                                                                                                                       |
| order\_currency    | string         | Order currency code                                                                                                                                                                                                                                                                |
| created\_time      | integer(int64) | Order creation time in 13-digit unix timestamp format <br /> e.g. 1720508269092 (2024-07-09 14:57:49 092)                                                                                                                                                                          |
| cancel\_time       | integer(int64) | Order cancellation time in 13-digit unix timestamp format <br /> e.g. 1720508269092 i.e. 2024-07-09 14:57:49 092                                                                                                                                                                   |
| transact\_time     | integer(int64) | Order completion time in 13-digit unix timestamp format <br /> e.g. 1720508269092 i.e. 2024-07-09 14:57:49 092                                                                                                                                                                     |
| valid\_time        | integer(int32) | Unit: Minutes (Integer value from 10 to 60) <br /> The valid time for this order. If the valid time is expired, the payment will not be accepted.                                                                                                                                  |
| status             | string         | Order Status: <br /> new - Initial status of the order <br /> paid - The order has been successfully paid <br /> expired - The order has exceeded the valid time <br /> paid\_over - Payment exceeds the order amount <br /> paid\_partial - Payment is less than the order amount |
| refund\_requested  | string         | Whether a refund has been requested to the order <br /> no: no refund request record <br /> yes: a refund is requested                                                                                                                                                             |
| payer\_id          | string         | Merchant to assign their own internal user ID to associate with a payment                                                                                                                                                                                                          |
| payer\_name        | string         | Payer's name                                                                                                                                                                                                                                                                       |
| payer\_email       | string         | Payer's email                                                                                                                                                                                                                                                                      |
| remark             | string         | For the merchant to make remarks about a payment                                                                                                                                                                                                                                   |
| payment\_detail    | ArrayObject    | Payment History                                                                                                                                                                                                                                                                    |
| payment\_info      | ArrayObject    | Information to request payment                                                                                                                                                                                                                                                     |
| order\_details     | Object         | The breakdown details of an order, each item will be displayed on the Cregis checkout page                                                                                                                                                                                         |
| settlement\_status | string         | Settlement status: <br /> unsettled : settlement not processed yet <br /> settling : settlement processing <br /> settled : settlement completed                                                                                                                                   |
| settlement\_type   | string         | Settlement type：<br /> system : settlement is handled automatically <br /> manual •: settlement is handled manually                                                                                                                                                                |
| sub\_merchant      | Object         | If the merchant has a sub merchant assigned under this acquiring project, it can be used by the merchant to assign their own internal sub merchant ID to associate with a payment                                                                                                  |
| refund\_data       | object         | Refund related information                                                                                                                                                                                                                                                         |

**order\_details object**

| Name           | Type        | Description                                     |
| -------------- | ----------- | ----------------------------------------------- |
| shopping\_cost | decimal     | Shipping cost of the order                      |
| tax\_cost      | decimal     | Tax amount of the order                         |
| items          | ArrayObject | The breakdown details of each item in the order |

​**items object**

| Name            | Type           | Description                       |
| --------------- | -------------- | --------------------------------- |
| item\_id        | string         | The unique identifier of the item |
| item\_name      | string         | Item name                         |
| item\_price     | decimal        | Item unit price                   |
| price\_currency | string         | Item currency                     |
| item\_quantity  | integer(int64) | Item quantity                     |

**sub\_merchant object**

| Name                | Type   | Description          |
| ------------------- | ------ | -------------------- |
| sub\_merchant\_id   | string | ID of sub merchant   |
| sub\_merchant\_name | string | Name of sub merchant |

**payment\_detail object**

| Name              | Type   | Description                             |
| ----------------- | ------ | --------------------------------------- |
| payment\_address  | string | Payment wallet address (Pay to address) |
| from\_address     | string | Payer wallet address                    |
| receive\_amount   | string | Converted order amount                  |
| receive\_currency | string | Converted order currency                |
| pay\_amount       | string | Actual received amount                  |
| pay\_currency     | string | Received currency                       |
| exchange\_rate    | string | Exchange rate                           |
| tx\_id            | string | Transaction hash                        |
| blockchain        | string | blockchain                              |
| token\_name       | string | token\_name                             |

**payment\_info object**

| Name              | Type    | Description                                                      |
| ----------------- | ------- | ---------------------------------------------------------------- |
| payment\_address  | string  | Wallet address that receives payment                             |
| token\_symbol     | string  | Currency. Can refer to the parameter of tokens in order creation |
| blockchain        | string  | Blockchain network                                               |
| token\_name       | string  | crypto token name                                                |
| logo\_url         | string  | crypto token logo                                                |
| token\_decimals   | integer | crypto token decimal places                                      |
| receive\_amount   | string  | Converted order amount                                           |
| receive\_currency | string  | Converted order currency                                         |
| exchange\_rate    | string  | Currency exchange rate                                           |
| asset\_logo       | string  | crypto asset logo                                                |

**refund\_data object**

| Name                   | Type           | Required                                                                                       | Description |
| ---------------------- | -------------- | ---------------------------------------------------------------------------------------------- | ----------- |
| refund\_id             | integer(int64) | Unique identifier of a refund generated by Cregis                                              |             |
| cregis\_id             | string         | Unique identifier of a payment generated by Cregis                                             |             |
| reference\_id          | string         | used by the merchant to assign their own internal order ID to a payment                        |             |
| recipient\_id          | string         | Merchant to assign their own internal user ID to associate with a refund                       |             |
| recipient\_name        | string         | Refund receiver's name                                                                         |             |
| recipient\_email       | string         | Refund receiver's email                                                                        |             |
| recipient\_address     | string         | Refund receiving address                                                                       |             |
| token                  | string         | Refund currenccy：USDT-BEP20，USDT-TRC20                                                         |             |
| network                | string         | Refund payment network/blockchain                                                              |             |
| refund\_amount         | string         | Refund amount                                                                                  |             |
| refund\_fee            | string         | Refund handling fee that's paid by receiver                                                    |             |
| actual\_refund\_amount | string         | The actual refund amount after the gas fee deduction                                           |             |
| type                   | int            | Refund type <br /> 0: partial refund <br /> 1: full refund                                     |             |
| refund\_status         | int            | Refund status <br /> 0: refund in progress <br /> 1: refund successful <br /> 2: refund failed |             |
| refund\_tx\_id         | string         | Refund transaction hash                                                                        |             |
| refund\_created\_time  | string         | Refund request creation timestamp <br /> e.g. 1720508269092 means 2024-07-09 14:57:49 092      |             |
| refund\_transact\_time | string         | Refund request transaction time  <br /> e.g. 1720508269092 即 2024-07-09 14:57:49 092           |             |

###### Response Example

```json theme={null}
{
    "code": "00000",
    "msg": "ok",
    "data": {
        "cregis_id": "po1420761885130752",
        "order_id": "merchant_order_id_123",
        "order_amount": "5",
        "order_currency": "HKD",
        "created_time": 1734328473070,
        "cancel_time": null,
        "transact_time": 1734328473872,
        "valid_time": 60,
        "status": "paid",
        "payer_id": "payer001",
        "payer_name": "payer",
        "payer_email": "12345678@email.com",
        "remark": "remark",
        "payment_detail":  [
            {
                "payment_address": "TUX9zGoPFVXd6RC7pg18nfVLATeN9vgBeX",
                "from_address": "THMxY6QeMYqACWs8fiL4VGBz2ZJRp4mDhT",
                "receive_amount": "10.00",
                "receive_currency": "USDT",
                "pay_amount": "10",
                "pay_currency": "USDT",
                "exchange_rate": "1",
                "tx_id": "d51bc829da5ad05c14f8f0a6ae16708129e485346ad91b8d5f2d33e490b91815",
                "blockchain": "TRON",
                "token_name": "USDT-TRC20"
            }
        ],
        "payment_info": [
            {
                "payment_address": "0xf9d70ab23195cfc9c0c14b384a1fd3a3f12cd4f8",
                "token_symbol": "USDT",
                "blockchain": "BNB-BSC",
                "token_name": "USDT-BEP20",
                "logo_url": "https://static.cregis.io/pic/coin/USDT-BNB%20Chain-BEP20@8x.png",
                "token_decimals": 18,
                "receive_amount": "0.642951",
                "receive_currency": "USDT",
                "exchange_rate": "0.1285902181",
                "asset_logo": "https://static.cregis.io/pic/coin/tether%20usd-usdt-with-currency@8x.png"
            },
            {
                "payment_address": "TX8GZJfLYPtmzRgd3FoiXuCHbptiQ37NSM",
                "token_symbol": "USDT",
                "blockchain": "TRON",
                "token_name": "USDT-TRC20",
                "logo_url": "https://static.cregis.io/pic/coin/USDT-Tron-TRC20@8x.png",
                "token_decimals": 6,
                "receive_amount": "0.642951",
                "receive_currency": "USDT",
                "exchange_rate": "0.1285902181",
                "asset_logo": "https://static.cregis.io/pic/coin/tether%20usd-usdt-with-currency@8x.png"
            }
        ],
        "order_details": {
            "items": [
                {
                    "item_id": "1",
                    "item_name": "Product1",
                    "item_price": 123,
                    "price_currency": "HKD",
                    "item_quantity": 1
                },
                {
                    "item_id": "1",
                    "item_name": "Product2",
                    "item_price": 124,
                    "price_currency": "HKD",
                    "item_quantity": 1
                }
            ],
            "shopping_cost": 10.88,
            "tax_cost": 100
        },
        "settlement_status": "unsettled",
        "settlement_type": "",
        "sub_merchant": {
            "sub_merchant_id": "123",
            "sub_merchant_name": "kg"
        }
    }
}
```
