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

Receive a signed Stripe checkout notification

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

POST /payments/stripe/notify

Server-to-server callback; no installation or workspace bearer token is required. Verifies the signature over the original request bytes before parsing JSON, then requires an existing merchant-bound order and its saved checkout session. Paid evidence must match the saved session, amount, currency and configured live mode. Settlement is idempotent. Creating a checkout or visiting its return URL does not credit a balance. Unsupported or unrelated events are rejected rather than silently acknowledged. Maximum request body: 262144 bytes.

Operation: receiveStripePaymentNotification.

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/stripe/notify" \
-H 'stripe-signature: <STRIPE_SIGNATURE>' \
-H 'Content-Type: application/json' \
--data @request.json

Location: header. Required. Stripe timestamp and v1 signature of the unmodified request body.

JSON
{
"type": "string"
}

Required.

Original signed Stripe event JSON; proxies must preserve its bytes.

JSON
{
"type": "object",
"additionalProperties": true
}

Verified settlement accepted, including an already settled replay; empty response body.

Missing or invalid signature, malformed notification, unknown or unbound order, or mismatched paid evidence.

Stored order conflicts with settlement.

Request body exceeds 262144 bytes.

Stripe is not configured or the payment clock is unavailable.

Durable storage is unavailable.

Server-to-server callback; no installation or workspace bearer token is required. Verifies the signature over the original request bytes before parsing JSON, then requires an existing merchant-bound order and its saved checkout session. Paid evidence must match the saved session, amount, currency and configured live mode. Settlement is idempotent. Creating a checkout or visiting its return URL does not credit a balance. Unsupported or unrelated events are rejected rather than silently acknowledged. Maximum request body: 262144 bytes.

Supported scope: implemented