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

Record an externally verified settled customer payment

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

POST /api/v1/organizations/{organization}/billing/funding/settled

Installation write access only. Trusted administration must verify external payment settlement before calling. This is not a customer self-credit endpoint or a payment-channel callback integration. The channel/payment reference credits funds once; changed organization, currency or amount is a conflict. Pending payments must not be submitted. No commercial payment channel is implied by this administrative record API.

Operation: recordSettledCustomerFunding.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"adminBearerAuth": []
}
]

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/api/v1/organizations/{organization}/billing/funding/settled" \
-H "Authorization: Bearer $NIU_ADMIN_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"currency",
"amount_nanos",
"channel",
"payment_reference"
],
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"amount_nanos": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "Positive signed-64-bit nanounit amount"
},
"channel": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"payment_reference": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
}

Recorded or identical receipt replay

Content type: application/json.

JSON
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"recorded": {
"type": "boolean",
"const": true
}
}
}
}
}

Invalid funding details

Authentication required

Installation write access required

Unknown organization or conflicting payment reference

Installation write access only. Trusted administration must verify external payment settlement before calling. This is not a customer self-credit endpoint or a payment-channel callback integration. The channel/payment reference credits funds once; changed organization, currency or amount is a conflict. Pending payments must not be submitted. No commercial payment channel is implied by this administrative record API.