cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Payer Address with Orders API V2 / Sandbox

Options
tiefstapler
Contributor
Posted on

Hi,

 

I am setting up a payment integration with PayPal Checkout Button and orders API v2, which I test in the sandbox environment.

When an order is completed, the API (/v2/checkout/orders) returns a valid order, but I do  not completely receive the payer address.

Payer address look like this:

 

 

 

 

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

 

 

 

 

but the https://developer.paypal.com/docs/api/orders/v2/#definition-payer 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.

As a workaround I could also ask for the information in the dialog in our part of the order process (in our GUI, before checkout), but as we use paypal plus to enable other payment methods it would be a very bad user experience to enter the same data twice.

 

Maybe it only occurs in the Sandbox environment and not in production? My Sandbox Accounts (which are configured for buying stuff in the sandbox) only do have a country Code and no other address information when I take a look at via my paypal dashboard/sandbox. Maybe that is the reason why the information is empty, but I could not identify where to add the address information in the sandbox account. In my opinion it is essential to be able to test this feature in the  test environment / sandbox.

 

Do you have a clue how to fix this?

 

Thanks a lot in advance

14 REPLIES 14

Missing Payer Address with Orders API V2 / Sandbox

Options
MTS_Justin
Moderator
Hello,

"My Sandbox Accounts (which are configured for buying stuff in the sandbox) only do have a country Code and no other address information"

If your sandbox accounts do not have any address information, you're not going to receive any additional information back when you query a transaction.

Add an address to the sandbox account which is making the payments (buyer account) and then re-attempt the same query action as before.

For adding a street address to your account, go to this direct URL to add an address - https://www.sandbox.paypal.com/businessprofile/settings/address

Thanks !


Was my post helpful? If so, please give me a kudos!

Missing Payer Address with Orders API V2 / Sandbox

Options
tiefstapler
Contributor

Hi Justin,

 

thanks for your explanation and your link.

In opposite to https://developer.paypal.com/developer/accounts/ and the respective details, when following your link, I can see that a standard address and invoice address is set.

Nevertheless, after a payment, the orders API do not send this information. I can only see 

'address': {'country_code': 'DE'},
  'email_address': '<email>',
  'name': {'given_name': '<name1>', 'surname': '<name2>'},
  'payer_id': '<ID>'},

Is there something I have overlooked or are there other requirements that need to be met in order to receive the complete address information?

 

Missing Payer Address with Orders API V2 / Sandbox

Options
tiefstapler
Contributor

@MTS_Justin :Any update on this?

Thanks in advance

Missing Payer Address with Orders API V2 / Sandbox

Options
pkelly1
Contributor

@MTS_Justin @tiefstapler 

 

I'm seeing the exact same issue, did you guys manage to find a solution?

 

Thanks

Missing Payer Address with Orders API V2 / Sandbox

Options
jriley9000
Contributor

This is still broken you guys come on

Missing Payer Address with Orders API V2 / Sandbox

Options
dforchel
Contributor

Hi,
does anybody has a solution how to fix this problem? I have the same problem. Only the payer's country code is sent. I need the street, postal code etc too.

Missing Payer Address with Orders API V2 / Sandbox

Options
iamdcj
Member

It'd be great if Paypal would respond.

 

I am currently wrestling with the V2 API, and the reported issue is just one of the many gripes I have when creating advanced credit/debt card payments. I want to add customer information and general details to the transaction to make it easier for payouts and tracking, however the API doesn't allow you to attach metadata(minus the miserly `description` field) as per Stripe, meaning I now have to store an object in a separate DB in order to capture all the necessary details. 

 

If you can't add the address to a transaction then remove it from the API documentation, or provide better examples in the documentation. It is alway best practice to present all options when providing code snippets, which seems to be the case for `v1` documentation.

 

Thanks

Missing Payer Address with Orders API V2 / Sandbox

Options
Wirone
New Community Member

Yeah, lack of metadata in API v2 is what caused me problems recently. I've implemented some simple flow for passing additional data through Stripe payment and wanted to port it to Paypal but unfortunately it's impossible to add metadata to the order... Why metadata support was removed?

Missing Payer Address with Orders API V2 / Sandbox

Options
pzauner
Contributor

Hello, I have still the same issue. How did you guys fix this?

I also found a thread on Stackoverflow. The guy answered "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."

 

kind regards

 

patrick

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.