Order Payment Notification (Webhook)
A server-initiated callback. Implement a receiving endpoint in your service.
Based on the callback_url filled in when creating the order, Cregis notifies the caller through this callback URL when the order status changes. For details, see the callback_url parameter in the Create Order API. This API is a callback notification request initiated by Cregis to the business party and only generates one callback:
Callback Events
| Callback event name (event_name) | Callback event type (event_type) | Description |
|---|---|---|
| order | expired | Order timeout notification |
| order | paid | Order payment completed notification |
| order | paid_partial | Order partial payment notification |
| order | paid_over | Order overpayment notification |
| order | refunded | Order refund notification |
| order | paid_remain | Order Additional Payment Notification |
Request Method
Cregis initiates the callback request with HTTP POST application/json. The callback is successful when the response content is the success string; otherwise, the callback fails.
If a callback fails, you can manually retry it from the Callback Error Page in the Cregis portal to preserve business logic completeness.
Request
Callback Payload
application/jsonnoncestring6-character random string.
pidinteger<int64>Project ID.
signstringSignature.
timestampinteger<int64>Timestamp.
event_namestringenum: "order"Event name.
event_typestringenum: "expired", "paid", "paid_partial", "paid_over", "refunded", "paid_remain"Event type.
Responses
200Your server must return HTTP 200 and a response body strictly equal to plain text `success` (`text/plain`).text/plainstring