Async Notification (Collection / Payout)
To simplify integration, the async notification payload for collection and payout is the same. Pay special attention to the sts field: the status values differ between payout and collection.
Notification Parameters
| Field | Key | Type | Signed | Example | Description |
|---|---|---|---|---|---|
| Merchant ID | merid | string | Yes | 10085 | Merchant ID assigned by the platform (not the login account). |
| Order No. | sn | string | Yes | sn1234556 | Platform order number. |
| Merchant Order No. | tno | string | Yes | tno | Merchant order number. |
| Amount | amt | string | Yes | 126.35 | Order amount. |
| Status | sts | string | Yes | success | Collections notify only on success. Payouts may also notify with failure statuses. |
| Create Time | ctm | string | Yes | 2000-01-01 10:10:10 | Order creation time. |
| Extra Data | extra | string | Yes | SD1564654567715547 | Extra data. |
| Notify URL | notify_url | string | Yes | http://www.baidu.com | |
| Extend Data | extend | string | No | withdraw fail, account blocked | Extension info (e.g. payout failure reason). 1) This field is NOT included in the signature. 2) Enable “Add extend in callback” in Merchant Console → Personal Center → “API Extension Settings”. |
| Signature | sign | string | No | c8bbeab3ffb1.... | Signature. |
After verifying the notification, respond with HTTP status 200 and utf-8, and return plain text success.
Examples
php
header("Content-Type: text/plain; charset=utf-8");
echo "success";
java
response.setContentType("text/plain; charset=utf-8");
response.getWriter().write("success");
.NET
Response.ContentType = "text/plain; charset=utf-8";
await Response.WriteAsync("success");
GO
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.Write([]byte("success"))