How to setup and configure WooCommerce for Pencil with Xero Integration?

Please follow the steps below:

  1. Prerequisites

    1. You need an active PencilPay account. If you don’t have one, please go to Onboard Customers, Save Time and Get Paid Faster | PencilPay and register for a 30 day trial. Alternatively contact us via email at support@pencilpay.com and we’ll arrange a 20 minute demo of PencilPay.

    2. You need an active Xero account that is integrated with PencilPay. If you don’t have a Xero account, please go to Try Xero for Free and sign up for a free 30 day account.

    3. An active Wordpress and WooCommerce site that is in production mode as this extension is connected to our production environment. If you would like to test the extension and features on a development environment, please email support@pencilpay.com and we’ll arrange a time to demo Pencil and, if required, provide you with access to a demo environment for testing.

  2. Installation Method

    1. Plugin Installation (upload zip plugin)

      1. In Wordpress, go to Plugins -> click “Add New” -> choose the PencilPay WooCommerce plugin zip file from your computer and click “Install Now”.

      2. Plugin Installation (via FTP or console)

        1. Extract the plugin package and upload to your-wordpress/wp-content/plugin/

  3. Activate the plugin at Admin Dashboard -> Plugins -> Installed Plugins -> WooCommerce PencilPay Payment Gateway

     
  4. PencilPay Configuration

     
    1. The settings in Admin Dashboard -> WooCommerce -> Settings -> Payments

    2. Enable the method

    3. Click on Manage button to update the settings by following the instructions

    4. In a separate tab, login to PencilPay -> Integrations -> WooCommerce -> so you can get PencilPay API details

    5. Update Customer import endpoint
      https://your-wordpress-website/wp-json/wc/pencilpay/v1/customer/import

    6. Copy these from Pencil to enter into your WooCommerce settings:

      1. API Endpoint Url for production mode: https://api.pencilpay.com/api/v1

      2. PencilPay API ID

      3. PencilPay API Key

         
         
    7. In “Wordpress WooCommerce Payment Methods Available” click in here and select if you want your customers to checkout using their available trade credit limit and/or credit card.

    8. If you don’t want your B2B customers to be pushed to WooCommerce when you approve their credit application in Pencil, toggle “Push Customers to WooCommerce” off, otherwise toggle on.

    9. Enable Credit Card Pre-Authorisation: enable this if you want to pre-authorise payments.
    10. Instant Payment Notifications Url: enter https://your-wordpress-website/wp-json/wc/pencilpay/v1/purchase-order/payment-status
    11. Click on the Save button in your Pencil account.

    12. In the top right corner toggle WooCommerce ON.

       
  5. Next go back to the WooCommer tab and paste the settings from: API Endpoint Url for production mode, PencilPay API ID and the PencilPay API Key in their related fields.

    1. Xero Contact -> check the “Enable” box.

    2. PencilPay Payment Confirmation page -> set as “PencilPay Payment Gateway”

    3. PencilPay Order Payment Complete -> set as “PencilPay Order Payment Complete”

    4. PencilPay Order Payment Cancel -> if an order is cancelled on the payment page, we will redirect back to this page. We suggest selecting “Cart”.

    5. Click on “Save Changes”