Open paid Aminos agency plans from Lemon Squeezy

Give a new agency client the Aminos panel plan that matches their paid Lemon Squeezy subscription and save the account receipt in MongoDB.

23 stepsSalesOperations

Free to start, no card required.

How it works

  1. When this happens

    Receive a new agency subscription

    Lemon Squeezy

  2. Step 1 · Code

    Map sold tiers to Aminos plans

  3. Step 2

    Check the subscription reference

    Follows the first path that matches

    • New subscription received

      1. Step 3 · Lemon Squeezy

        Read the new subscription and variant

      2. Step 4 · Code

        Check the live tier and customer

      3. Step 5

        Check the agency plan mapping

        Follows the first path that matches

        • Live subscription maps to one plan

          1. Step 6 · Lemon Squeezy

            Confirm payment for this subscription

          2. Step 7 · Code

            Verify payment, buyer and order item

          3. Step 8

            Check full payment

            Follows the first path that matches

            • Matching order is paid and unrefunded

              1. Step 9 · Code

                Identify the client’s provisioning claim

              2. Step 10 · Lemon Squeezy

                Recheck the current subscription

              3. Step 11 · Code

                Check for cancellation or tier changes

              4. Step 12

                Check the current plan

                Follows the first path that matches

                • Same paid tier is still active

                  1. Step 13 · Lemon Squeezy

                    Recheck the charge before provisioning

                  2. Step 14 · Code

                    Check the order for refunds or edits

                  3. Step 15

                    Check the latest payment state

                    Follows the first path that matches

                    • Payment remains eligible

                      1. Step 16 · MongoDB

                        Reserve the new client account

                      2. Step 17 · Code

                        Check who reserved the panel account

                      3. Step 18

                        Check for an existing account claim

                        Follows the first path that matches

                        • First reservation for this client

                          1. Step 19 · Aminos

                            Open the purchased Aminos panel plan

                          2. Step 20 · Code

                            Validate the new panel user ID

                          3. Step 21 · MongoDB

                            Save the client’s new panel user ID

                          4. Step 22 · Code

                            Confirm the saved account receipt

                        • Otherwise

                          Nothing happens

                    • Otherwise

                      Nothing happens

                • Otherwise

                  Nothing happens

            • Otherwise

              Nothing happens

        • Otherwise

          Nothing happens

    • Otherwise

      Nothing happens

Before you start

Select one live Lemon Squeezy store and map two subscription variant IDs to distinct numeric plan IDs in your agency’s Aminos One panel. Connect that panel and prepare a private MongoDB collection for new clients, with one purchase and one panel login per billing email. Review a reserved receipt or existing account in the panel before retrying an uncertain creation.

Accounts to connect

See all 144 in Sales

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template