Skip to content
Reference contents

Operations

An operation is a unit of work with the client's money: create it, read its state, list the active ones and submit a decision on it.

List active operationsGET/api/v1/operations

listActiveOperationsToken required

Returns the caller's operations that have not reached a final status (COMPLETED, PARTIALLY_COMPLETED, FAILED, CANCELLED) with their current phase, the action expected from the client and open timeout events. Pages are cursor-based: pass nextCursor from the previous page as cursor.

Query parameters

FieldTypeDescription
cursorstring
limitinteger (int32)
  • default 20

Responses

200OKListActiveOperationsResponse

FieldTypeDescription
itemsrequiredarray (object ActiveOperationSummaryResponse)
operationIdrequiredstring
clientOperationIdrequiredstring
statusrequiredstring
  • Allowed values: CREATED IN_PROGRESS COMPLETED PARTIALLY_COMPLETED FAILED CANCELLED
phaserequiredstring

Client-facing operational phase (ADR-0052). Distinct from status (lifecycle) and from internal log phase (logging-only).

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
requiredActionrequiredstring
  • Allowed values: NONE PERFORM_PAYMENTS SUBMIT_DECISION
requiredActionSincestring (date and time, ISO 8601)
requiredActionPayloadobject OperationRequiredActionPayloadResponse

Payload for required action

expectedDecisionVersioninteger (int32)
allowedDecisionKindsarray (string)
  • Allowed values: finalize_as_is adjust compensate_and_finalize
paymentsrequiredarray (object OperationRequiredActionPaymentResponse)
paymentIdrequiredstring
methodrequiredmap (string)
amountrequiredobject MoneyAmountResponse

Money amount representation

currencyrequiredstring
valuerequiredstring
linksrequiredmap (string)
clientTransactionIdstring
statusstring
interactionobject PaymentInteractionResponse

Payment interaction artifact (payer-facing link)

typerequiredstring
urlrequiredstring
expiresAtstring (date and time, ISO 8601)
createdAtrequiredstring (date and time, ISO 8601)
updatedAtrequiredstring (date and time, ISO 8601)
deadlineAtstring (date and time, ISO 8601)
activeTimeoutEventsarray (object ActiveTimeoutEventResponse)
eventTyperequiredstring

Тип события: EXECUTION_STUCK / AWAITING_PAYMENT_TOO_LONG / AWAITING_DECISION_TOO_LONG / TERMINAL_TIMEOUT (ADR-0097)

  • Allowed values: EXECUTION_STUCK AWAITING_PAYMENT_TOO_LONG AWAITING_DECISION_TOO_LONG TERMINAL_TIMEOUT
phasestring

Фаза операции на момент detection. null для terminal timeout.

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
actionTyperequiredstring

Configured action для этого timeout-policy слота

  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
resultstring

Результат обработки. null — action ещё не применён.

  • Allowed values: NOTIFIED FINALIZED COMPENSATION_STARTED SKIPPED_ALREADY_HANDLED SKIPPED_NO_LONGER_APPLIES FAILED_TO_HANDLE
detectedAtrequiredstring (date and time, ISO 8601)

Когда событие было обнаружено

handledAtstring (date and time, ISO 8601)

Когда action был применён. null — ещё не обработано.

thresholdSecondsinteger (int64)

Threshold, который вызвал событие

deadlineAtstring (date and time, ISO 8601)

Дедлайн операции на момент detection

nextCursorstring

Errors

Error codes are not described in the contract.

Create an operationPOST/api/v1/operations

createOperationToken required

Accepts a business operation — a sequence of money actions (payment, payout, refund) with execution policies — and starts executing it. The request is accepted as a whole and frozen at acceptance: later changes to settings do not affect it. Retrying with the same context.idempotencyKey and identical content returns the same operation; the same key with different content is rejected. The response carries operationId, the current status and phase, and the action expected from the client, if any.

Request bodyrequiredCreateOperationRequest

FieldTypeDescription
settlementAccountIdrequiredstring

Settlement account ID that owns the operation

  • example: 100500
typerequiredstring
  • Allowed values: EXTERNAL_DECISION STANDARD
controlsobject CreateOperationControlsRequest
timeoutPolicyobject CreateTimeoutPolicyRequest
thresholdsobject CreateTimeoutPolicyThresholdsRequest
terminalTimeoutSecondsinteger (int64)
processingStuckAfterSecondsinteger (int64)
awaitingDecisionAfterSecondsinteger (int64)
awaitingPaymentAfterSecondsinteger (int64)
actionsobject CreateTimeoutPolicyActionsRequest
onProcessingStuckobject TimeoutPolicyActionRequest
typerequiredstring
  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
onAwaitingDecisionTooLongobject TimeoutPolicyActionRequest
typerequiredstring
  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
