Skip to main content
All CollectionsIntegrations
How to integrate Paddle (Classic)
How to integrate Paddle (Classic)

Paddle integration with FirstPromoter

Harvey Gil avatar
Written by Harvey Gil
Updated over a week ago

FirstPromoter allows you to automatically track sales, refunds, upgrades and cancellations from Paddle (Classic).

  1. Set up Paddle's Webhooks and Public Key

    • Navigate to your Profile in the upper-right corner and select Settings;

    • Proceed to the Integrations tab and scroll down to the Integrations with third parties section;

    • Click on Setup under Paddle;

    • In Paddle's dashboard, navigate to Developer tools > Events > click on "+ Add new endpoint" and add the Webhook Endpoint URL from FirstPromoter;

    • Ensure that the following webhook events are enabled in Paddle: payment_succeeded, payment_refunded, subscription_payment_succeeded, subscription_payment_refunded, and subscription_cancelled;

    • Obtain the public key from Paddle by going to Developer tools > Public key;

    • Copy and paste the entire public key from Paddle into the integration form in FirstPromoter. Ensure no modifications are made to the key
      ​
      ​Note: PLEASE DO NOT REMOVE ANYTHING from the public key, just copy paste it entirely as it shows on Paddle, including -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----, otherwise you'll get a 500 error.
      ​

  2. Link FirstPromoter Referral with Paddle Customer

  • After confirming the webhook connection, you'll be redirected to Step 3 of the setup wizard.

  • On Step 3, select Custom / Others option > JS.

  • Follow the instructions on Step 4 and add the main script globally, including on the page where you have Paddle.js inserted (if applicable).

  • On Step 5, you'll see instructions on how to pass referral data to FirstPromoter. There are two options:

Option 1) Tracking using Paddle.js

  • Add the following code to Paddle.Setup's eventCallback method:

    if (data.event === 'Checkout.Complete') { window.fpr('referral',{email: data.eventData.user.email,uid: data.eventData.user.id}) }

Option 2) Tracking without Paddle.js

  • Decide on the identifier FirstPromoter will use to match the referral with the Paddle customer: Email or Passthrough as uid.

  • For Email matching, ensure that the referral "email" matches the Paddle customer email. After the first sale, the referral "uid" will be automatically filled with the Paddle user id.

  • For Passthrough as uid, ensure that the value used as passthrough in your Paddle checkout is passed on the referral tracking function or API as "uid". This can be the user or account id in your database.

  • If your Paddle passthrough is a JSON, pass the "uid" value used in the referral script as a "fp_uid" field of the passthrough JSON.

Did this answer your question?