logo
Use this method to report the outcome of a payment your API authorized after receiving a paymentAuthorizationRequest.

Field
Type
Required
Description
method
String
Yes
"submitPaymentResult"
status
String
Yes
Outcome of the charge. One of Processing, Success, Rejected.
order_id
String
Yes
The order_id received in the authorization request.
account_id
Number
Yes
The account_id received in the authorization request.
app_id
String
Yes
Unique identifier for the App. Determines which payment server the result is routed to.
currency
String
Yes
Currency of the charge.
debit_amount_cents
Number
Yes
Amount charged, in minor units.

Fields accepted by the SDKs but not used by the server

The SDK helper takes a few extra arguments that the server does not read on this method. They are harmless to send, but do not rely on them being stored or echoed:
Field
Note
secret
Not read by the server on this method.
providerResponse
Not read by the server on this method.
total_amount
Not read by the server; debit_amount_cents carries the amount.
chat_id
Not read by the server on this method.

Preconditions for API Functionality

The following tables outline the preconditions that must be met for the API to function correctly. Failure to meet these conditions may result in errors or unexpected behavior.
Action
Requirement
Description
Submit a payment result
A prior authorization request
Send this only in response to a paymentAuthorizationRequest, echoing its order_id and account_id.
Submit a payment result
Valid app_id
app_id must resolve to an existing app so the result can be routed to the correct payment server.

Response

⚠️ This method does not return an acknowledgement. The result is forwarded to the payment server; there is no _ack and the SDKs expose no callback for it.

SDK Mapping β€” submitPaymentResult

SDK
Request Method
Response Callback
Java
api.submitPaymentResult(chatId, accountId, orderId, providerResponse, secret, currency, totalAmount, appId, Status.Success, debitAmountCents);
β€” none
JavaScript
api.submitPaymentResult(chatId, userId, orderId, providerResponse, secret, currency, totalAmount, appId, "Success", debitAmountCents);
β€” none
Python
napi.submit_payment_result(chat_id, user_id, order_id, provider_response, secret, currency, total_amount, app_id, "Success", debit_amount_cents)
β€” none

Example

Request

json
{ "method": "submitPaymentResult", "status": "Success", "order_id": "5121960361126208", "account_id": 90090684293000559, "app_id": "90090684293000559", "currency": "USD", "debit_amount_cents": 2550 }
java
api.submitPaymentResult( null, // chat_id (not used by the server) 90090684293000559L, // account_id "5121960361126208", // order_id null, // providerResponse (not used by the server) "a7Kd2P", // secret "USD", // currency 25.5, // total_amount (not used by the server) "90090684293000559", // app_id NandboxClient.Status.Success, 2550L); // debit_amount_cents
javascript
api.submitPaymentResult( null, 90090684293000559, "5121960361126208", null, "a7Kd2P", "USD", 25.5, "90090684293000559", "Success", 2550);
python
napi.submit_payment_result( None, 90090684293000559, "5121960361126208", None, "a7Kd2P", "USD", 25.5, "90090684293000559", "Success", 2550)