onAwaitingPaymentTooLongobject TimeoutPolicyActionRequest
typerequiredstring
  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
onTerminalTimeoutobject TimeoutPolicyActionRequest
typerequiredstring
  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
closurePolicyobject CreateClosurePolicyRequest
onUnrecoverableExecutionstring
  • Allowed values: KEEP_OPEN_UNTIL_TIMEOUT FINALIZE_AS_IS
compensationPolicyobject CreateCompensationPolicyRequest
refundModestring
  • Allowed values: REFUND_ONLY ALLOW_PAYOUT
webhookPolicyobject CreateWebhookPolicyRequest
onCriticalDeliveryExhaustedstring
moneyrequiredarray (One of)

One of — The variant is selected by the kind field value

MoneyAwaitDecisionIntentRequestkind: await_decision

Await decision intent (business gate, ADR-0100)

kindrequiredstring
  • value await_decision
descriptionstring

MoneyPaymentIntentRequestkind: payment

Payment intent

kindrequiredstring
  • value payment
amountrequiredobject MoneyAmountRequest

Money amount representation

currencyrequiredstring
valuerequiredstring
methodrequiredOne of

One of — The variant is selected by the kind field value

B2bSbpPaymentMethodRequestkind: sbp_b2b

B2B SBP payment method (ADR-0125)

kindrequiredstring
  • value sbp_b2b
paymentPurposerequiredstring
  • at most 140 characters
sourceNamerequiredstring
  • at most 50 characters
takeTaxrequiredboolean
totalTaxAmountinteger (int64)

Сумма налога в копейках; обязательна при takeTax=true.

MirCardPaymentMethodRequestkind: mir_card

MIR card payment method

kindrequiredstring
  • value mir_card
tokenrequiredstring

SbpPaymentMethodRequestkind: sbp_c2b

C2B SBP payment method

kindrequiredstring
  • value sbp_c2b
payerPhonerequiredstring
captureboolean
metadatamap (string)
businessRefobject BusinessRefRequest

Опциональный business/audit label платежа (ADR-0110). Non-authoritative, не является ключом адресации.

kindrequiredstring
idrequiredstring
clientTransactionIdstring

Client-facing идентификатор денежного действия (ADR-0110). Optional: если не передан, SettleOps заполняет его сам. После acceptance всегда присутствует.

MoneyPayoutIntentRequestkind: payout

Payout intent (ADR-0114)

kindrequiredstring
  • value payout
amountrequiredobject MoneyAmountRequest

Money amount representation

currencyrequiredstring
valuerequiredstring
destinationrequiredOne of

One of — The variant is selected by the kind field value

SbpPayoutDestinationRequestkind: sbp

SBP payout destination

kindrequiredstring
  • value sbp
recipientPhonerequiredstring
recipientBankIdrequiredstring

Идентификатор банка получателя в справочнике СБП, ровно 12 цифр

metadatamap (string)
businessRefobject BusinessRefRequest

Опциональный business/audit label выплаты (ADR-0110). Non-authoritative, не является ключом адресации.

kindrequiredstring
idrequiredstring
clientTransactionIdstring

Client-facing идентификатор денежного действия (ADR-0110). Optional: если не передан, SettleOps заполняет его сам. После acceptance всегда присутствует.

contextrequiredobject CreateOperationContextRequest

Operation context

idempotencyKeyrequiredstring
clientOperationIdrequiredstring
sourcerequiredstring
businessRefobject BusinessRefRequest

Опциональный business/audit label всей операции (ADR-0110). Не является machine-key и не влияет на исполнение.

kindrequiredstring
idrequiredstring

Responses

201CreatedCreateOperationResponse

FieldTypeDescription
operationIdrequiredstring
typerequiredstring
  • Allowed values: EXTERNAL_DECISION STANDARD
statusrequiredstring
  • Allowed values: CREATED IN_PROGRESS COMPLETED PARTIALLY_COMPLETED FAILED CANCELLED
phaserequiredstring

Client-facing operational phase (ADR-0052). Distinct from status (lifecycle) and from internal log phase (logging-only).

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
messagestring
requiredActionstring
  • Allowed values: NONE PERFORM_PAYMENTS SUBMIT_DECISION
requiredActionSincestring (date and time, ISO 8601)
requiredActionPayloadobject OperationRequiredActionPayloadResponse

Payload for required action

expectedDecisionVersioninteger (int32)
allowedDecisionKindsarray (string)
  • Allowed values: finalize_as_is adjust compensate_and_finalize
paymentsrequiredarray (object OperationRequiredActionPaymentResponse)
paymentIdrequiredstring
methodrequiredmap (string)
amountrequiredobject MoneyAmountResponse

Money amount representation

currencyrequiredstring
valuerequiredstring
linksrequiredmap (string)
clientTransactionIdstring
statusstring
interactionobject PaymentInteractionResponse

