After a user signs up for an Android subscription, what's the best way to get a buyer's email address?
After making a purchase, I get from Google Play: order_id, package_name, product_id, purchase_time, purchase_state, purchase_token.
We used the notification history API [1] to get the customer’s email address from Google Checkout, which was previously indicated on the customer’s billing address. For some reason, however, the billing address in our XML responses no longer contains the node email address:
<notification-history-response xmlns="http://checkout.google.com/schema/2" serial-number="X"> <notifications> <new-order-notification serial-number="X"> <buyer-billing-address> <structured-name> <first-name>John</first-name> <last-name>Doe</last-name> </structured-name> <address1></address1> <contact-name>John Doe</contact-name> <company-name></company-name> <postal-code>XXXXXXXX</postal-code> <country-code>US</country-code> <city></city> <region></region> </buyer-billing-address> <order-summary> ...
This used to work, and the letter was sent to the billing address, I’m not sure why it wasn’t indicated in the answer anymore.
Also, an email is available if I search for order_id directly through the web interface, but we obviously need to do this using the API.
[1] https://developers.google.com/checkout/developer/Google_Checkout_XML_API_Notification_History_API#Sample_Response_XML
source share