Customising your PayPal integration

Here we will show you how to customise the information that Paypal sends to Quaderno so that you can invoice correctly and be VAT & GST compliant. In order to be EU VAT compliant with Quaderno and PayPal, it's necessary to serialise the customer's VAT number and IP address in the custom variable of your payment form. 

If you want to display a client's full billing details on the invoice, you just have to include this information on your Paypal payment forms.

To make sure you have enough location evidence to be VAT compliant, we recommend that you include at least the country and IP address on the form. You can also add the VAT number if your client is a business in the EU.

In this example, we'll show you how you can customise your Paypal payment form to include the client's billing details, VAT number (if applicable), and IP address:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="you@yourdomain.com">
  <input type="hidden" name="item_name" value="New Router">
  <input type="hidden" name="amount" value="100.00">
  <input type="hidden" name="first_name" value="Maurice">
  <input type="hidden" name="last_name" value="Moss">
  <input type="hidden" name="address1" value="123 Carenden Road">
  <input type="hidden" name="city" value="London">
  <input type="hidden" name="zip" value="EC5M 8AJ">
  <input type="hidden" name="country" value="GB">
  <input type="hidden" name="email" value="moss@reynholm.co.uk">
  <input type="hidden" name="custom" value="<?php echo json_encode(array("vat_number" => "GB123456789", "ip_address" => $_SERVER['REMOTE_ADDR'])) ?>"/>
  <input type="hidden" name="return" value="http://yourdomain.com/thank-you.html">
  <input type="hidden" name="notify_url" value="https://xxxx.quadernoapp.com/paypal/notifications">
  <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif">
</form>

Combining the IP address and the customer's billing info will give us enough information to decide whether or not a customer is where they say they are, and protect you from VATMOSS problems.

Quaderno can make sense of the following fields in the custom variable:

Custom    Description 
vat_number VAT number of the customer
ip_address IP address of the customer 
type Type of transaction: eserviceebook or standard. The default is the type of transaction you've select on Quaderno > Preferences.