This guide explains how to integrate PayPal one-time purchase and subscription buttons into LeadDyno. The integration between PayPal and LeadDyno allows automated tracking of lead conversion, cancellation, and affiliate compensation for purchases made via PayPal buttons.
The setup process involves two main steps. 1) Setting up your buttons on PayPal. 2) Enabling the PayPal Integration in your LeadDyno tracking code.
In this article
Paypal Buttons
PayPal buttons are elements you put on your website that allow consumers to purchase your products or services. To create the buttons, from the PayPal interface, put your mouse over Pay & Get Paid and select PayPal Buttons from the dropdown list.
From here, you will see the PayPal button options. LeadDyno currently supports the Subscription Button and Buy Now (one-time purchase) buttons.
Subscribe Button
Subscription buttons allow your customers to subscribe to a recurring service and they are automatically charged based on the Billing Cycle you choose. To get started click Subscribe.
In the example below, the button would charge the customer $50 every month forever until they log in and cancel their subscription.
Choose button type: Subscriptions.
Item type: Name of the service/subscription.
Subscription ID: Put the LeadDyno commission plan code. (i.e. default). This code MUST match your LeadDyno commission plan code.
Billing amount each cycle: How much you want to charge each month.
Billing cycle: How often to bill your customers.
The Reward Structure name (in this case default) must match the Subscription ID defined for the PayPal button. If you do not supply a Subscription ID in the button, it will use the default Reward Structure name defined in LeadDyno. Below is an example of a LeadDyno reward structure.
In the example above, affiliates would be compensated $10 starting after the first month for any customers they bring to the site that sign up for the $50/month Default Plan forever until the customer cancels their subscription.
After setting all the button parameters needed for your service, click Create Button. You will be presented with the HTML to place on your website.
One-Time Purchase Button
From a LeadDyno integration perspective, one-time buttons are very similar to subscription buttons. One-time payment buttons are used if you want to sell individual items or a service that does not automatically renew on a specific interval.
Click the Buy Now button to create a button.
Supply an Item name for the button that represents the item being purchased and an Item ID that matches a LeadDyno commission plan code. In the image below, this button would be used to purchase an item named My Widget and associated with the LeadDyno commission plan widget that would give the referring affiliate either a fixed amount or some percentage of the sale.
Enable PayPal Integration with LeadDyno
The PayPal integration with LeadDyno is done via the JavaScript API. To enable PayPal integration with LeadDyno, call the function in addition to the standard LeadDyno visit tracking code.
LeadDyno.initPaypal();
A typical complete installation of LeadDyno with PayPal integration enabled would be to have the following in the header section on every page of your site. You can see the small bit of code that is added that calls the PayPal function:
<script type="text/javascript" src="https://static.leaddyno.com/js"></script>
<script>
LeadDyno.key = "YOUR_PUBLIC_KEY";
LeadDyno.recordVisit();
LeadDyno.initPaypal();
</script>
Replace YOUR_PUBLIC_KEY with your public API key found in the Account - Profile section.
Conclusion
LeadDyno is able to seamlessly integrate with both one-time and subscription PayPal buttons with no changes to the HTML of the button. The only coordination between the button and LeadDyno is the Item ID (for one-time buttons) or the Subscription ID (for subscription buttons) in the PayPal button editor which needs to match a LeadDyno compensation plan. If the default LeadDyno compensation plan is the desired plan to be used with the transaction, then even this coordination is not required.
A single line of Javascript, enabling the PayPal integration, is enough for LeadDyno to be in the loop on PayPal transactions to track conversions, cancellations, and affiliate compensation.
Limitations / Known Issues
- Affiliate coupon codes are not supported with PayPal Buttons.