[Sandbox] Help me to enable getting billing address of payment method.

hieudien
Contributor
Contributor

[Closed] Thanks.

Hi @MTS_Justin ,

 

I'm in development and want to get billing address base on each payment methods. Please help me to enable it on Sandbox.
PayPal Merchant ID: <removed> 

And if there is any document about how to get billing address correctly way? Please help.

I have tried to use query param: fileds=payment_source

But it not work
Here is my request:
OrdersGetRequest {
    path: '/v2/checkout/orders/orderID?fields=payment_source',
    verb: 'GET',
    body: null,
    headers: { 'Content-Type': 'application/json' }
}

 

Login to Me Too
7 REPLIES 7

MTS_Justin
Moderator
Moderator
Hello,

Please review the thread pinned to the top of this forum titled "how to report a sandbox issue" and share the merchant id / payer id from the sandbox account in question and I can enable the return of the buyer's billing address.

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

hieudien
Contributor
Contributor

Hi Justin,

 

My billing address is enable now, thanks.

But problem is the response from PayPal still not has billing address.

Please help me a document how to get billing address of an order ?

Login to Me Too

hieudien
Contributor
Contributor

Hi Justin,

 

My sandbox billing address has been enable, thanks

But the problem is response from PayPal still not have billing address info.

Please help me any document about how to get billing address.

I',m using this API api/orders/v2/#orders 

I have try Prefer:return=representation but not work

Do I have send any special data in request body/header to get billing address in response?

An when should I get billing address, when create/show detail/ authorize or capture ?

Thank a lot.

Login to Me Too

MTS_Justin
Moderator
Moderator
Hello,

V2 Orders
The billing address is returned as part of the payer object, and on the GET /checkout/orders/<Order ID> call:

Example :

"address": {
"address_line_1": "CCREJECT-REFUSED",
"address_line_2": "1 Whittaker Avenue",
"admin_area_2": "Richmond",
"postal_code": "TW9 1EH",
"country_code": "GB"
}

V1 Payments
The billing address will be returned on the GET /payment/<Pay Key> call within the payer object:

Example :

"billing_address": {
"line1": "CCREJECT-REFUSED",
"line2": "1 Whittaker Avenue",
"city": "Richmond",
"state": "",
"postal_code": "TW9 1EH",
"country_code": "GB"
}

N.B. the GET call must be made before the execute, as calling GET after execute, will no longer return the Billing Address!

Of course, the account has to correctly enabled to allow the return of the buyer's billing address beforehand.

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

hieudien
Contributor
Contributor

Hi @MTS_Justin 

Thanks for your response.

I'm using API v2, and always get this address for payer.

There is country_code only.

{
     "address": {
         "country_code": "US"
      }
}

Do I need to send any special data in body request/header ?

I have some address for sandbox account as images bellow, but none of these address exist in API response

Any suggestion?

Screen Shot 2021-06-18 at 4.42.02 PM.png

 

Screen Shot 2021-06-18 at 4.43.27 PM.png

Login to Me Too

MTS_Justin
Moderator
Moderator
Hello,

Please submit a support ticket to our team, providing the order id which you're querying and a copy of the API response you receive back and we can review in more detail.

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

hieudien
Contributor
Contributor

Will create a support ticket.

Thanks for your help.

 

Login to Me Too

Haven't Found your Answer?

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