In the Checkout API, I am currently setting ask_for_shipping_address to true to have the API collect that information for me. I am now planning a change in workflow such that I need the shipping address before I call the API (I’m planning on using the USPS API to get shipping cost information). I’ll still need the address in the e-mail that is sent by the Checkout API, so would I set ask_for_shipping_address to false and then set the pre_populate_shipping_address fields with the address that I have already collected? if not, how would I obtain the customer’s shipping address on my end, once the order has been placed and paid for?
If you are now collecting the shipping address before the API call you can include the address in the order fulfillment shipment_details of the CreateCheckout API call. Then with the Orders API you can get the shipping details associated to the order.
Right now, using the Checkout API and ask_for_shipping_address = true, I receive an e-mail automatically with the customer’s order information, including the shipping address. If I set that property to false and collect it myself, and if it is not sent to me automatically via e-mail (even if I set the shipping address properties):
- What is the point of setting those properties in the first place? I already have them in my web application…
- How do I (the seller) find out that an order has occurred and that it needs to be sent to a particular address?