Retrieve shipping address from Paypal order server-side

Viewed 84

I have implemented Paypal smart buttons on the client side and I am capturing funds on the server side using PaypalCheckoutSdk nuget package.

During the checkout, paypal collects shipping address from the customer. How do I retrieve the shipping address after capturing funds?

This is how I capture funds from Paypal, which gives me an Order object with no shipping address:

        OrdersCaptureRequest request = new OrdersCaptureRequest(orderId);
        request.Prefer("return=representation");
        request.RequestBody(new OrderActionRequest());
        var response = await _client.Execute(request);
        var result = response.Result<Order>();
1 Answers

The order object does return a shipping address.

It will be inside the order object -> purchase_units -> shipping -> address.

Related