Skip to main content

Integrating with PayPal

Integrating Tapfiliate with PayPal.

Written by Sonya

Our PayPal integration is intended for custom-built websites that work with PayPal as a sole payment provider. In case you install a WordPress website with the PayPal checkout, please follow our WordPress integration guide instead.

How to install:

  1. Add the following code on every page of your website just after the <body> opening tag:

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>

    <script type="text/javascript">

    (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){

    (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

    function tapGetQueryParams(){var r={},t=function(r){return decodeURIComponent(r.replace(/\+/g," "))},n=location.search.substring(1).split("&");for(var e in n){var a=n[e].toString().split("=");a.length>1&&(r[t(a[0])]=t(a[1]))}return r}

    var params = tapGetQueryParams();

    tap('create', 'YOUR ACCOUNT ID', { integration: "paypal" });

    if (params.st == 'Completed') {

    var amt = params.amt || 1;

    var tx = params.tx || null;

    tap('conversion', tx, amt);

    } else {

    tap('detect');

    }

    </script>

    Don't forget to replace 'YOUR ACCOUNT ID' with your actual account ID that can be found in your Tapfiliate account Profile settings.

  2. After that, you'll have to configure PayPal settings:

    1. Log into your PayPal account
      ​

    2. On the upper-right, click on Settings> Account settings
      ​

    3. Select Website Payments on the left sidebar
      ​

    4. Click Update in the Website Preferences field
      ​

    5. Toggle the Auto-return option on and specify the Return URL
      ​

    6. Switch on the Payment data transfer option

You can also check out our PayPal integration guide here.

Did this answer your question?