I am using Website Payments Standard and have numerous zip codes I’d like to apply for tax rates (more than I can manually input one at a time into Paypal’s standard tax rules). Is there a way for the checkout solution to connect to my database (a mysql database) where I have the zip codes + tax rates? Is it possible for all this to happen in the shopping cart experience?
Share
Yes, you can use the PayPal Instant Update API.
In a nutshell; you’ll need to set up a script on your server which accepts a POST with shipping address data from PayPal, and requires you to return an appropriate response as output including the tax/shipping amount. This will then be used during checkout as the shipping/tax amount.
Have a look at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables#id09CA80W0Z5Z and https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_CallbackAPI
For Website Payments Standard, base a button off of the following form code:
Whenever a buyer checks out, you will receive a POST with data on https://link-to-your-callback-script.php
The following is an example POST payload which you may receive:
CallbackRequest:
After which you must calculate the appropriate tax / shipping amounts, and return a proper CallBackResponse message.
For example;
CallBackResponse:
Once PayPal has received this information, it will update the shipping/tax charges automatically.
For more information, see https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECInstantUpdateAPI