Retrieving shipping after checkout completion (with Hosted Checkout)

So I am using the PHP API. I create a checkout Object and put setAskForShippingAddress() to true, and it does indeed collect shipping address during the hosted checkout. However, the API Docs do not specify as to how to fetch that back. Your payment.updated webhook does not send back shipping address either. I do however get the payment_id and order_id, but neither the payment or order api contains the shipping address. Help.
Tags (1)
801 Views
Message 1 of 2
Report
1 REPLY 1
Alumni

Hi @Hackinet - when a checkout completes, it redirects to your URL and includes a transactionId. You can use this id to call RetrieveTransaction, which would have a customer_id. The address will be a part of the customer, which can be retrieved using RetrieveCustomer.

 

I hope this helps! If you're still stuck, shoot a message our way so we can connect you with an API team member directly.

Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
726 Views
Message 2 of 2
Report