# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreatePaymentRequestBuilder ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс билдера объектов запросов к API на создание платежа --- ### Examples 02-builder.php 11 78 Пример использования билдера ```php ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$amount](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#property_amount) | | Сумма | | protected | [$currentObject](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#property_currentObject) | | Собираемый объект запроса | | protected | [$deal](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#property_deal) | | Объект с информацией о сделке, в составе которой проходит платеж. | | protected | [$fraud_data](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#property_fraud_data) | | Объект с информацией о сделке, в составе которой проходит платеж. | | protected | [$receipt](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#property_receipt) | | Объект с информацией о чеке | | protected | [$transfers](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#property_transfers) | | Массив платежей в пользу разных мерчантов | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать | | public | [addReceiptItem()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_addReceiptItem) | | Добавляет в чек товар | | public | [addReceiptShipping()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_addReceiptShipping) | | Добавляет в чек доставку товара | | public | [build()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa | | public | [setAccountId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setAccountId) | | Устанавливает идентификатор магазина получателя платежа | | public | [setAirline()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setAirline) | | Устанавливает информацию об авиабилетах | | public | [setAmount()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setAmount) | | Устанавливает сумму | | public | [setCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setCapture) | | Устанавливает флаг автоматического принятия поступившей оплаты | | public | [setClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setClientIp) | | Устанавливает IP адрес покупателя | | public | [setConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа | | public | [setCurrency()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setDeal) | | Устанавливает сделку | | public | [setDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setFraudData) | | Устанавливает сделку | | public | [setGatewayId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setGatewayId) | | Устанавливает идентификатор шлюза | | public | [setMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе | | public | [setMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива | | public | [setPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentMethodData) | | Устанавливает объект с информацией для создания метода оплаты | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentMethodId) | | Устанавливает идентификатор записи о сохранённых данных покупателя | | public | [setPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentToken) | | Устанавливает одноразовый токен для проведения оплаты | | public | [setReceipt()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setReceipt) | | Устанавливает чек | | public | [setReceiptAdditionalUserProps()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setReceiptAdditionalUserProps) | | Устанавливает отраслевой реквизит чека | | public | [setReceiptEmail()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setReceiptEmail) | | Устанавливает адрес электронной почты получателя чека | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека | | public | [setReceiptItems()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setReceiptItems) | | Устанавлвиает список товаров для создания чека | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setReceiptOperationalDetails) | | Устанавливает отраслевой реквизит чека | | public | [setReceiptPhone()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setReceiptPhone) | | Устанавливает телефон получателя чека | | public | [setRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setRecipient) | | Устанавливает получателя платежа из объекта или ассоциативного массива | | public | [setSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setSavePaymentMethod) | | Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. | | public | [setTaxSystemCode()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setTransfers()](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md#method_setTransfers) | | Устанавливает трансферы | | protected | [getConfirmationFactory()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_getConfirmationFactory) | | Возвращает фабрику для создания методов подтверждения платежей | | protected | [getPaymentDataFactory()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_getPaymentDataFactory) | | Возвращает фабрику методов проведения платежей | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/Payments/CreatePaymentRequestBuilder.php](../../lib/Request/Payments/CreatePaymentRequestBuilder.php) * Package: YooKassa * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) * \YooKassa\Request\Payments\CreatePaymentRequestBuilder --- ## Properties #### protected $amount : \YooKassa\Model\MonetaryAmount --- **Summary** Сумма **Type:** MonetaryAmount **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) #### protected $currentObject : \YooKassa\Request\Payments\CreatePaymentRequest --- **Summary** Собираемый объект запроса **Type:** CreatePaymentRequest **Details:** #### protected $deal : \YooKassa\Model\Deal\PaymentDealInfo --- **Summary** Объект с информацией о сделке, в составе которой проходит платеж. **Type:** PaymentDealInfo **Details:** #### protected $fraud_data : \YooKassa\Model\FraudData --- **Summary** Объект с информацией о сделке, в составе которой проходит платеж. **Type:** FraudData **Details:** #### protected $receipt : \YooKassa\Model\Receipt --- **Summary** Объект с информацией о чеке **Type:** Receipt **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) #### protected $transfers : \YooKassa\Model\TransferInterface[] --- **Summary** Массив платежей в пользу разных мерчантов **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addReceiptItem() : self ```php public addReceiptItem(string $title, string $price, float $quantity, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null, mixed $productCode = null, mixed $countryOfOriginCode = null, mixed $customsDeclarationNumber = null, mixed $excise = null) : self ``` **Summary** Добавляет в чек товар **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Model\Receipt\PaymentSubject::class) * [](\YooKassa\Model\Receipt\PaymentMode::class) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название или описание товара | | string | price | Цена товара в валюте, заданной в заказе | | float | quantity | Количество товара | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | | mixed | productCode | | | mixed | countryOfOriginCode | | | mixed | customsDeclarationNumber | | | mixed | excise | | **Returns:** self - Инстанс билдера запросов #### public addReceiptShipping() : self ```php public addReceiptShipping(string $title, string $price, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null) : self ``` **Summary** Добавляет в чек доставку товара **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Model\Receipt\PaymentSubject::class) * [](\YooKassa\Model\Receipt\PaymentMode::class) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название доставки в чеке | | string | price | Стоимость доставки | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractPaymentRequest|\YooKassa\Common\AbstractRequest ```php public build(array|null $options = null) : \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractPaymentRequest|\YooKassa\Common\AbstractRequest ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | options | Массив параметров для установки в объект запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidRequestException | Выбрасывается если собрать объект запроса не удалось | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractPaymentRequest|\YooKassa\Common\AbstractRequest - Инстанс объекта запроса #### public setAccountId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setAccountId(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор магазина получателя платежа **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор магазина | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если было передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не строковое значение | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setAirline() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setAirline(\YooKassa\Model\AirlineInterface|array $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает информацию об авиабилетах **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AirlineInterface OR array | value | Объект данных длинной записи или ассоциативный массив с данными | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $value) : self ``` **Summary** Устанавливает сумму **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | value | Сумма оплаты | **Returns:** self - Инстанс билдера запросов #### public setCapture() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setCapture(bool $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает флаг автоматического принятия поступившей оплаты **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | Автоматически принять поступившую оплату | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setClientIp() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setClientIp(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает IP адрес покупателя **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | IPv4 или IPv6-адрес покупателя | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setConfirmation() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setConfirmation(\YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributes|string|array|null $value, array|null $options = null) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributes OR string OR array OR null | value | Способ подтверждения платежа | | array OR null | options | Настройки способа подтверждения платежа в виде массива | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является объектом типа AbstractConfirmationAttributes или null | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setDeal() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setDeal(\YooKassa\Model\Deal\PaymentDealInfo|array|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает сделку **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PaymentDealInfo OR array OR null | value | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс билдера запросов #### public setDescription() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setDescription(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Описание транзакции | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение превышает допустимую длину | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setFraudData() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setFraudData(\YooKassa\Model\FraudData|array|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает сделку **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\FraudData OR array OR null | value | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Информация для проверки операции на мошенничество #### public setGatewayId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setGatewayId(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор шлюза **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор шлюза | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если было передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не строковое значение | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setMerchantCustomerId() : mixed ```php public setMerchantCustomerId(string $value) : mixed ``` **Summary** Устанавливает идентификатор покупателя в вашей системе **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент не является строкой | **Returns:** mixed - #### public setMetadata() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setMetadata(\YooKassa\Model\Metadata|array|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает метаданные, привязанные к платежу **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | value | Метаданные платежа, устанавливаемые мерчантом | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданные данные не удалось интерпретировать как метаданные платежа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(array|\Traversable $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданныч в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentMethodData() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentMethodData(\YooKassa\Model\PaymentData\AbstractPaymentData|string|array|null $value, array $options = null) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает объект с информацией для создания метода оплаты **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\PaymentData\AbstractPaymentData OR string OR array OR null | value | Объект создания метода оплаты или null | | array | options | Настройки способа оплаты в виде ассоциативного массива | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если был передан объект невалидного типа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setPaymentMethodId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentMethodId(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор записи о сохранённых данных покупателя **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор записи о сохраненных платежных данных покупателя | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданные значение не является строкой или null | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setPaymentToken() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentToken(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает одноразовый токен для проведения оплаты **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Одноразовый токен для проведения оплаты | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение превышает допустимую длину | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setReceipt() : self ```php public setReceipt(\YooKassa\Model\ReceiptInterface|array $value) : self ``` **Summary** Устанавливает чек **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\ReceiptInterface OR array | value | Инстанс чека или ассоциативный массив с данными чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | **Returns:** self - #### public setReceiptAdditionalUserProps() : self ```php public setReceiptAdditionalUserProps(array|\YooKassa\Model\Receipt\IndustryDetails[] $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptEmail() : self ```php public setReceiptEmail(string $value) : self ``` **Summary** Устанавливает адрес электронной почты получателя чека **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Email получателя чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[] $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptItems() : self ```php public setReceiptItems(array $value) : self ``` **Summary** Устанавлвиает список товаров для создания чека **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | value | Массив товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если хотя бы один из товаров имеет неверную структуру | **Returns:** self - Инстанс билдера запросов #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\IndustryDetails[] $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptPhone() : self ```php public setReceiptPhone(string $value) : self ``` **Summary** Устанавливает телефон получателя чека **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Телефон получателя чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в качестве значения была передана не строка | **Returns:** self - Инстанс билдера запросов #### public setRecipient() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setRecipient(\YooKassa\Model\RecipientInterface|array $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает получателя платежа из объекта или ассоциативного массива **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\RecipientInterface OR array | value | Получатель платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если передан аргумент не валидного типа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - #### public setSavePaymentMethod() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setSavePaymentMethod(bool $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | Сохранить платежные данные для последующего использования | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setTransfers() : self ```php public setTransfers(\YooKassa\Model\TransferInterface[]|array|null $value) : self ``` **Summary** Устанавливает трансферы **Details:** * Inherited From: [\YooKassa\Common\AbstractPaymentRequestBuilder](../classes/YooKassa-Common-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\TransferInterface[] OR array OR null | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### protected getConfirmationFactory() : \YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesFactory ```php protected getConfirmationFactory() : \YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesFactory ``` **Summary** Возвращает фабрику для создания методов подтверждения платежей **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) **Returns:** \YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesFactory - Фабрика объектов методов подтверждения платежей #### protected getPaymentDataFactory() : \YooKassa\Model\PaymentData\PaymentDataFactory ```php protected getPaymentDataFactory() : \YooKassa\Model\PaymentData\PaymentDataFactory ``` **Summary** Возвращает фабрику методов проведения платежей **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) **Returns:** \YooKassa\Model\PaymentData\PaymentDataFactory - Фабрика методов проведения платежей #### protected initCurrentObject() : \YooKassa\Request\Payments\CreatePaymentRequest ```php protected initCurrentObject() : \YooKassa\Request\Payments\CreatePaymentRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) **Returns:** \YooKassa\Request\Payments\CreatePaymentRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 1](../reports/markers.md) * [Deprecated - 25](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-04-06 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoney