Paddle Subscription or Product Web Purchase

1. Configure Paddle Webhook

🚧

Glassfy support the Paddle Classic APIs

please be sure to select Paddle Classic APIs and not the Paddle Billing APIs on top left of your paddle integration.

2. Create the Paddle SKU

Identify the plan Plan ID you want to sell from your Paddle dashboard and use it to create a SKU.

3. Add the SKU to a Permission

Configure Permissions

4. Create a web checkout page

You can now create a Paddle web checkout page using the following code snippet.

📘

Make sure the value for product is the same as the Plan ID used above to create the SKU and that the custom_id in the passthrough variable contains the custom_id you will use in your app to identify the user.

<div class="section">
  PADDLE TEST
  <a href="#!" id="buy">Buy now!</a>
  <script type="text/javascript">
    function openCheckout() {
      Paddle.Checkout.open({
        product: 16491,
        passthrough: '{"custom_id":  "my_custom_userid"}',
      });
    }
    document
      .getElementById("buy")
      .addEventListener("click", openCheckout, false);
  </script>
</div>
<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
<script type="text/javascript">
  Paddle.Environment.set('sandbox'); // only do this on sandbox testing.
  Paddle.Setup({ vendor: 3264 });
</script>

Next connect the user in your application.

Glassfy.connectCustomSubscriber("my_custom_userid") { error in
    // handle error.
}
[Glassfy connectCustomSubscriber:@"my_custom_userid" withCompletion:nil];
await Glassfy.connectCustomSubscriber("my_custom_userid");

In the passtrough the following attributions parameters are supported and propagated over the webhooks and connectors

IdDescription
singularidSingular Identifier
clevertapidClevertap Identifier
amplitude_useridAmplitude User Identifier
amplitude_deviceidAmplitude Device Identifier
ipIP address
appsflyeridAppsFlyer Identifier
mixpanel_distinctidMixpanel Distinct Identifier
particleidParticle Identifier
onesignalidOneSignal Identifier
airship_channelidAirship channel Identifier
adjustidAdjust Identifier
appsflyeridAppsFlyer Identifier
fb_anonidFacebook anonymous Identifier
firebase_appinstanceidFirebase Identifier
iterable_useridIterable user Identifier

What’s Next