POST api/yookassa/PaymentCommit

Создание платежа/возврата в онлайн-кассе через Ю-кассу

Request Information

URI Parameters

None.

Body Parameters

PaymentCommitRequest
NameDescriptionTypeAdditional information
Refund

Признак, что совершается возврат ранее созданного, оплаченного платежа

boolean

None.

Amount

Сумма платежа/возврата

decimal number

None.

Description

Описание создаваемого платежа (заказа)

string

None.

PaymentRefund

Идентификатор платежа, по которому собираемся сделать возврат

string

None.

ApiParams

Параметры вызова внутреннего Api

YooKassaApiParams

None.

Request Formats

application/json, text/json

Sample:
{
  "Refund": true,
  "Amount": 2.0,
  "Description": "sample string 3",
  "PaymentRefund": "sample string 4",
  "ApiParams": {
    "Url": "sample string 1",
    "Login": "sample string 2",
    "Password": "sample string 3",
    "IdempotenceKey": "sample string 4"
  }
}

application/xml, text/xml

Sample:
<PaymentCommitRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.YooKassaRequest">
  <Amount>2</Amount>
  <ApiParams>
    <IdempotenceKey>sample string 4</IdempotenceKey>
    <Login>sample string 2</Login>
    <Password>sample string 3</Password>
    <Url>sample string 1</Url>
  </ApiParams>
  <Description>sample string 3</Description>
  <PaymentRefund>sample string 4</PaymentRefund>
  <Refund>true</Refund>
</PaymentCommitRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

PaymentCommitResponse
NameDescriptionTypeAdditional information
PaymentId

Идентификатор созданного платежа

string

None.

RefundId

Идентификатор созданного возврата

string

None.

Status

Статус платежа или возврата после его создания

string

None.

ConfirmationToken

Токен для инициализации виджета оплаты Ю-кассы

string

None.

IdempotenceKey

Ключ идемпотентности

string

None.

ErrorCode

Код ошибки

integer

None.

Message

Сообщение об ошибке

string

None.

Response Formats

application/json, text/json

Sample:
{
  "PaymentId": "sample string 1",
  "RefundId": "sample string 2",
  "Status": "sample string 3",
  "ConfirmationToken": "sample string 4",
  "IdempotenceKey": "sample string 5",
  "ErrorCode": 6,
  "Message": "sample string 7"
}

application/xml, text/xml

Sample:
<PaymentCommitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.YooKassaResponse">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">6</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 7</Message>
  <ConfirmationToken>sample string 4</ConfirmationToken>
  <IdempotenceKey>sample string 5</IdempotenceKey>
  <PaymentId>sample string 1</PaymentId>
  <RefundId>sample string 2</RefundId>
  <Status>sample string 3</Status>
</PaymentCommitResponse>