> ## 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.

# Payment notify

> The notification for payment result.

## Callback API

Notify the caller when the order status changes using the provided `callback_url`, details for [Create payment order](/api-reference/request-apis/payment/payment-engine-create) `callback_url` param

#### Callback event

| Callback Event Name (event\_name) | Callback Event Type (event\_type) | Description                                                    |
| --------------------------------- | --------------------------------- | -------------------------------------------------------------- |
| order                             | expired                           | Order Timeout Notification                                     |
| order                             | paid                              | Payment Completed Notification                                 |
| order                             | paid\_partial                     | Partial Payment completion notification                        |
| order                             | paid\_over                        | Overpayment completion notification                            |
| order                             | refunded                          | Order refund notification                                      |
| order                             | paid\_remain                      | Additional payment for the order remaining amount Notification |

#### Request method

* Method: HTTP POST
* Content-Type: application/json
* If the response is the string "success", the callback is successful; otherwise, it fails.

#### Request parameters

| Name        | Type           | Description       |
| ----------- | -------------- | ----------------- |
| event\_name | string         | Event name        |
| event\_type | string         | Event type        |
| data        | JSONString     | Order information |
| pid         | integer(int64) | Project ID        |
| nonce       | string         | 6 random string   |
| timestamp   | integer(int64) | Timestamp         |
| sign        | string         | Signature         |

#### Paid/Partial\_Paid/Overpaid order `data` Object

| Name              | Type           | Description                                                                                                                                                                                                                                                                        |
| ----------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cregis\_id        | string         | Cregis unique id                                                                                                                                                                                                                                                                   |
| order\_id         | string         | Merchant's custom unique order ID                                                                                                                                                                                                                                                  |
| receive\_amount   | string         | The amount of the order after exchange rate conversion                                                                                                                                                                                                                             |
| receive\_currency | string         | The order currency code after exchange rate conversion                                                                                                                                                                                                                             |
| pay\_amount       | string         | Actual Received Amount                                                                                                                                                                                                                                                             |
| pay\_currency     | string         | Received currency                                                                                                                                                                                                                                                                  |
| order\_amount     | string         | Order transaction amount, defined by the merchant                                                                                                                                                                                                                                  |
| order\_currency   | string         | Order currency code, i.e. ISO 4217 currency code, such as CNY, HKD, defined by the merchant, [Order currency List](/api-reference/request-apis/payment/payment-order-currency)                                                                                                     |
| exchange\_rate    | string         | Exchange rate                                                                                                                                                                                                                                                                      |
| payment\_address  | string         | Payment wallet address                                                                                                                                                                                                                                                             |
| created\_time     | integer(int64) | Order creation timestamp in 13-digit                                                                                                                                                                                                                                               |
| cancel\_time      | integer(int64) | Order expiration cancel timestamp in 13-digit                                                                                                                                                                                                                                      |
| transact\_time    | integer(int64) | Order transaction timestamp in 13-digit                                                                                                                                                                                                                                            |
| valid\_time       | integer        | To determine the order expiration time , if not specified, the order expiration time will be 30 minutes as default. Please input in minutes. Minimum is 10 minutes                                                                                                                 |
| 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 |
| remark            | string         | Remarks                                                                                                                                                                                                                                                                            |
| tx\_id            | string         | Transaction hash                                                                                                                                                                                                                                                                   |
| payer\_id         | string         | Payer unique ID. No more than 32 characters                                                                                                                                                                                                                                        |
| payer\_name       | string         | Payer's name. No more than 32 characters                                                                                                                                                                                                                                           |
| payer\_email      | string         | Payer email                                                                                                                                                                                                                                                                        |

#### Expired order `data` Object

| Name            | Type           | Description                                                                                                                                                                                                                                                                  |
| --------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cregis\_id      | string         | Cregis unique id                                                                                                                                                                                                                                                             |
| order\_id       | string         | Merchant's custom unique order ID.                                                                                                                                                                                                                                           |
| order\_amount   | string         | Order transaction amount, defined by the merchant                                                                                                                                                                                                                            |
| order\_currency | string         | Order currency code, i.e. ISO 4217 currency code, such as CNY, HKD, defined by the merchant                                                                                                                                                                                  |
| created\_time   | integer(int64) | Order creation time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                                |
| cancel\_time    | integer(int64) | Order cancelled time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                               |
| valid\_time     | integer        | To determine the order expiration time , if not specified, the order expiration time will be 30 minutes as default. Please input in minutes. Minimum is 10 minutes.                                                                                                          |
| 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 |
| remark          | string         | Remarks                                                                                                                                                                                                                                                                      |
| payer\_id       | string         | Payer unique ID. No more than 32 characters                                                                                                                                                                                                                                  |
| payer\_name     | string         | Payer's name. No more than 32 characters                                                                                                                                                                                                                                     |
| payer\_email    | string         | Payer email                                                                                                                                                                                                                                                                  |

#### Refund order `data` Object