Payment interaction artifact (payer-facing link)

typerequiredstring
urlrequiredstring
expiresAtstring (date and time, ISO 8601)
linksrequiredarray (object LinkResponse)
relrequiredstring
hrefrequiredstring
typestring
methodstring

Errors

Error codes are not described in the contract.

Get an operationGET/api/v1/operations/{operationId}

getOperationToken required

Returns the current state of an operation: status, phase, the action expected from the client with its payload (payments to perform or the decision to submit), the money actions with their outcomes, and open timeout events.

Path parameters

FieldTypeDescription
operationIdrequiredstring

Responses

200OKOperationViewResponse

FieldTypeDescription
operationIdrequiredstring
statusrequiredstring
  • Allowed values: CREATED IN_PROGRESS COMPLETED PARTIALLY_COMPLETED FAILED CANCELLED
typerequiredstring
  • Allowed values: EXTERNAL_DECISION STANDARD
phaserequiredstring

Client-facing operational phase (ADR-0052). Distinct from status (lifecycle) and from internal log phase (logging-only).

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
createdAtstring (date and time, ISO 8601)
finalizedAtstring (date and time, ISO 8601)
deadlineAtstring (date and time, ISO 8601)
finalizationReasonstring
  • Allowed values: TERMINAL_TIMEOUT EXECUTION_STUCK AWAITING_PAYMENT_TOO_LONG AWAITING_DECISION_TOO_LONG CLIENT_COMPENSATED_AND_FINALIZED WEBHOOK_DELIVERY_EXHAUSTED
finalizationModestring
  • Allowed values: FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
requiredActionstring
  • Allowed values: NONE PERFORM_PAYMENTS SUBMIT_DECISION
requiredActionSincestring (date and time, ISO 8601)
requiredActionPayloadobject OperationRequiredActionPayloadResponse

Payload for required action

expectedDecisionVersioninteger (int32)
allowedDecisionKindsarray (string)
  • Allowed values: finalize_as_is adjust compensate_and_finalize
paymentsrequiredarray (object OperationRequiredActionPaymentResponse)
paymentIdrequiredstring
methodrequiredmap (string)
amountrequiredobject MoneyAmountResponse

Money amount representation

currencyrequiredstring
valuerequiredstring
linksrequiredmap (string)
clientTransactionIdstring
statusstring
interactionobject PaymentInteractionResponse

Payment interaction artifact (payer-facing link)

typerequiredstring
urlrequiredstring
expiresAtstring (date and time, ISO 8601)
linksarray (object LinkResponse)
relrequiredstring
hrefrequiredstring
typestring
methodstring
activeTimeoutEventsarray (object ActiveTimeoutEventResponse)
eventTyperequiredstring

Тип события: EXECUTION_STUCK / AWAITING_PAYMENT_TOO_LONG / AWAITING_DECISION_TOO_LONG / TERMINAL_TIMEOUT (ADR-0097)

  • Allowed values: EXECUTION_STUCK AWAITING_PAYMENT_TOO_LONG AWAITING_DECISION_TOO_LONG TERMINAL_TIMEOUT
phasestring

Фаза операции на момент detection. null для terminal timeout.

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
actionTyperequiredstring

Configured action для этого timeout-policy слота

  • Allowed values: NOTIFY FINALIZE_AS_IS COMPENSATE_AND_FINALIZE
resultstring

Результат обработки. null — action ещё не применён.

  • Allowed values: NOTIFIED FINALIZED COMPENSATION_STARTED SKIPPED_ALREADY_HANDLED SKIPPED_NO_LONGER_APPLIES FAILED_TO_HANDLE
detectedAtrequiredstring (date and time, ISO 8601)

Когда событие было обнаружено

handledAtstring (date and time, ISO 8601)

Когда action был применён. null — ещё не обработано.

thresholdSecondsinteger (int64)

Threshold, который вызвал событие

deadlineAtstring (date and time, ISO 8601)

Дедлайн операции на момент detection

paymentsarray (object OperationPaymentResponse)
paymentIdrequiredstring
clientTransactionIdrequiredstring
statusrequiredstring
amountrequiredobject MoneyAmountResponse

Money amount representation

currencyrequiredstring
valuerequiredstring
methodrequiredstring
interactionobject PaymentInteractionResponse

Payment interaction artifact (payer-facing link)

typerequiredstring
urlrequiredstring
expiresAtstring (date and time, ISO 8601)
paymentsRevisioninteger (int64)

Errors

Error codes are not described in the contract.

Submit a decision on an operationPOST/api/v1/operations/{operationId}/decisions

submitOperationDecisionToken required

