5
votes

I am setting up a payment integration with PayPal Checkout Buttons and Paypal Orders API V2, which I test in the sandbox environment (no fancy shop system in use).

When an order is paid and status is completed, the Paypal Orders API V2 returns a valid response, but I do not completely receive the payer address from my sandbox buyer account.

Payer looks like this:

 "payer": {
        "name": {
            "given_name": "<given_name>",
            "surname": "<surname>"
        },
        "email_address": "<email>",
        "payer_id": "HEU6X43KU231",
        "address": {
            "country_code": "DE"
        }
    }

but the payer definition says that the payer should also contain:

  • address_line_1,
  • address_line_2,
  • admin_area_1,
  • postal code

I would like to use this information to send an invoice to the customer after payment is completed.

First, I thought, the address information is not available in my sandbox buyer account, because you do not find this information in the paypal dashboard (in the details of the respective sandbox account), but the address information is available at https://www.sandbox.paypal.com/businessprofile/settings/address

The whole thing would work with a shipping address, but this look like conceptual mismatch. My order item has the "category": 'DIGITAL_GOODS' and I've set the "shipping_preference": 'NO_SHIPPING', because I sell a digital product, which is automatically delivered after the payment process.

As a workaround I could also ask for the address information in the dialog in our part of the order process (in our GUI, before checkout), and prefill the paypal payment dialog with the userdata entered in our GUI, but in terms of user experience I would prefer to use the paypal data.

Does someone have a clue how to receive the payer address data?

Thanks a lot in advance

1
I cross checked this on production with a real customer, but in contrast to the API documentation it seem like Paypal does not support the payer address information - Stefan

1 Answers

6
votes

I will get the documentation clarified.

But to just answer your question, by default the address of the payer is not shared, just the country_code - to get the complete payer.address you will need to call your account manager or merchant support and they can enable it for your account if you meet their criteria.