๐Ÿ’ณPayments

Stripe and Lemon Squeezy are the two payment processors I use most often, although I have also used Paddle in the past.

Stripe is super powerful and the industry leader for payments. However if you're based in the UK or EU and care about your EU VAT obligations, you may want to use Lemon Squeezy instead. Lemon Squeezy acts as the merchant of record, meaning they handle all of the VAT remittances for you.

The end user experience for both platforms is fairly similar. For the developer, in my opinion the Lemon Squeezy dashboard is much simpler than Stripe but also has less functionality.

The integrations I've built into Bullet Launch enable users to create and manage their subscriptions via the hosted portals provided by each processor. This is the simplest way to integrate with the payment processors.

If you require more advanced functionality or marketplace features then you will need to add these in yourself (or I can help you).

Stripe

Setting up Stripe as your payment processor involves configuring API keys, pricing plans, and webhooks to ensure secure and efficient handling of transactions. This guide provides a concise overview of the necessary steps to integrate Stripe into your application.

Overview of Steps:

  1. Add Stripe Plugin and API Keys:

    • Navigate to the Stripe plugin in the plugins tab.

    • Add your secret and publishable API keys for both test and live environments.

    • Obtain these keys from your Stripe dashboard.

  2. Configure API Connector Plugin:

    • Expand the Stripe call in the API connector plugin.

    • Enter your secret key for both test and live environments.

    • This ensures security checks for webhooks from Stripe.

  3. Set Up Pricing Plans:

    • Go to the data tab and open option sets.

    • Modify existing pricing plans or create new ones as needed.

    • Ensure free plans for new users and define monthly and yearly plans.

    • Match these plans with those in your Stripe dashboard, copying the price IDs from Stripe to your app.

  4. Integrate Stripe and Lemon Squeezy (Optional):

    • If not using Lemon Squeezy, focus on Stripe fields.

    • Mirror pricing plans in Stripe for both test and live modes, copying respective price IDs.

  5. Configure Webhooks:

    • In Stripe, search for webhooks and add a new endpoint with your appโ€™s URL.

    • Specify the events to monitor, such as customer.subscription.updated and customer.subscription.deleted.

    • This ensures your app is notified of subscription updates.

  6. Payment Provider Settings:

    • Ensure your app's payment provider is set to Stripe in the app settings.

    • This configuration is used to determine the correct workflow for handling payments.

  7. Testing and Validation:

    • Perform tests in both test and live modes to ensure everything is set up correctly.

    • Use backend workflows to handle Stripeโ€™s webhook events, verifying the authenticity and updating user subscriptions accordingly.

By following these steps, you can successfully integrate Stripe into your application, enabling secure and efficient payment processing.

Lemon Squeezy

Setting up Lemon Squeezy as your payment provider involves configuring API keys, creating and managing pricing plans, and setting up webhooks to handle subscription updates. This guide outlines the steps to integrate Lemon Squeezy into your application effectively.

Overview of Steps:

  1. Add API Key in API Connector:

    • Navigate to the API connector plugin.

    • Expand Lemon Squeezy and enter your API key for both test and live modes.

  2. Create Pricing Plans:

    • Go to Lemon Squeezy and create an account.

    • Switch to test mode and create a new product with variants for different pricing plans (monthly and annual).

    • Mirror these plans within your appโ€™s option sets, ensuring the pricing details match.

  3. Configure Option Sets in App:

    • In the option sets, create entries for each pricing plan.

    • Include the display name, plan name, icon, description, frequency, and feature tier.

    • Ensure the price and any user restrictions are set correctly.

    • Add the variant ID and slug for each plan from Lemon Squeezy.

  4. Setup Payment Provider in App Settings:

    • Go to app data and app settings.

    • Set the payment provider to Lemon Squeezy and save.

  5. Handle Subscriptions and Plan Upgrades:

    • In the pricing table, set up workflows to handle subscriptions.

    • Check the payment provider and create appropriate custom events to handle new subscriptions or updates.

    • Ensure the correct URL and variant ID are used depending on whether you are in test or live mode.

  6. Configure Webhooks in Lemon Squeezy:

    • Go to Lemon Squeezy settings and create a new webhook.

    • Set the webhook URL to your appโ€™s backend workflow URL.

    • Subscribe to subscription.created and subscription.updated events.

    • Make sure to repeat this process for both test and live modes, adjusting the URL as needed.

  7. Sync Subscription Data:

    • Use backend workflows to handle webhook notifications.

    • When a subscription is created or updated, trigger an API call to get the subscription details.

    • Update the userโ€™s subscription status and related data in the app accordingly.

By following these steps, you can successfully integrate Lemon Squeezy into your application, ensuring smooth handling of subscriptions and secure payment processing.

Last updated