Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Receive a signed classic EPay form notification

Generated from the checked-in source. Do not edit this reference by hand.

POST /payments/epay/notify

Same verified funding contract as GET. Form bodies are limited to 8192 bytes. Rejects duplicate and unknown fields before verification. Post-body processing has a two-second deadline. Acknowledgment follows durable funding; replay never creates a second credit.

Operation: receiveEPayFormNotification.

No OpenAPI security scheme is required. Other request validation still applies.

JSON
[]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X POST "$NIU_ORIGIN/payments/epay/notify" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-binary @request-body

No path, query, or header parameters are declared.

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"pid",
"out_trade_no",
"trade_no",
"type",
"money",
"trade_status",
"sign",
"sign_type"
],
"properties": {
"pid": {
"type": "string",
"pattern": "^[0-9]{1,32}$"
},
"out_trade_no": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"trade_no": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$"
},
"type": {
"type": "string"
},
"money": {
"type": "string",
"description": "Exact decimal CNY matching the saved intent."
},
"trade_status": {
"type": "string",
"const": "TRADE_SUCCESS"
},
"sign": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"sign_type": {
"type": "string",
"const": "MD5"
},
"name": {
"type": "string",
"maxLength": 1024
}
}
}

Verified payment committed or replayed; exactly one saved-order credit

Response headers:

JSON
{
"Cache-Control": {
"schema": {
"type": "string",
"const": "no-store"
}
}
}

Content type: text/plain.

JSON
{
"type": "string",
"const": "success"
}

Invalid form content type, notification or signed saved-order evidence

Payment identity conflicts with an existing binding or another order

Form exceeds 8192 bytes

Integration unavailable or processing deadline exceeded; retry delivery

Durable storage unavailable; retry notification

Same verified funding contract as GET. Form bodies are limited to 8192 bytes. Rejects duplicate and unknown fields before verification. Post-body processing has a two-second deadline. Acknowledgment follows durable funding; replay never creates a second credit.

Supported scope: implemented