etc/extension_attributes.xml
<?xml version="1.0"?>
<!--
/**
* PagBank Payment Magento Module.
*
* Copyright © 2023 PagBank. All rights reserved.
*
* @author Bruno Elisei <brunoelisei@o2ti.com>
* @license See LICENSE for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
<extension_attributes for="Magento\Quote\Api\Data\CartInterface">
<attribute code="pagbank_interest_amount" type="float" />
<attribute code="base_pagbank_interest_amount" type="float" />
</extension_attributes>
<extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
<attribute code="pagbank_interest_amount" type="float" />
<attribute code="base_pagbank_interest_amount" type="float" />
</extension_attributes>
</config>