| Name                   | Type           | Description                                                                                                                                                                                                                                                                  |
| ---------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cregis\_id             | string         | Cregis unique id                                                                                                                                                                                                                                                             |
| order\_id              | string         | Merchant's custom unique order ID.                                                                                                                                                                                                                                           |
| receive\_amount        | string         | The amount of the order after exchange rate conversion                                                                                                                                                                                                                       |
| receive\_currency      | string         | The order currency code after exchange rate conversion                                                                                                                                                                                                                       |
| pay\_amount            | string         | Actual Received Amount                                                                                                                                                                                                                                                       |
| pay\_currency          | string         | Received currency                                                                                                                                                                                                                                                            |
| order\_amount          | string         | Order transaction amount, defined by the merchant                                                                                                                                                                                                                            |
| order\_currency        | string         | Order currency code, i.e. ISO 4217 currency code, such as CNY, HKD, defined by the merchant                                                                                                                                                                                  |
| exchange\_rate         | string         | Exchange rate                                                                                                                                                                                                                                                                |
| payment\_address       | string         | Payment wallet address                                                                                                                                                                                                                                                       |
| created\_time          | integer(int64) | Order creation time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                                |
| cancel\_time           | integer(int64) | Order cancelled time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                               |
| transact\_time         | integer(int64) | Order payment completed time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                       |
| valid\_time            | integer        | To determine the order expiration time , if not specified, the order expiration time will be 30 minutes as default. Please input in minutes. Minimum is 10 minutes.                                                                                                          |
| 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 |
| remark                 | string         | Remarks                                                                                                                                                                                                                                                                      |
| tx\_id                 | string         | Transaction hash                                                                                                                                                                                                                                                             |
| payer\_id              | string         | Payer unique ID. No more than 32 characters                                                                                                                                                                                                                                  |
| payer\_name            | string         | Payer's name. No more than 32 characters                                                                                                                                                                                                                                     |
| payer\_email           | string         | Payer email                                                                                                                                                                                                                                                                  |
| refund\_requested      | string         | Whether a refund has been requested to the order <br /> no: no refund request record <br /> yes: a refund is requested                                                                                                                                                       |
| type                   | int            | Refund type <br /> 0: partial refund <br /> 1: full refund                                                                                                                                                                                                                   |
| refund\_id             | long           | Unique identifier of a refund generated by Cregis                                                                                                                                                                                                                            |
| refund\_address        | string         | Refund receiving address                                                                                                                                                                                                                                                     |
| refund\_currency       | string         | Refund currenccy：USDT-BEP20，USDT-TRC20                                                                                                                                                                                                                                       |
| 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 deducting the refund handling fee = refund\_amount - refund\_fee                                                                                                                                                                              |
| 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                                                                                                                                                                                          |

#### Additional order `data` Object

| Name                         | Type           | Description                                                                                                                                                                                                                                                                  |
| ---------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cregis\_id                   | string         | Cregis unique id                                                                                                                                                                                                                                                             |
| order\_id                    | string         | Merchant's custom unique order ID.                                                                                                                                                                                                                                           |
| receive\_amount              | string         | The amount of the order after exchange rate conversion                                                                                                                                                                                                                       |
| receive\_currency            | string         | The order currency code after exchange rate conversion                                                                                                                                                                                                                       |
| pay\_amount                  | string         | Actual Received Amount                                                                                                                                                                                                                                                       |
| pay\_currency                | string         | Received currency                                                                                                                                                                                                                                                            |
| order\_amount                | string         | Order transaction amount, defined by the merchant                                                                                                                                                                                                                            |
| order\_currency              | string         | Order currency code, i.e. ISO 4217 currency code, such as CNY, HKD, defined by the merchant                                                                                                                                                                                  |
| exchange\_rate               | string         | Exchange rate                                                                                                                                                                                                                                                                |
| payment\_address             | string         | Payment receiving wallet address(Pay to address)                                                                                                                                                                                                                             |
| created\_time                | integer(int64) | Order creation time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                                |
| cancel\_time                 | integer(int64) | Order cancelled time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                               |
| transact\_time               | integer(int64) | Order payment completed time. 13-digit timestamp. <br /> i.e. 1720508269092 is 2024-07-09 14:57:49 092                                                                                                                                                                       |
| valid\_time                  | integer        | To determine the order expiration time , if not specified, the order expiration time will be 30 minutes as default. Please input in minutes. Minimum is 10 minutes.                                                                                                          |
| 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 |
| remark                       | string         | Remarks                                                                                                                                                                                                                                                                      |
| tx\_id                       | string         | Transaction hash                                                                                                                                                                                                                                                             |
| payer\_id                    | string         | Payer unique ID. No more than 32 characters                                                                                                                                                                                                                                  |
| payer\_name                  | string         | Payer's name. No more than 32 characters                                                                                                                                                                                                                                     |
| payer\_email                 | string         | Payer email                                                                                                                                                                                                                                                                  |
| additional\_pay\_currency    | string         | Additional payment's currency                                                                                                                                                                                                                                                |
| additional\_pay\_amount      | string         | Additional payment's amount                                                                                                                                                                                                                                                  |
| additional\_payment\_address | string         | Additional payment's receiving address(Pay to address)                                                                                                                                                                                                                       |
| additional\_payment\_tx\_id  | string         | Additional payment's transaction hash                                                                                                                                                                                                                                        |
| additional\_payment\_tx\_id  | integer(int64) | Additional payment's transaction time                                                                                                                                                                                                                                        |

###### Request Example

```json theme={null}
{
    "event_name": "order",
    "event_type": "paid",
    "data": {
        "cregis_id": "po20240703132452000",
        "order_id": "c9231e604da54469a735af3f449c880f",
        "receive_amount": "12.86",
        "receive_currency": "USDT",
        "pay_amount": "12.86",
        "pay_currency": "USDT",
        "order_amount": "100",
        "order_currency": "HKD",
        "exchange_rate": "0.1286",
        "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": "test@mail.com"
        "remark":"remark",
        "tx_id": "0x0502f2bfd96cd0f55edea3343513940f3af7fe594eae77f08d2f46ea24829b11"
    }
}
```
