• BasicPro

    (@estudio-de-grabacion)


    Hi,

    I’m developing an Android App and would like to include the EU VAT “Proof” of location in the order, the same way it’s done when purchasing form the website.

    How can this be done? I’m aware I might have to create a new custom API endpoint, that is not a problem. Maybe you can give me a hint on how to proceed on how to update the order with the EU vat info.

    Thank you

    https://www.ads-software.com/plugins/woocommerce-eu-vat-assistant/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Diego

    (@daigo75)

    The EU VAT Assistant doesn’t currently support the REST API. It works by identifying the customer by using its session information, which is not available if you send the data via the API (when you do that, it’s your App that sends the data, not the customer). In such case, the identification and proof of locations would have to be collected by the Android App itself.

    If you would like to see how the data is saved for each order, it’s done in WC_Aelia_EU_VAT_Assistant::save_eu_vat_data(). Please note that the method is protected on purpose, as the EU VAT Assistant was not designed to have its functions called by an external source. This was done deliberately, to prevent tampering.

    I will add a feature request to expose some of the plugin’s feature to the REST API in a future version, it may come useful to other developers.

    Thread Starter BasicPro

    (@estudio-de-grabacion)

    Hi Diego,

    Thank you for your reply, we use cookies in the app and the user is logged in all the time, so it is actually not very different from how a browser works, I mean that is the customer who sends the data from the app with his ip and cookie information (although the app of course is who communicates, as well as the browser would), if I use a webview in the app it will work but the experience of checkout won’t be that good.

    The ip of the user is actually stored in the order correctly by the way. I will check the class you mentioned and see if I can work it out.

    Thanks!

    Thread Starter BasicPro

    (@estudio-de-grabacion)

    Hi Again,

    I’m guessing this plugin won’t be compatible with WooCommerce PayPal Express extension, correct?

    Regards

    Plugin Author Diego

    (@daigo75)

    That depends. If the PayPal Express works by completing the checkout outside the ecommerce website, then it’s up to PayPal to collect and validate all the relevant data. On the other hand, if the customer reaches the checkout, fills the data, and goes to PayPal to pay, then everything should work fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘EU VAT information when creating orders with WooCommerce REST API’ is closed to new replies.