Payments

We use Paddle to handle payments. Paddle supports a variety of payment methods, including credit cards, PayPal, and Apple Pay. Paddle also supports both recurring payments and one time payment, which is how we handle subscriptions.

Setup Paddle

Note: If you want to test payments, it's safer to use a sandbox account. You can create a sandbox account at https://sandbox-vendors.paddle.com/

Setup Vendor ID and API Key

Go to Dashboard \ Settings \ Payments and fill out Paddle Vendor ID and Paddle API Key.

To get these info, login to Paddle.com and go to Developer Tools \ Authentication. You'll find your vendor_id. To get your API key, click "Reveal Auth Code" or go to "Generate Auth Code". and create a new one.

Setup Webhook

  • Go to Developer Tools \ Events in Paddle dashboard.
  • In "URLs for receiving webhooks", enter: https://your-domain.com/api/webhook
  • In "Email address for receiving email alerts", enter your email address.
  • In Subscribing to events sections, select "Subscription Created", "Subscription Payment Refunded", "Payment Success", "Payment Refunded" for "Webhook". Select any events for email that you want.

Secure tunnels for localhost

If you're developing or testing in local environment, we'll need to expose your local server to the internet. You can try ngrok or cloudflare tunnel to do that.

Manage Plans

Since Paddle handle all payments related stuff for us, you'll create a plan in Paddle first, then create a matching plan in your app for tracking and handle customer usage. There are two types of plans: recurring and one time. Recurring plans are for subscriptions, and one time plans are for one time purchases. Heave supports both types of plans.

Create a Subscription Plan

Go to Catalog \ Subscription Plans in Paddle dashboard and create new plan. You can create multiple plans for different subscription periods, such as monthly, yearly, etc. Please note Plan ID to match with your app.

Go to Dashboard \ Plans and create a new plan, in Paddle Integration section, enter the Plan ID from Paddle, and enter the price and currency.

Create a One Time Plan

Go to Catalog \ Products in Paddle dashboard and create new plan, enter all required fields. In the "Fulfillment Method", select "Server Notification...", hit Continue.

You'll be redirect to "Release One Time Payment" page. Enter your plan details.

In Set Webhook URL, enter: https://your-domain.com/api/webhook In Upload your application, enter: https://your-domain.com/api/download Follow the steps required by Paddle.

Now you have one time plan created. Please note Product ID to match with your app.

Go to Dashboard \ Plans and create a new plan, in Paddle Integration section, enter the Product ID from Paddle, and enter the price and currency. In Recurring section, please enter 0 for one time payment.

Update and Deleting Plans

Update and deleting plans won't affect Paddle plans. You can only delete plans if there are no customers using it.

Manage Customers

After a customer purchase a plan on Paddle, our system will create a payment if they already have an account and has email matching with Paddle.

Manually Issue a Payment

If you want to manually create a payment for a customer, go to Dashboard \ Payments and click "Create". Enter the customer email and select the plan. You can also override the price and expired date.