Paddle Subscription or Product Web Purchase

1. Configure Paddle Webhook

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.

13841384

3. Add the SKU to a Permission

Configure Permissions

3. 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.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");

What’s Next
Did this page help you?