I have added an extension attribute via


<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Customer\Api\Data\AddressInterface">
        <attribute code="neighborhood" type="string"/>
        <attribute code="reference" type="string"/>
    <extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
        <attribute code="neighborhood" type="string"/>
        <attribute code="reference" type="string"/>

It shows up when using other payment methods such as OpenPay, I can even see it when making a mock order (extension attribute is at the bottom):

Request Payload

Does anyone know if the process to read that attribute is any different when using PayPal as a payment method?

  • Hi, I am also facing similar situation.. How did you fix this issue ? – aravind Jul 14 '20 at 14:37
  • Could you share the solution it will be helpful for me' – aravind Jul 14 '20 at 14:37
  • @aravind I couldn't find a solution using PayPal directly, so what I did was create another table in the database and 'bridge' the custom attributes with it. 1. Write the custom attribute in a new table when generating the order. 2. Retrieve it from there when necessary. Sorry I can't be clearer now, the actual code is at the office and I've been working from home. – Franco Giordani Jul 16 '20 at 21:30
  • Sure thanks for your help @Franco – aravind Jul 20 '20 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.