> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PaymentProviderServiceImpl

> Вызов публичных методов сервиса через REST API: paymentProviderServiceImpl

<ResponseField name="beanId" type="string">
  Идентификатор Spring bean, который содержит вызываемый сервис.

  paymentProviderServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Область действия bean. Для вызовов сервисов используется PROTOTYPE.
</ResponseField>

<ResponseField name="functionName" type="string">
  Имя публичного метода сервиса, указанное в сигнатуре ниже.
</ResponseField>

<ResponseField name="args" type="object[]">
  Массив аргументов метода. Каждый аргумент передаётся объектом с индексом 0, 1 и т. д.; значение должно соответствовать Java-типу параметра.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: ru
Site-Context: my-site
Authorization: Bearer <token>
```

Заголовки `Lang-Context` и `Site-Context` необходимо передавать в каждом запросе. Для защищённых методов передавайте JWT в заголовке `Authorization` в формате `Bearer <token>`.

**Доступ:** ADMIN. **Bearer Token:** требуется.

* GUEST — без логина; доступен только whitelist.
* USER — требуется авторизация; доступны методы с проверкой USER.
* ADMIN — полный доступ к public-методам всех сервисов.
* Если метод проверяет роль внутри логики, GUEST может получить null.

## Методы

<ResponseField name="isActive" type="boolean">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### isActive

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "isActive",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="createInvoice" type="String">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### createInvoice

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createInvoice",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="cancelPayment" type="String">
  | Аргумент    | Тип      | Описание                      |
  | ----------- | -------- | ----------------------------- |
  | `paymentId` | `String` | Передаётся через `args[0].0`. |

  ### cancelPayment

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "cancelPayment",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="refundPayment" type="String">
  | Аргумент    | Тип      | Описание                      |
  | ----------- | -------- | ----------------------------- |
  | `paymentId` | `String` | Передаётся через `args[0].0`. |

  ### refundPayment

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "refundPayment",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="changePaymentMethod" type="boolean">
  | Аргумент          | Тип      | Описание                      |
  | ----------------- | -------- | ----------------------------- |
  | `paymentId`       | `String` | Передаётся через `args[0].0`. |
  | `paymentMethodId` | `String` | Передаётся через `args[1].1`. |

  ### changePaymentMethod

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "changePaymentMethod",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="get3DSecureLink" type="String">
  | Аргумент    | Тип      | Описание                      |
  | ----------- | -------- | ----------------------------- |
  | `paymentId` | `String` | Передаётся через `args[0].0`. |

  ### get3DSecureLink

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "get3DSecureLink",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="checkConnectAccountStatus" type="String">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### checkConnectAccountStatus

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "checkConnectAccountStatus",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="calculateTotalPrice" type="Map<String,Object>">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### calculateTotalPrice

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculateTotalPrice",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="calculateTaxAmountPrice" type="Map<String,Object>">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### calculateTaxAmountPrice

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculateTaxAmountPrice",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="calculateItemsTotalBruttoAmount" type="Map<String,Object>">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### calculateItemsTotalBruttoAmount

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculateItemsTotalBruttoAmount",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="calculateServiceFeeBruttoAmount" type="Map<String,Object>">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### calculateServiceFeeBruttoAmount

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculateServiceFeeBruttoAmount",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="calculatePayoutAmount" type="Map<String,Object>">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `orderId` | `String` | Передаётся через `args[0].0`. |

  ### calculatePayoutAmount

  ```json theme={null}
  {
    "beanId": "paymentProviderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "calculatePayoutAmount",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
