Getting Started 
Environment Setup 
Before you begin, make sure you have completed the Set Up Test Environment step.
| Test | https://p-gate-uat.checus.com/aggregate-pay/api/gateway/<PATH> | 
| Production | https://pay-gate-hk-prod.checus.com/aggregate-pay/api/gateway/<PATH> | 
Interaction Flow 

Key APIs 
| Interaction | Direction | API / Method | 
|---|---|---|
| Initiate Refund | Merchant→Checus | /refund | 
| Refund Result Notification | Checus→Merchant | /refundResultNotifyUrl | 
| Query Refund Transaction | Merchant→Checus | /refundQuery | 
Integration Steps 
1. Create Refund Session 
Call the Refund Application/refund to initiate a POST request to create a refund.
2. Refund Status and Result Query 
After initiating a refund, Checus will submit an original path refund request to the bank or relevant institution, and notify the merchant of the refund status through the Refund Notification/refundResultNotifyUrl .
| Status | Description | Notes | 
|---|---|---|
| REFUND_SUCCESS | Refund Successful | Channel has successfully accepted the refund application; actual settlement time is subject to channel limitations, usually within 21 days. | 
| REFUND_PENDING | Refund Processing | Refund request has been initiated and is being processed by the channel. | 
| REFUND_FAILED | Refund Failed | Refund could not be completed for some reason. | 
Method 1. Refund Result Notification
After successful refund, Checus will asynchronously callback the merchant's configured callback address, initiating the Refund Notification/refundResultNotifyUrl . Callbacks may be sent multiple times until the merchant returns a successful response.
Callback Address Configuration Methods:
- Interface Parameter Setting: When applying for refund, pass in refundNotifyUrl. This configuration only applies to the current refund and overrides global configuration.
- Merchant Platform Setting: Configure refund callback address uniformly through Merchant Management Platform, applicable to all refunds. After receiving the payment result notification, you should return the processing result. If no response or failure is returned, Checus will retry notifications at the following intervals: 0s / 30s / 300s / 600s / 3600s / 43200s, with a maximum of 6 retries.
Method 2. Active Query Refund Results
If no notification is received or the order status is unclear, you can call the Refund Query/refundQuery to actively query the refund status.
You can determine if the interface call was successful through code, and determine the refund status through data.status.
  Avoid using msg or resultMsg to determine refund results.
Method 3. Query Refunds through Merchant Management Platform
Whether refunds are initiated through API or platform, merchants can log in to Merchant Management Platform, 'Collection Management' > 'Refund Query', to view refund status and progress.