Submits the client's decision for an operation of type EXTERNAL_DECISION that is waiting for it (requiredAction = SUBMIT_DECISION): FINALIZE_AS_IS, ADJUST or COMPENSATE_AND_FINALIZE. decisionVersion must equal expectedDecisionVersion from the required-action payload; a repeated submission with the same version and content is idempotent. Responds with 202: the decision is accepted and executed asynchronously — follow the operation state or webhooks for the outcome. An operation that is not waiting for a decision rejects the request with OPERATION_NOT_WAITING_FOR_DECISION.

Path parameters

FieldTypeDescription
operationIdrequiredstring

Request bodyrequiredSubmitDecisionRequest

FieldTypeDescription
decisionVersionrequiredinteger (int32)
decisionrequiredOne of

One of — The variant is selected by the kind field value

AdjustDecisionRequestkind: adjust

Денежная корректировка решения (ADR-0111)

kindrequiredstring
  • value adjust
notestring
moneyrequiredarray (One of)

One of — The variant is selected by the kind field value

MoneyDecisionPaymentIntentRequestkind: payment

Payment intent (ADR-0111 ADJUST)

kindrequiredstring
  • value payment
amountrequiredobject MoneyAmountRequest

Money amount representation

currencyrequiredstring
valuerequiredstring
methodrequiredOne of

One of — The variant is selected by the kind field value

B2bSbpPaymentMethodRequestkind: sbp_b2b

B2B SBP payment method (ADR-0125)

kindrequiredstring
  • value sbp_b2b
paymentPurposerequiredstring
  • at most 140 characters
sourceNamerequiredstring
  • at most 50 characters
takeTaxrequiredboolean
totalTaxAmountinteger (int64)

Сумма налога в копейках; обязательна при takeTax=true.

MirCardPaymentMethodRequestkind: mir_card

MIR card payment method

kindrequiredstring
  • value mir_card
tokenrequiredstring

SbpPaymentMethodRequestkind: sbp_c2b

C2B SBP payment method

kindrequiredstring
  • value sbp_c2b
payerPhonerequiredstring
clientTransactionIdstring

Client-facing идентификатор нового платежа (ADR-0110). Optional: если не передан, SettleOps заполняет его сам при построении плана.

businessRefobject BusinessRefRequest

Опциональный business/audit label (ADR-0110). Non-authoritative, не ключ адресации.

kindrequiredstring
idrequiredstring
metadatamap (string)

MoneyDecisionPayoutIntentRequestkind: payout

Payout intent (ADR-0114 ADJUST)

kindrequiredstring
  • value payout
amountrequiredobject MoneyAmountRequest

Money amount representation

currencyrequiredstring
valuerequiredstring
destinationrequiredOne of

One of — The variant is selected by the kind field value

SbpPayoutDestinationRequestkind: sbp

SBP payout destination

kindrequiredstring
  • value sbp
recipientPhonerequiredstring
recipientBankIdrequiredstring

Идентификатор банка получателя в справочнике СБП, ровно 12 цифр

clientTransactionIdstring

Client-facing идентификатор новой выплаты (ADR-0110). Optional: если не передан, SettleOps заполняет его сам при построении плана.

businessRefobject BusinessRefRequest

Опциональный business/audit label (ADR-0110). Non-authoritative, не ключ адресации.

kindrequiredstring
idrequiredstring
metadatamap (string)

MoneyRefundIntentRequestkind: refund

Refund intent (ADR-0111 ADJUST)

kindrequiredstring
  • value refund
amountrequiredobject MoneyAmountRequest

Money amount representation

currencyrequiredstring
valuerequiredstring
sourceClientTransactionIdstring
clientTransactionIdstring
metadatamap (string)

CompensateAndFinalizeDecisionRequestkind: compensate_and_finalize

Компенсировать исполненные денежные действия и финализировать операцию (ADR-0111)

kindrequiredstring
  • value compensate_and_finalize
notestring

FinalizeAsIsDecisionRequestkind: finalize_as_is

Закрыть операцию в текущем финансовом состоянии (ADR-0111)

kindrequiredstring
  • value finalize_as_is
notestring
contextmap (string)

Responses

202AcceptedSubmitDecisionResponse

FieldTypeDescription
operationIdrequiredstring
statusrequiredstring
  • Allowed values: CREATED IN_PROGRESS COMPLETED PARTIALLY_COMPLETED FAILED CANCELLED
phaserequiredstring

Client-facing operational phase (ADR-0052). Distinct from status (lifecycle) and from internal log phase (logging-only).

  • Allowed values: PROCESSING AWAITING_CLIENT_PAYMENTS AWAITING_CLIENT_DECISION FINALIZED
decisionrequiredobject DecisionStatusResponse

Decision status in response

statusrequiredstring
decisionVersionrequiredinteger (int32)
receivedAtstring (date and time, ISO 8601)
linksrequiredarray (object LinkResponse)
relrequiredstring
hrefrequiredstring
typestring
methodstring

Errors

Error codes are not described in the contract.