Sitemap

Why I chose Chipp.ai for payments in my latest generative AI web app using Bubble and OpenAI

8 min readOct 28, 2023

I chose Chipp.ai () for my latest project, Law Prompt AI (www.lawpromptai.com) a no-code bubble () project, which shares a number of OpenAI API (www.openai.com) based prompts for lawyers. Chipp.ai provides a straightforward way to accept payments for micro-transactions, so I could recover costs of my API calls. Here’s more about the project and why I chose Chipp.ai.

lawpromptai.com and me

Like many others, I recognized the power and potential of large language models and numerous ways to incorporate them into my daily tasks. But I am not a developer. I am a patent and trademark attorney who has some web-based projects. I work with a lot of incredibly innovative people as a part of my career, and so seeing all of the amazing innovations of others across different science and engineering domains really encourages me to find my own outlets for creation.

I even authored a book for lawyers about doing so, which included many creative and useful prompts. I wanted to share my prompts with others, including those who might not want to fire-up an AI assistant to do so, and want DFY prompts. I wanted to encourage others from within my law firm to use appropriate tools, and perhaps I have always been a bit of a technology evangelist to others in the legal community.

But my development skills are limited. I am no full stack developer, I am conversant in various languages and tools, but fluent in none. What’s more, I have extremely limited time to devote to developing tools.

Bubble.io and the WGMI Academy AI SAAS Starter Kit Pro template

So bubble.io is a natural choice for no-code development and a popular one. Here, I started with the WGMI Academy AI SAAS Starter Kit Pro template so I could be up and running incredibly quickly, having something usable over a weekend. Essentially, all one would need to do using this template is to modify text and images throughout and then modify a database containing prompts.

LawPromptAI.com web site

As is normally the case, with any template, there are always some items that one wants to do a little bit differently which then requires taking the time to understand all aspects of the template more thoroughly.

In addition, the template is set up to be a typical monthly subscriber SAAS. Yet I did not consider that the right approach for my use case. Certainly, there’s a lot of benefits to a monthly subscription if a web app is your business. Certainly, having a nice regular cash flow and committed user base are important parts of that business model.

For me, my business is as a patent and trademark attorney. Sharing web apps is more like me sharing books, courses, and the like. It is about finding ways to reach and build my community which includes clients, prospective clients and other lawyers or referral sources. This web app in particular is made for other lawyers. Certainly, I want to allow others to try it out for free, but with limitation.

Pay-as-you-go and costs of API calls

For my use case, I am primarily concerned with cost recovery. OpenAI charges by the token and so that makes it easy for me to quantify the number of credits associated with a prompt completion. I want to make sure I can recover the costs associated with the use of OpenAI API tokens.

What is the cost per token for me to charge? Of course, it is more than just the cost of the OpenAI API costs. There are costs associated with hosting or server maintenance and the like, some of which are fixed, some are variable. But for my use case, as long as I am charging per token more than the cost of the API calls I am fine.

There are some problems with this approach. Although a certain number of tokens are used for each OpenAI call, my users do not know exactly how many tokens will be used in advance. However, the cost per token is minimal and I am providing free tokens to begin with. I could also calculate a maximum token cost or estimate, but not an exact one.

For my use case, pricing is closely tied to costs. However, I certainly envision other use cases where the pricing for a particular prompt completion or workflow is based on value to the user. Even in LawPromptAI, some prompts were difficult to construct and would be difficult for others to construct. The completions can be of significant value, far beyond the per token price for the API calls. No doubt price discovery for AI content generation can be an interesting and complex issue.

Yet, pay-as-you-go seems like a better solution than a monthly subscription for many use cases and would appear to make it easier to adjust pricing as needed while one is determining an appropriate price.

Of course, Stripe is a solution for collecting payment and could be used for either subscriptions or pay-as-you go, but when you are dealing with micro-transactions, it does not make sense to charge for each one separately as there is a per transaction charge for Stripe transactions. In addition, this would result in a web app which would be very annoying to users if they must go through a payment process for every use.

So some type of system is needed to track the micro-transactions such as for each prompt completion. When one does not routinely develop, there’s some overhead incorporating Stripe. Then one has to maintain their own system of tracking micro-transactions too. This can quickly become a lot of overhead!

