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

# 收单通知

> 获取订单信息的通知

## 回调 API

根据创建订单填写的callback\_url,当订单状态变化时会通过该回调地址通知调用方，具体了解[创建订单](/api-reference/request-apis/payment/payment-create)接口中的`callback_url`参数

该接口为Cregis向业务方发起回调通知请求，只会产生一次回调：

#### 回调事件

| 回调事件名称(event\_name) | 回调事件类型(event\_type) | 描述       |
| ------------------- | ------------------- | -------- |
| order               | expired             | 订单超时通知   |
| order               | paid                | 订单支付完成通知 |

#### 请求方式

HTTP POST application/json

发起回调请求后当接收到返回内容为`success`字符串时为回调成功，否则为回调失败

#### 请求参数

| 名称          | 类型             | 描述      |
| ----------- | -------------- | ------- |
| event\_name | string         | 事件名称    |
| event\_type | string         | 事件类型    |
| data        | JSONString     | 订单信息    |
| pid         | integer(int64) | 项目编号    |
| nonce       | string         | 6位随机字符串 |
| timestamp   | integer(int64) | 时间戳     |
| sign        | string         | 签名      |

#### `data` 对象

| 名称                | 类型             | 描述                                            |
| ----------------- | -------------- | --------------------------------------------- |
| cregis\_id        | string         | cregis订单编号                                    |
| order\_id         | string         | 订单编号                                          |
| receive\_amount   | string         | 汇率转换后的订单金额                                    |
| receive\_currency | string         | 汇率转换后的订单货币单位                                  |
| pay\_amount       | string         | 实际到账金额                                        |
| pay\_currency     | string         | 到账货币单位                                        |
| order\_amount     | string         | 订单交易金额                                        |
| order\_currency   | string         | 订单货币代码，即ISO 4217货币代码,例如 CNY、HKD，参考法币信息列表接口    |
| exchange\_rate    | string         | 货币汇率                                          |
| payment\_address  | string         | 充值地址                                          |
| created\_time     | integer(int64) | 订单创建时间【13位时间戳】                                |
| cancel\_time      | integer(int64) | 订单取消时间【13位时间戳】                                |
| transact\_time    | integer(int64) | 订单支付完成时间【13位时间戳】                              |
| valid\_time       | integer        | 订单超时时间【单位/分钟】                                 |
| status            | string         | 订单状态【new -待支付 paid-被调用方收到付款 expired-订单超出有效时间】 |
| remark            | string         | 订单备注信息                                        |
| tx\_id            | string         | 交易hash                                        |
| payer\_id         | string         | 付款人id标识                                       |
| payer\_name       | string         | 付款人姓名                                         |
| payer\_email      | string         | 付款人邮箱                                         |

###### 请求示例

```json theme={null}
{
    "event_name": "order",
    "event_type": "paid",
    "data": {
        "cregis_id": "po20240703132452000",
        "order_id": "c9231e604da54469a735af3f449c880f",
        "receive_amount": "20.01",
        "receive_currency": "USDT",
        "pay_amount": "20.01",
        "pay_currency": "USDT",
        "order_amount": "100",
        "order_currency": "CNY",
        "exchange_rate": "7.0000000001",
        "payment_address": "0xd38c2cf366a731dcbe4a32c7ef24ff96d080ca7e",
        "created_time": 1719993183015,
        "cancel_time": null,
        "transact_time": 1719993183325,
        "valid_time": 30,
        "status": "paid",
        "payer_id": "p_001",
        "payer_name": "",
        "payer_email": "1538536069@qq.com"
        "remark":"购买商品",
        "tx_id": "0x0502f2bfd96cd0f55edea3343513940f3af7fe594eae77f08d2f46ea24829b11"
    }
}
```