So, especially for the non-developer, the thought of, “I want to have a web app to share my prompts and workflows with the ability to charge on a pay-as-you go basis”, is not a simple proposition.

Or at least it is not as simple as it should be.

As I was pondering this, I was making LawPromptAI available for free, but at the same time I was concerned about promoting it too much. After all, if too many users were using it too much, the costs would grow significantly. Lack of a good solution was leading to self-sabotage!

Enter Chipp.ai

By sheer synchronicity, I learned about Chipp.ai, and it was exactly what I was looking for. It was simple to use, it can even host the packages for you (or you can host yourself).

Essentially, you use the Chipp.ai web site to create a new product and specify different packages and the associated number of credits. You are also provided with API keys (live or demo) to use when making your API calls. Below shows what that looks like in Chipp.ai.

Setting up an app and payment page in Chipp.AI

Then your server (not browser) calls the Chipp.ai API to get balances for a particular user (and create one if needed), or to debit or credit their account. It can do more, but those are the basic features needed for my purposes.

So in my use case, I simply track the number of OpenAI tokens used for a prompt completion, which is information returned from the API call and thus after a successful chat completion I reduce the number of credits accordingly. I make an API call for a user to purchase more credits, which takes the user to the page created on the Chipp.ai web site. One may also want to check the balance of tokens before the chat completion is made.

Note I do need user signup/login, but that functionality is implemented well in Bubble. When I need a user signed up, they are added to Chipp, and I place tokens or credits in their account.

Using Bubble’s API Connector I set up the API function calls I need to use Chipp.ai for my use case.

Chipp.ai users API function call setup in Bubble.io
Chipp.ai packages-hosted-purchase page API function call setup in Bubble.io
Chipp.ai transactions API function call setup in Bubble.io

Then I also incorporate these calls into my workflows. For example, when a user clicks a sign-up button, I have the following workflow:

Bubble workflow for a sign-up to create a users and add credits with Chipp.AI

This ensures the email address is added through the Chipp.ai API and that credits are posted to their account.

I also have a purchase credits button.

Purchase button

When this button is clicked I have a two-step workflow. First I make a call to the packages-hosted-purchase-page and then I open an external website, returned by the API.

Bubble workflow to use Chipp.ai to purchase credits

This directs the user to the packages page we created in Chipp.ai and Chipp.ai uses Stripe to obtain payments.

In my workflow, after my Generate button is clicked which serves to initiate a call to the OpenAI API and returns a chat completion, then, I use the transactions_post API call in order to reduce the number of tokens/credits associated with the user by the number of OpenAI tokens used.

Step in Bubble workflow to deduct credits when an OpenAI chat completion occurs

In various places throughout the app I also let the user know how many remaining credits they have. I do this by calling the users function to determine the number of available credits and I set a custom state which I can then use to populate a text element.

Bubble workflow used to display the number of available credits.
Step in the Bubble workflow to retrieve credits for a user.
Step in the Bubble workflow to set a custom state so that the number of available credits can be displayed in an element (such as a text box).

In my view, Chipp.ai is great not only for lawpromptai.com but some of my other projects which are Micro-SaaS and only require micro-transactions. I like the fact that it is easy to implement with only a few API calls. I also like the fact that it can host the purchase pages, so I don’t need to incorporate that into my app.

Chipp.ai helps free up development and testing time. Instead of having to deal both with transactions directly through Stripe and then an extra layer for tracking separate micro-transactions, Chipp.ai handles both for me. The result is I can easily allow visitors to be pay-as-you-go.

Especially important to me is that I can do this quickly and I can focus on engineering the next, greatest prompt, or the next great workflow and know that whenever I am ready, I can quickly monetize it. Chipp.ai could be the solution you are looking for too.

If you happen to be a lawyer:

Check out my book while it is still relevant!

Check out and see if any prompts are useful for you!

John D. Goodhue
John D. Goodhue

Written by John D. Goodhue

John is patent and trademark attorney, author, technology enthusiast residing in Des Moines, Iowa.

No responses yet